Enable for debugging

This commit is contained in:
Richard Davey 2022-10-28 18:22:57 +01:00
parent 6ad852f089
commit 4a5f6adfe4
2 changed files with 12 additions and 0 deletions

View file

@ -1323,6 +1323,12 @@ var Text = new Class({
this.frame.source.glTexture = this.renderer.canvasToTexture(canvas, this.frame.source.glTexture, true); this.frame.source.glTexture = this.renderer.canvasToTexture(canvas, this.frame.source.glTexture, true);
this.frame.glTexture = this.frame.source.glTexture; this.frame.glTexture = this.frame.source.glTexture;
if (typeof WEBGL_DEBUG)
{
// eslint-disable-next-line camelcase
this.frame.glTexture.__SPECTOR_Metadata = { textureKey: 'Text Game Object' };
}
} }
this.dirty = true; this.dirty = true;

View file

@ -452,6 +452,12 @@ var TileSprite = new Class({
if (this.renderer && this.renderer.gl) if (this.renderer && this.renderer.gl)
{ {
this.fillPattern = this.renderer.canvasToTexture(canvas, this.fillPattern); this.fillPattern = this.renderer.canvasToTexture(canvas, this.fillPattern);
if (typeof WEBGL_DEBUG)
{
// eslint-disable-next-line camelcase
this.fillPattern.__SPECTOR_Metadata = { textureKey: 'TileSprite Game Object' };
}
} }
else else
{ {