I threw together a simple single-file HTML app that animates a crude 'spaceship' across a canvas and also has a 'Self-Destruct' button that generates a simple noise and changes the animation so that ship's nose/body/tail separate.
It's pretty minimal, but is extensible and might be a good starting point for improvements like: