Packagecom.pblabs.rendering2D
Classpublic class DisplayObjectSceneLayer
InheritanceDisplayObjectSceneLayer Inheritance flash.display.Sprite

Layer within a DisplayObjectScene which manages a list of DisplayObjectRenderers. The layer is responsible for keeping itself sorted. This is also a good site for custom render effects, parallaxing, etc.



Public Properties
 PropertyDefined By
  drawOrderFunction : Function
Array.sort() compatible function used to determine draw order.
DisplayObjectSceneLayer
  needSort : Boolean = false
Set to true when we need to resort the layer.
DisplayObjectSceneLayer
  rendererList : Array
All the renderers in this layer.
DisplayObjectSceneLayer
Public Methods
 MethodDefined By
  
DisplayObjectSceneLayer
  
DisplayObjectSceneLayer
  
[static] Default sort function, which orders by zindex.
DisplayObjectSceneLayer
  
markDirty():void
Indicates this layer is dirty and needs to resort.
DisplayObjectSceneLayer
  
onRender():void
DisplayObjectSceneLayer
  
DisplayObjectSceneLayer
  
DisplayObjectSceneLayer
Property Detail
drawOrderFunctionproperty
public var drawOrderFunction:Function

Array.sort() compatible function used to determine draw order.

needSortproperty 
public var needSort:Boolean = false

Set to true when we need to resort the layer.

rendererListproperty 
public var rendererList:Array

All the renderers in this layer.

Constructor Detail
DisplayObjectSceneLayer()Constructor
public function DisplayObjectSceneLayer()



Method Detail
add()method
public function add(dor:DisplayObjectRenderer):void

Parameters

dor:DisplayObjectRenderer

defaultSortFunction()method 
public static function defaultSortFunction(a:DisplayObjectRenderer, b:DisplayObjectRenderer):int

Default sort function, which orders by zindex.

Parameters

a:DisplayObjectRenderer
 
b:DisplayObjectRenderer

Returns
int
markDirty()method 
public function markDirty():void

Indicates this layer is dirty and needs to resort.

onRender()method 
public function onRender():void

remove()method 
public function remove(dor:DisplayObjectRenderer):void

Parameters

dor:DisplayObjectRenderer

updateOrder()method 
public function updateOrder():void