constructor(
        renderer,
        crossOrigin = "anonymous",
    ) {
        this.type = "TextureLoader";

        // we could pass our curtains object OR our curtains renderer object
        renderer = renderer && renderer.renderer || renderer;

        // throw warning if no renderer or webgl context
        if(!renderer || renderer.type !== "Renderer") {
            throwError(this.type + ": Renderer not passed as first argument", renderer);
        }
        else if(!renderer.gl) {
            throwError(this.type + ": Renderer WebGL context is undefined", renderer);

            // return if no gl context
            return;
        }

        // renderer and webgl context
        this.renderer = renderer;
        this.gl = this.renderer.gl;

        // crossorigin policy to apply
        this.crossOrigin = crossOrigin;

        // keep a track of all sources loaded via this loader
        this.elements = [];
    }
An asset loader that handles images, videos and canvas loading
 Load the assets and create a Texture class object that will use those assets as sources

 params:
 @renderer (Curtains or Renderer class object): our curtains object OR our curtains renderer object
 @crossOrigin (string, optional): crossorigin policy to use

 returns :
 @this: our TextureLoader element
*