Packagecom.pblabs.rendering2D
Classpublic class SpriteRenderer
InheritanceSpriteRenderer Inheritance BitmapRenderer Inheritance DisplayObjectRenderer Inheritance AnimatedComponent Inheritance EntityComponent Inheritance Object

Render Component that will load and render a ImageResource as a Sprite



Public Properties
 PropertyDefined By
 Inheritedalpha : Number
Transparency, 0 being completely transparent and 1 being opaque.
DisplayObjectRenderer
 InheritedalphaProperty : PropertyReference
If set, alpha is gotten from this property every frame.
DisplayObjectRenderer
 InheritedbitmapData : BitmapData
BitmapRenderer
 InheritedblendMode : String
Blend mode, using strings from flash.display.BlendMode
DisplayObjectRenderer
 InheritedblendModeProperty : PropertyReference
If set, blend mode is gotten from this property every frame.
DisplayObjectRenderer
 InheriteddisplayObject : DisplayObject
[override]
BitmapRenderer
  failed : Boolean
[read-only] Indicates if the ImageResource has failed loading
SpriteRenderer
  fileName : String
Resource (file)name of the ImageResource
SpriteRenderer
 InheritedisRegistered : Boolean
[read-only] Whether or not the component is currently registered with an entity.
EntityComponent
 InheritedlayerIndex : int
In what layer of the scene is this renderer drawn?
DisplayObjectRenderer
 InheritedlayerIndexProperty : PropertyReference
If set, the layer index is gotten from this property every frame.
DisplayObjectRenderer
  loaded : Boolean
[read-only] Indicates if the ImageResource has been loaded
SpriteRenderer
  loading : Boolean
[read-only] Indicates if the resource loading is in progress
SpriteRenderer
 InheritedlocalBounds : Rectangle
[read-only]
DisplayObjectRenderer
 Inheritedmodifiers : Array
Array with BitmapData modifiers that will be applied
BitmapRenderer
 InheritedmouseEnabled : Boolean
BitmapRenderer
 Inheritedname : String
[read-only] The name given to the component when it is added to an entity.
EntityComponent
 InheritedobjectMask : ObjectType
The types for this object; used for picking queries primarily.
DisplayObjectRenderer
 Inheritedowner : IEntity
A reference to the entity that this component currently belongs to.
EntityComponent
 Inheritedposition : Point
Position of the renderer in scene space.
DisplayObjectRenderer
 InheritedpositionOffset : Point
Sets a position offset that will offset the sprite.
DisplayObjectRenderer
 InheritedpositionProperty : PropertyReference
If set, position is gotten from this property every frame.
DisplayObjectRenderer
 InheritedregisterForUpdates : Boolean
Set to register/unregister for frame updates.
AnimatedComponent
 InheritedregistrationPoint : Point
The registration point can be used to offset the sprite so that rotation and scaling work properly.
DisplayObjectRenderer
 InheritedregistrationPointProperty : PropertyReference
If set, our registration point is gotten from this property every frame.
DisplayObjectRenderer
 InheritedrenderKey : int = 0
Reference value used for sorting in some scenes.
DisplayObjectRenderer
 InheritedrenderPosition : Point
[read-only] Where in the scene will this object be rendered?
DisplayObjectRenderer
  resource : ImageResource
[read-only] Loaded ImageResource
SpriteRenderer
 Inheritedrotation : Number
Rotation in degrees, with 0 being Y+.
DisplayObjectRenderer
 InheritedrotationOffset : Number
Rotation offset applied to the child DisplayObject.
DisplayObjectRenderer
 InheritedrotationProperty : PropertyReference
If set, rotation is gotten from this property every frame.
DisplayObjectRenderer
 Inheritedscale : Point
You can scale things on the X and Y axes.
DisplayObjectRenderer
 InheritedscaleProperty : PropertyReference
If set, scale is gotten from this property every frame.
DisplayObjectRenderer
 Inheritedscene : IScene2D
The scene which is responsible for drawing this renderer.
DisplayObjectRenderer
 InheritedsceneBounds : Rectangle
[read-only] Our bounds in scene coordinates.
DisplayObjectRenderer
 Inheritedsize : Point
Explicitly set the size.
DisplayObjectRenderer
 InheritedsizeProperty : PropertyReference
If set, size is determined by this property every frame.
DisplayObjectRenderer
 Inheritedsmoothing : Boolean
BitmapRenderer
 InheritedsnapToNearestPixels : Boolean = true
if set this to false, positions will be handeled with numbers insteed of integers makes slow movement smoother for example
DisplayObjectRenderer
 InheritedupdatePriority : Number = 0.0
The update priority for this component.
AnimatedComponent
 InheritedworldPosition : Point
Convenience method to allow placing the renderer in world coordinates.
DisplayObjectRenderer
 Inheritedx : Number
