| Package | com.pblabs.rendering2D |
| Interface | public interface IScene2D |
| Implementors | DisplayObjectScene |
See also
| Property | Defined By | ||
|---|---|---|---|
| layerCount : int [read-only]
Layers are assigned positive integers between 0 and N. | IScene2D | ||
| position : Point
The location of the view onto the scene. | IScene2D | ||
| rotation : Number
Rotation in degrees about the center point of the scene. | IScene2D | ||
| sceneAlignment : SceneAlignment
How the scene is aligned relative to its position property. | IScene2D | ||
| sceneView : IUITarget
The SceneView where the contents of this scene will be displayed. | IScene2D | ||
| sceneViewBounds : Rectangle [read-only]
The region of the scene we are currently viewing. | IScene2D | ||
| trackLimitRectangle : Rectangle
If set, this clamps the camera to scroll no further than its boundaries
| IScene2D | ||
| zoom : Number
Zoom/scale factor; 1 = no zoom, less than 1 = zoom out, greater than 1 = zoom in. | IScene2D | ||
| Method | Defined By | ||
|---|---|---|---|
add(dor:DisplayObjectRenderer):void
Add a DisplayObjectRenderer to the scene; all you normally have to
do is set scene on DisplayObjectRenderer, not call this directly. | IScene2D | ||
getLayer(index:int, allocateIfAbsent:Boolean = false):DisplayObjectSceneLayer
Get the layer at specified index. | IScene2D | ||
getRenderersUnderPoint(screenPosition:Point, results:Array, mask:ObjectType = null):Boolean
Return a sorted list of the DisplayObjectRenderers under a given
screen position. | IScene2D | ||
invalidate(dirtyRenderer:DisplayObjectRenderer):void
Indicates that a renderer has changed, and must be redrawn. | IScene2D | ||
invalidateRectangle(dirty:Rectangle):void
Just like invalidate, but indicates a specific region in scene
coordinates. | IScene2D | ||
remove(dor:DisplayObjectRenderer):void
Remove a DisplayObjectRenderer from the scene; all you normally have
to do is clear scene on DisplayObjectRenderer, or destroy its owning
entity, not call this directly. | IScene2D | ||
screenPan(deltaX:int, deltaY:int):void
Pan-the view by (deltaX, deltaY) screen pixels. | IScene2D | ||
setWorldCenter(position:Point):void
Center the view on a position in world space. | IScene2D | ||
sortSpatials(array:Array):void | IScene2D | ||
transformSceneToScreen(inPos:Point):Point | IScene2D | ||
transformSceneToWorld(inPos:Point):Point | IScene2D | ||
transformScreenToScene(inPos:Point):Point | IScene2D | ||
transformScreenToWorld(inPos:Point):Point | IScene2D | ||
transformWorldToScene(inPos:Point):Point | IScene2D | ||
transformWorldToScreen(inPos:Point):Point | IScene2D | ||
| layerCount | property |
layerCount:int [read-only] Layers are assigned positive integers between 0 and N. This tells you what N is. This can be the same as how many layers there are, but you might only be using layers 2,3, and 7, in which case layerCount will be 8, but there will only be three layers.
layerCount is mostly useful in order to iterate over all the layers by calling getLayer.
public function get layerCount():intSee also
| position | property |
position:PointThe location of the view onto the scene. This is affected by sceneAlignment.
public function get position():Point public function set position(value:Point):void| rotation | property |
rotation:NumberRotation in degrees about the center point of the scene.
public function get rotation():Number public function set rotation(value:Number):void| sceneAlignment | property |
sceneAlignment:SceneAlignmentHow the scene is aligned relative to its position property.
public function get sceneAlignment():SceneAlignment public function set sceneAlignment(value:SceneAlignment):voidSee also
| sceneView | property |
sceneView:IUITargetThe SceneView where the contents of this scene will be displayed.
public function get sceneView():IUITarget public function set sceneView(value:IUITarget):void| sceneViewBounds | property |
sceneViewBounds:Rectangle [read-only] The region of the scene we are currently viewing.
public function get sceneViewBounds():Rectangle| trackLimitRectangle | property |
trackLimitRectangle:RectangleIf set, this clamps the camera to scroll no further than its boundaries
public function get trackLimitRectangle():Rectangle public function set trackLimitRectangle(value:Rectangle):void| zoom | property |
zoom:NumberZoom/scale factor; 1 = no zoom, less than 1 = zoom out, greater than 1 = zoom in.
public function get zoom():Number public function set zoom(value:Number):void| add | () | method |
public function add(dor:DisplayObjectRenderer):voidAdd a DisplayObjectRenderer to the scene; all you normally have to do is set scene on DisplayObjectRenderer, not call this directly.
Parameters
dor:DisplayObjectRenderer |
| getLayer | () | method |
public function getLayer(index:int, allocateIfAbsent:Boolean = false):DisplayObjectSceneLayerGet the layer at specified index.
Parameters
index:int — Index of layer to return.
| |
allocateIfAbsent:Boolean (default = false) — False by default. If true, will allocate a
new layer if none is present.
|
DisplayObjectSceneLayer — The requested layer.
|
| getRenderersUnderPoint | () | method |
public function getRenderersUnderPoint(screenPosition:Point, results:Array, mask:ObjectType = null):BooleanReturn a sorted list of the DisplayObjectRenderers under a given screen position.
Parameters
screenPosition:Point — Location on screen we are curious about.
| |
results:Array — An array into which DisplayObjectRenderers are added based on what is under point.
| |
mask:ObjectType (default = null) — Only renderers with one or more of these bits set on their objectMask will be returned. Null uses all types.
|
Boolean — Found something under point or not.
|
| invalidate | () | method |
public function invalidate(dirtyRenderer:DisplayObjectRenderer):voidIndicates that a renderer has changed, and must be redrawn. Only necessary if you are using layers that implement ICachingLayer (you don't by default).
Parameters
dirtyRenderer:DisplayObjectRenderer — The renderer that has changed.
|
| invalidateRectangle | () | method |
public function invalidateRectangle(dirty:Rectangle):voidJust like invalidate, but indicates a specific region in scene coordinates. All layers will have that region redrawn.
Parameters
dirty:Rectangle — The region to redraw.
|
| remove | () | method |
public function remove(dor:DisplayObjectRenderer):voidRemove a DisplayObjectRenderer from the scene; all you normally have to do is clear scene on DisplayObjectRenderer, or destroy its owning entity, not call this directly.
Parameters
dor:DisplayObjectRenderer |
| screenPan | () | method |
public function screenPan(deltaX:int, deltaY:int):voidPan-the view by (deltaX, deltaY) screen pixels. This takes into account zoom.
Parameters
deltaX:int | |
deltaY:int |
| setWorldCenter | () | method |
public function setWorldCenter(position:Point):voidCenter the view on a position in world space.
Parameters
position:Point |
| sortSpatials | () | method |
public function sortSpatials(array:Array):voidParameters
array:Array |
| transformSceneToScreen | () | method |
public function transformSceneToScreen(inPos:Point):PointParameters
inPos:Point |
Point |
| transformSceneToWorld | () | method |
public function transformSceneToWorld(inPos:Point):PointParameters
inPos:Point |
Point |
| transformScreenToScene | () | method |
public function transformScreenToScene(inPos:Point):PointParameters
inPos:Point |
Point |
| transformScreenToWorld | () | method |
public function transformScreenToWorld(inPos:Point):PointParameters
inPos:Point |
Point |
| transformWorldToScene | () | method |
public function transformWorldToScene(inPos:Point):PointParameters
inPos:Point |
Point |
| transformWorldToScreen | () | method |
public function transformWorldToScreen(inPos:Point):PointParameters
inPos:Point |
Point |