Pixeljs

A simple and flexible HTML5 and JavaScript powered game engine.

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

Tile.load Method

Loads the asset.

Parameters

Name Description
info An object containing the following properties:

  • name: the name of the tile to load.
  • size: An object containing two properties, width and height, which represent the size of the area that the tile should cover.
  • callback: the function to be called when the asset has finished loading.
callback Optional: the function to be called when the asset has finished loading. If a callback is provided in the info parameter and the callback parameter, the callback parameter will take presidence.

Examples

Supported Platforms

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