Combining the spriteSheets with the frames as an array of images seems to provide better performance. No example is really complete without the use of particles so I had to add some fun there. The ship uses atan2 to generate the angle between the sprite and the mouse location. Then the ship adjusts its Y location progressively in relation to the mouse continually adjusting its angle for a smooth and gentle movement. The sprite animations were made in Adobe Flash and used the CS6 generate spritesheet method.
Check it out: spriteSheet Alien Invasion
spriteSheet Alien Invasion
[iframe src=”http://www.theartboy.net/demos/spriteShip/index.html” width=”800″ height=”500″]