Hundreds of features to explore
Games made in Construct
Your questions answered
Trusted by schools and universities worldwide
Free education resources to use in the classroom
Students do not need accounts with us
What we believe
We are in this together
World class complete documentation
Official and community submitted guides
Learn and share with other game developers
Upload and play games from the Construct community
Game development stories & opinions
I got a PNG image loaded into the sprite object via URL.
Before loading the next one, I need to clear the sprite object, so the last PNG does not shine through the next one.
How can I do this?
Develop games in your browser. Powerful, performant & highly capable.
OK, got it.
canvas.width = canvas.width;
does the job in js. Just need to add an event everytime the sprite should be cleared:
set canvas size to sprite.width x sprite.height
in case the sprite size is the same as the layer.