The problem
I have a dynamic texture I draw 1000s of numbers on it (via Phaser.Gameobjects.Text or BitmapText) and via tex.draw(). Sometimes I want to remove the text from a specific location on the texture. The only way I found this was via .erase.
Problem is it only takes in a Gameobject but not the size itself. When i give it my text gameobject it will remove it but in a very weird way. Here is a screenshot:

A fellow discord mate helped me out with a workaround:
const rect = this.add.rectangle(0, 0, 10, 10, 0);
dynTexture.erase(rect, 0, 0);
But still I thought why not implement another way of this function, that will also take in a size or width + height parameter. I would also like to try to implement it.
API for example for a DynamicTexture might look like this: dynTexture.erase(width: number, height: number = width, x: ....)
[Optional] Do you want to help provide this feature?
Yes. API for example for a DynamicTexture might look like this: dynTexture.erase(width: number, height: number = width, x: ....)
The problem
I have a dynamic texture I draw 1000s of numbers on it (via
Phaser.Gameobjects.TextorBitmapText) and viatex.draw(). Sometimes I want to remove the text from a specific location on the texture. The only way I found this was via.erase.Problem is it only takes in a Gameobject but not the size itself. When i give it my text gameobject it will remove it but in a very weird way. Here is a screenshot:
A fellow discord mate helped me out with a workaround:
But still I thought why not implement another way of this function, that will also take in a size or width + height parameter. I would also like to try to implement it.
API for example for a
DynamicTexturemight look like this:dynTexture.erase(width: number, height: number = width, x: ....)[Optional] Do you want to help provide this feature?
Yes. API for example for a
DynamicTexturemight look like this:dynTexture.erase(width: number, height: number = width, x: ....)