What it does
sprite.delete acts on sprite: it deletes. It takes id.
Signature
sprite.delete(id)Arguments
id
Example · generated
function start() { const id = sprite.create('/sprites/hero.png', 100, 120); sprite.delete(id);}sprite.create is there to give the call something to act on; sprite.delete is the line that matters. The code sits in start(), which the engine calls once, when the entity spawns.