GoodBoyDigital/pixi.js — pull request #92 by floatdrop (2013-05-01 17:13:34+00:00)
Title: Layers

### Layers manager class

Wrapper of DisplayObjectContainer, that helps to store DisplayObjects in separate layers.

**Constructor**: *PIXI.Layers(layerName1, layerName2, layerName3...)*
Creates Layers objects with layers corresponding to the passed string values. Layers ordered from bottom to top.

#### Example usage:

```javascript
this.stage = new PIXI.Stage(0x000000);
var layers = new PIXI.Layers("bottom", "middle", "top");
stage.addChild(layers);

layers.bottom.addChild(new PIXI.Text("Bottom layer", "bold 30px Arial", "red"));
layers.midlle.addChild(new PIXI.Text("Middle layer", "bold 20px Arial", "green"));
layers.top.addChild(new PIXI.Text("Top layer", "bold 10px Arial", "blue"));
```