Search the Community
Showing results for tags 'clear canvas'.
-
Hi! I want to clear the whole canvas. I know there is one way by changing state, but I want to be in same state and clear whole canvas when a sprite is clicked. Something like: sprite.events.onInputDown(this.clearCanvas, this);
- 1 reply
-
- phaser
- clear canvas
-
(and 2 more)
Tagged with:
-
So, like the title says. A simplified version of the code I am trying to use looks like this: var graphics = new PIXI.Graphics(); . . . ... draw some stuff ... . . . graphics.clear(); In reality, things are a bit more complicated than I show above, so it might be a problem that I am causing. I don't see how though, so I thought I would post and ask: 1. Am I using it right? 2. Is there a possible bug? I tried to work around by forcing Pixi to use a canvas and getting a context to that canvas and clearing it myself with clearRect but that didn't work either. I get the feeling I am having some fundamental misunderstanding...