Pixeljs

A simple and flexible HTML5 and JavaScript powered game engine.

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

Entity.addToLayer Method

Adds the entity to the collection of registered entities on a Layer.

Parameters

Name Description
layer The Layer to add the entity to.

Remarks

Adding an entity to a layer using this method will also set the layer property.

Examples

Supported Platforms

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