constructor(width, height, attributes = defaultAttributes) {
		/**
		 * the canvas created for this CanvasRenderTarget
		 * @type {HTMLCanvasElement|OffscreenCanvas}
		 */
		// this.canvas;

		/**
		 * the rendering context of this CanvasRenderTarget
		 * @type {CanvasRenderingContext2D|WebGLRenderingContext}
		 */
		// this.context;
		// clean up the given attributes
		this.attributes = Object.assign({}, defaultAttributes, attributes);

		// make sure context is defined
		if (typeof attributes.context === "undefined") {
			attributes.context = "2d";
		}

		// used the given canvas if any
		if (typeof attributes.canvas !== "undefined") {
			this.canvas = attributes.canvas;
		} else {
			this.canvas = createCanvas(
				width,
				height,
				this.attributes.offscreenCanvas,
			);
		}

		// create the context
		this.context = createContext(this.canvas, this.attributes);

		this.WebGLVersion = WebGLVersion;

		// enable or disable antiAlias if specified
		this.setAntiAlias(this.attributes.antiAlias);
	}
@param {number} width - the desired width of the canvas
@param {number} height - the desired height of the canvas
@param {object} attributes - The attributes to create both the canvas and context
@param {string} [attributes.context="2d"] - the context type to be created ("2d", "webgl")
@param {boolean} [attributes.preferWebGL1=false] - set to true for force using WebGL1 instead of WebGL2 (if supported)
@param {boolean} [attributes.transparent=false] - specify if the canvas contains an alpha channel
@param {boolean} [attributes.offscreenCanvas=false] - will create an offscreenCanvas if true instead of a standard canvas
@param {boolean} [attributes.willReadFrequently=false] - Indicates whether or not a lot of read-back operations are planned
@param {boolean} [attributes.antiAlias=false] - Whether to enable anti-aliasing, use false (default) for a pixelated effect.