_updateTextureMatrix(sizes) {
        // calculate scale to apply to the matrix
        const textureScale = tempVec3.set(
            sizes.parentWidth / (sizes.parentWidth - sizes.xOffset),
            sizes.parentHeight / (sizes.parentHeight - sizes.yOffset),
            1
        );

        // apply texture scale
        textureScale.x /= this.scale.x;
        textureScale.y /= this.scale.y;

        // translate and scale texture to center it
        // equivalent (but faster) than applying those steps to an identity matrix:
        // translate from [(1 - textureScale.x) / 2 + this.offset.x, (1 - textureScale.y) / 2 + this.offset.y, 0]
        // then apply a scale of [textureScale.x, textureScale.y, 1]
        this._textureMatrix.matrix = textureTranslation.setFromArray([
            textureScale.x, 0, 0, 0,
            0, textureScale.y, 0, 0,
            0, 0, 1, 0,
            (1 - textureScale.x) / 2 + this.offset.x, (1 - textureScale.y) / 2 + this.offset.y, 0, 1
        ]);

        // update the texture matrix uniform
        this._updateMatrixUniform();
    }
This updates our textures matrix uniform based on plane and sources sizes

     params:
     @sizes (object): object containing plane sizes, source sizes and x and y offset to center the source in the plane
*