The x value of our scene space position.
DisplayObjectRenderer
 Inheritedy : Number
The y component of our scene space position.
DisplayObjectRenderer
 InheritedzIndex : int
By default, layers are sorted based on the z-index, from small to large.
DisplayObjectRenderer
 InheritedzIndexProperty : PropertyReference
If set, our z-index is gotten from this property every frame.
DisplayObjectRenderer
Protected Properties
 PropertyDefined By
 Inherited_alpha : Number = 1
DisplayObjectRenderer
 Inheritedbitmap : Bitmap
BitmapRenderer
 Inherited_blendMode : String = normal
DisplayObjectRenderer
 Inherited_displayObject : DisplayObject
DisplayObjectRenderer
 Inherited_hitTestDirty : Boolean = true
DisplayObjectRenderer
 Inherited_inScene : Boolean = false
DisplayObjectRenderer
 Inherited_lastLayerIndex : int = -1
DisplayObjectRenderer
 Inherited_layerIndex : int = 0
DisplayObjectRenderer
 Inherited_layerIndexDirty : Boolean = true
DisplayObjectRenderer
 Inherited_mouseEnabled : Boolean = false
BitmapRenderer
 Inherited_position : Point
DisplayObjectRenderer
 Inherited_positionOffset : Point
DisplayObjectRenderer
 Inherited_registrationPoint : Point
DisplayObjectRenderer
 Inherited_rotation : Number = 0
DisplayObjectRenderer
 Inherited_rotationOffset : Number = 0
DisplayObjectRenderer
 Inherited_scale : Point
DisplayObjectRenderer
 Inherited_scene : IScene2D
DisplayObjectRenderer
 Inherited_size : Point
DisplayObjectRenderer
 Inherited_smoothing : Boolean = false
BitmapRenderer
 Inherited_transformDirty : Boolean = true
DisplayObjectRenderer
 Inherited_transformMatrix : Matrix
DisplayObjectRenderer
 Inherited_zIndex : int = 0
DisplayObjectRenderer
 Inherited_zIndexDirty : Boolean = true
DisplayObjectRenderer
Public Methods
 MethodDefined By
  
Constructor
SpriteRenderer
 Inherited
drawPixels(objectToScreen:Matrix, renderTarget:BitmapData):void
BitmapRenderer
 Inherited
isPixelPathActive(objectToScreen:Matrix):Boolean
BitmapRenderer
 Inherited
onFrame(elapsed:Number):void
[override]
DisplayObjectRenderer
 Inherited
pointOccupied(worldPosition:Point, mask:ObjectType):Boolean
[override]
BitmapRenderer
 Inherited
register(owner:IEntity, name:String):void
Registers the component with an entity.
EntityComponent
 Inherited
reset():void
This is called by an entity on all of its components any time a component is added or removed.
EntityComponent
 Inherited
transformObjectToWorld(p:Point):Point
Transform a point from object space to world space.
DisplayObjectRenderer
 Inherited
transformWorldToObject(p:Point):Point
Transform a point from world space to object space.
DisplayObjectRenderer
 Inherited
unregister():void
Unregisters the component from an entity.
EntityComponent
 Inherited
updateTransform(updateProps:Boolean = false):void
Update the object's transform based on its current state.
DisplayObjectRenderer
Protected Methods
 MethodDefined By
 Inherited
addToScene():void
DisplayObjectRenderer
  
[override]
SpriteRenderer
 Inherited
modify(data:BitmapData):BitmapData
BitmapRenderer
  
onAdd():void
[override]
SpriteRenderer
  
onRemove():void
[override]
SpriteRenderer
 Inherited
onReset():void
This is called anytime a component is added or removed from the owner entity.
EntityComponent
 Inherited
DisplayObjectRenderer
 Inherited
DisplayObjectRenderer
Protected Constants
 ConstantDefined By
 InheritedzeroPoint : Point
[static]
BitmapRenderer
Property Detail
failedproperty
failed:Boolean  [read-only]

Indicates if the ImageResource has failed loading


Implementation
    public function get failed():Boolean
fileNameproperty 
fileName:String

Resource (file)name of the ImageResource


Implementation
    public function get fileName():String
    public function set fileName(value:String):void
loadedproperty 
loaded:Boolean  [read-only]

Indicates if the ImageResource has been loaded


Implementation
    public function get loaded():Boolean
loadingproperty 
loading:Boolean  [read-only]

Indicates if the resource loading is in progress


Implementation
    public function get loading():Boolean
resourceproperty 
resource:ImageResource  [read-only]

Loaded ImageResource


Implementation
    public function get resource():ImageResource
Constructor Detail
SpriteRenderer()Constructor
public function SpriteRenderer()

Constructor

Method Detail
dataModified()method
override protected function dataModified():void

onAdd()method 
override protected function onAdd():void

onRemove()method 
override protected function onRemove():void