Pixeljs

A simple and flexible HTML5 and JavaScript powered game engine.

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

SpriteSheet.load Method

Loads the asset.

Parameters

Name Description
info An object containing the following properties:

  • name: the name of the sprite sheet to load.
  • rows: the number of rows in the sheet.
  • frames: the number of frames in each row
  • transparencyKey: an object containing an R, G and B value which represent the respective RGB value that should be transparent.
callback Optional: the function to be called when the asset has finished loading.

Examples

Supported Platforms

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