Pixeljs

A simple and flexible HTML5 and JavaScript powered game engine.

View Project on GitHub Download Pixel.js (v0.9b)

SpriteSheet Class

Represents a sprite sheet that can be used to access individual frames of a sheet.

Inheritance Hierarchy

Properties

Name Description
frameCount The number of frames in each row.
frameSize An object containing two properties, width and height, which represent the size of an individual frame in the sprite sheet.
loaded A boolean value indicating whether or not the asset has been loaded. (Inherited from Asset.)
rowCount The number of rows in the sheet.

Methods

Name Description
draw An abstract method with the purpose of drawing the asset to the Layer that the owning Entity exists on. (Inherited from Asset.)
load Loads the asset. (Overrides Asset.load.)
onLoad The function to be called when the asset has finished loading. (Inherited from Asset.)
prepare Prepare the information required to load the asset. (Inherited from Asset.)

Supported Platforms

Google Chrome, Mozilla FireFox, Internet Explorer 9+, Opera, Safari.