Pixeljs

A simple and flexible HTML5 and JavaScript powered game engine.

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

Sprite Class

Represents a sprite that can be used as an Asset for an Entity.

Inheritance Hierarchy

Properties

Name Description
loaded A boolean value indicating whether or not the asset has been loaded. (Inherited from Asset.)
transparencyKey An object containing an R, G and B value which represent the respective RGB value that should be transparent.

Methods

Name Description
draw Draws the asset to the Layer that the owning Entity exists on. (Overrides Asset.draw.)
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.