setText(value = "") {
		const bounds = this.getBounds();

		// set the next text
		if (this._text.toString() !== value.toString()) {
			if (!Array.isArray(value)) {
				this._text = ("" + value).split("\n");
			} else {
				this._text = value;
			}
		}

		// word wrap if necessary
		if (this._text.length > 0 && this.wordWrapWidth > 0) {
			this._text = this.metrics.wordWrap(
				this._text,
				this.wordWrapWidth,
				this.canvasTexture.context,
			);
		}

		// calculcate the text size and update the bounds accordingly
		bounds.addBounds(
			this.metrics.measureText(this._text, this.canvasTexture.context),
			true,
		);

		// update the offScreenCanvas texture if required
		let width = Math.ceil(this.metrics.width);
		let height = Math.ceil(this.metrics.height);

		if (globalRenderer.WebGLVersion === 1) {
			// round size to next Pow2
			width = nextPowerOfTwo(this.metrics.width);
			height = nextPowerOfTwo(this.metrics.height);
		}

		// invalidate the texture
		this.canvasTexture.invalidate(globalRenderer);

		// resize the cache canvas if necessary
		if (
			this.canvasTexture.width < width ||
			this.canvasTexture.height < height
		) {
			this.canvasTexture.resize(width, height);
		}

		this.canvasTexture.clear();
		this._drawFont(
			this.canvasTexture.context,
			this._text,
			this.pos.x - this.metrics.x,
			this.pos.y - this.metrics.y,
		);

		this.isDirty = true;

		return this;
	}
change the text to be displayed
@param {number|string|string[]} value - a string, or an array of strings
@returns {Text} this object for chaining