calculateProjection(destinationFrame, sourceFrame = null)
    {
        const pm = this.projectionMatrix;

        sourceFrame = sourceFrame || destinationFrame;

        pm.identity();

        if (!this.root)
        {
            pm.a = 1 / destinationFrame.width * 2;
            pm.d = 1 / destinationFrame.height * 2;

            pm.tx = -1 - (sourceFrame.x * pm.a);
            pm.ty = -1 - (sourceFrame.y * pm.d);
        }
        else
        {
            pm.a = 1 / destinationFrame.width * 2;
            pm.d = -1 / destinationFrame.height * 2;

            pm.tx = -1 - (sourceFrame.x * pm.a);
            pm.ty = 1 - (sourceFrame.y * pm.d);
        }

        return this;
    }
/**
     * Updates the projection matrix based on the projection frame.
     *
     * @param {Rectangle} destinationFrame - The destination frame.
     * @param {Rectangle} sourceFrame - The source frame.
     * @return {RenderTarget} Returns itself.
     */
Updates the projection matrix based on the projection frame.
@param {Rectangle} destinationFrame - The destination frame.
@param {Rectangle} sourceFrame - The source frame.
@return {RenderTarget} Returns itself.
Updates the projection matrix based on the projection frame . @param { Rectangle } destinationFrame - The destination frame . @param { Rectangle } sourceFrame - The source frame . @return { RenderTarget } Returns itself .
calculateProjection(destinationFrame, sourceFrame = null)
    {
        const pm = this.projectionMatrix;
        sourceFrame = sourceFrame || destinationFrame;
        pm.identity();
        if (!this.root)
        {
            pm.a = 1 / destinationFrame.width * 2;
            pm.d = 1 / destinationFrame.height * 2;
            pm.tx = -1 - (sourceFrame.x * pm.a);
            pm.ty = -1 - (sourceFrame.y * pm.d);
        }
        else
        {
            pm.a = 1 / destinationFrame.width * 2;
            pm.d = -1 / destinationFrame.height * 2;
            pm.tx = -1 - (sourceFrame.x * pm.a);
            pm.ty = 1 - (sourceFrame.y * pm.d);
        }
        return this;
    }
calculateProjection ( destinationFrame , sourceFrame = null ) { const pm = this . projectionMatrix ; sourceFrame = sourceFrame || destinationFrame ; pm . identity ( ) ; if ( ! this . root ) { pm . a = 1 / destinationFrame . width * 2 ; pm . d = 1 / destinationFrame . height * 2 ; pm . tx = - 1 - ( sourceFrame . x * pm . a ) ; pm . ty = - 1 - ( sourceFrame . y * pm . d ) ; } else { pm . a = 1 / destinationFrame . width * 2 ; pm . d = - 1 / destinationFrame . height * 2 ; pm . tx = - 1 - ( sourceFrame . x * pm . a ) ; pm . ty = 1 - ( sourceFrame . y * pm . d ) ; } return this ; }
Updates the projection matrix based on the projection frame.
Updates the projection matrix based on the projection frame .