Packageaway3d.core.render
Classpublic class AbstractRenderSession
InheritanceAbstractRenderSession Inheritance flash.events.EventDispatcher
SubclassesBitmapRenderSession, SpriteRenderSession

Abstract Drawing session object containing the method used for drawing the view to screen. Not intended for direct use - use SpriteRenderSession or BitmapRenderSession.

Public Properties
 PropertyDefined by
  alpha : Number = 1
Placeholder for alpha property of containers
AbstractRenderSession
  blendMode : String
Placeholder for blendMode property of containers
AbstractRenderSession
  consumer : IPrimitiveConsumer
AbstractRenderSession
  filters : Array
Placeholder for filters property of containers
AbstractRenderSession
  graphics : Graphics
Reference to the current graphics object being used for drawing.
AbstractRenderSession
  layer : DisplayObject
AbstractRenderSession
  parent : AbstractRenderSession
AbstractRenderSession
  priconsumers : Dictionary
AbstractRenderSession
  primitives : Array
AbstractRenderSession
  renderer : IPrimitiveConsumer
AbstractRenderSession
  screenZ : Number
AbstractRenderSession
  sessions : Array
Array of child sessions.
AbstractRenderSession
  updated : Boolean
AbstractRenderSession
Public Methods
 MethodDefined by
  
Adds a session as a child of the session object.
AbstractRenderSession
  
addDisplayObject(child:DisplayObject):void
Adds a display object to the render session display list.
AbstractRenderSession
  
addOnSessionUpdate(listener:Function):void
Default method for adding a sessionUpdated event listener
AbstractRenderSession
  
clear(view:View3D):void
Clears the render session.
AbstractRenderSession
  
AbstractRenderSession
  
AbstractRenderSession
  
Duplicates the render session's properties to another render session.
AbstractRenderSession
  
AbstractRenderSession
  
getContainer(view:View3D):DisplayObject
Returns a display object representing the container for the specified view.
AbstractRenderSession
  
getLightShape(material:LayerMaterial, level:int, parent:Sprite, light:LightPrimitive):Shape
AbstractRenderSession
  
getLightShapeLayer(view:View3D):Dictionary
AbstractRenderSession
  
getShape(material:LayerMaterial, level:int, parent:Sprite):Shape
AbstractRenderSession
  
getShapeLayer(view:View3D):Dictionary
AbstractRenderSession
  
getSprite(material:LayerMaterial, level:int, parent:Sprite = null):Sprite
AbstractRenderSession
  
getSpriteLayer(view:View3D):Dictionary
AbstractRenderSession
  
getTotalFaces(view:View3D):int
AbstractRenderSession
  
Removes a child session of the session object.
AbstractRenderSession
  
removeOnSessionUpdate(listener:Function):void
Default method for removing a sessionUpdated event listener
AbstractRenderSession
  
render(view:View3D):void
AbstractRenderSession
  
renderBitmap(bitmap:BitmapData, v0:ScreenVertex, smooth:Boolean = false):void
Draws a non-scaled bitmap into the graphics object.
AbstractRenderSession
  
renderDot(color:int, alpha:Number, x:Number, y:Number, layerGraphics:Graphics = null, w:int = 1):void
Draws a rect dot at given coordinates
AbstractRenderSession
  
renderFogColor(clip:Clipping, color:int, alpha:Number):void
Draws a fog element into the graphics object.
AbstractRenderSession
  
renderLine(v0x:Number, v0y:Number, v1x:Number, v1y:Number, width:Number, color:uint, alpha:Number):void
Draws a segment element into the graphics object.
AbstractRenderSession
  
renderScaledBitmap(primitive:DrawScaledBitmap, bitmap:BitmapData, mapping:Matrix, smooth:Boolean = false):void
Draws a bitmap with a precalculated matrix into the graphics object.
AbstractRenderSession
  
renderSpriteBitmap(bitmap:BitmapData, primitive:DrawSprite, smooth:Boolean):void
Draws a billboard element with a fill bitmap into the graphics object.
AbstractRenderSession
  
renderSpriteColor(color:int, alpha:Number, primitive:DrawSprite):void
Draws a billboard element with a fill color into the graphics object.
AbstractRenderSession
  
renderTriangleBitmap(bitmap:BitmapData, uvtData:Vector, screenVertices:Array, screenIndices:Array, startIndex:Number, endIndex:Number, smooth:Boolean, repeat:Boolean, layerGraphics:Graphics = null):void
Draws a triangle element with a bitmap texture into the graphics object (Flash 10)
AbstractRenderSession
  
renderTriangleBitmapMask(bitmap:BitmapData, offX:Number, offY:Number, sc:Number, screenVertices:Array, screenIndices:Array, startIndex:Number, endIndex:Number, smooth:Boolean, repeat:Boolean, layerGraphics:Graphics = null):void
Draws a triangle element with a bitmap texture into the graphics object, with no uv transforms.
AbstractRenderSession
  
renderTriangleColor(color:int, alpha:Number, screenVertices:Array, commands:Array, screenIndices:Array, startIndex:Number, endIndex:Number, layerGraphics:Graphics = null):void
Draws a triangle element with a fill color into the graphics object.
AbstractRenderSession
  
renderTriangleLine(thickness:Number, wireColor:int, wireAlpha:Number, screenVertices:Array, commands:Array, screenIndices:Array, startIndex:Number, endIndex:Number):void
Draws a wire triangle element into the graphics object.
AbstractRenderSession
  
renderTriangleLineFill(thickness:Number, color:int, alpha:Number, wireColor:int, wireAlpha:Number, screenVertices:Array, commands:Array, screenIndices:Array, startIndex:int, endIndex:int):void
Draws a wire triangle element with a fill color into the graphics object.
AbstractRenderSession
Protected Methods
 MethodDefined by
  
createLayer():void
Creates a new render layer for rendering composite materials.
AbstractRenderSession
  
createShape(parent:Sprite):Shape
AbstractRenderSession
  
createSprite(parent:Sprite = null):Sprite
AbstractRenderSession
  
AbstractRenderSession
Events
 EventSummaryDefined by
   Dispatched when the render contents of the session require updating.AbstractRenderSession
Property detail
alphaproperty
public var alpha:Number = 1

Placeholder for alpha property of containers

blendModeproperty 
public var blendMode:String

Placeholder for blendMode property of containers

consumerproperty 
public var consumer:IPrimitiveConsumer
filtersproperty 
public var filters:Array

Placeholder for filters property of containers

graphicsproperty 
public var graphics:Graphics

Reference to the current graphics object being used for drawing.

layerproperty 
public var layer:DisplayObject
parentproperty 
public var parent:AbstractRenderSession
priconsumersproperty 
public var priconsumers:Dictionary
primitivesproperty 
public var primitives:Array
rendererproperty 
renderer:IPrimitiveConsumer  [read-write]Implementation
    public function get renderer():IPrimitiveConsumer
    public function set renderer(value:IPrimitiveConsumer):void
screenZproperty 
public var screenZ:Number
sessionsproperty 
public var sessions:Array

Array of child sessions.

_shapeActiveproperty 
arcane var _shapeActive:Array

Array for storing added displayobjects to the canvas

_shapeStoreproperty 
arcane var _shapeStore:Array

Array for storing old displayobjects to the canvas

_spriteActiveproperty 
arcane var _spriteActive:Array

Array for storing added displayobjects to the canvas

_spriteStoreproperty 
arcane var _spriteStore:Array

Array for storing old displayobjects to the canvas

updatedproperty 
public var updated:Boolean
Method detail
addChildSession()method
public function addChildSession(session:AbstractRenderSession):void

Adds a session as a child of the session object.

Parameters
session:AbstractRenderSession — The session object to be added as a child.
addDisplayObject()method 
public function addDisplayObject(child:DisplayObject):void

Adds a display object to the render session display list.

Parameters
child:DisplayObject — The display object to add.
addOnSessionUpdate()method 
public function addOnSessionUpdate(listener:Function):void

Default method for adding a sessionUpdated event listener

Parameters
listener:Function — The listener function
clear()method 
public function clear(view:View3D):void

Clears the render session.

Parameters
view:View3D
clearChildSessions()method 
public function clearChildSessions():void
clearRenderers()method 
public function clearRenderers():void
clone()method 
public function clone():AbstractRenderSession

Duplicates the render session's properties to another render session.

Returns
AbstractRenderSession — The new render session instance with duplicated properties applied
createLayer()method 
protected function createLayer():void

Creates a new render layer for rendering composite materials.

See also

createShape()method 
protected function createShape(parent:Sprite):Shape

Parameters
parent:Sprite

Returns
Shape
createSprite()method 
protected function createSprite(parent:Sprite = null):Sprite Parameters
parent:Sprite (default = null)

Returns
Sprite
getConsumer()method 
public function getConsumer(view:View3D):IPrimitiveConsumer Parameters
view:View3D

Returns
IPrimitiveConsumer
getContainer()method 
public function getContainer(view:View3D):DisplayObject

Returns a display object representing the container for the specified view.

Parameters
view:View3D — The view object being rendered.

Returns
DisplayObject — The display object container.
getLightShape()method 
public function getLightShape(material:LayerMaterial, level:int, parent:Sprite, light:LightPrimitive):Shape Parameters
material:LayerMaterial
 
level:int
 
parent:Sprite
 
light:LightPrimitive

Returns
Shape
getLightShapeLayer()method 
public function getLightShapeLayer(view:View3D):Dictionary Parameters
view:View3D

Returns
Dictionary
getShape()method 
public function getShape(material:LayerMaterial, level:int, parent:Sprite):Shape Parameters
material:LayerMaterial
 
level:int
 
parent:Sprite

Returns
Shape
getShapeLayer()method 
public function getShapeLayer(view:View3D):Dictionary Parameters
view:View3D

Returns
Dictionary
getSprite()method 
public function getSprite(material:LayerMaterial, level:int, parent:Sprite = null):Sprite Parameters
material:LayerMaterial
 
level:int
 
parent:Sprite (default = null)

Returns
Sprite
getSpriteLayer()method 
public function getSpriteLayer(view:View3D):Dictionary Parameters
view:View3D

Returns
Dictionary
getTotalFaces()method 
public function getTotalFaces(view:View3D):int Parameters
view:View3D

Returns
int
onSessionUpdate()method 
protected function onSessionUpdate(event:SessionEvent):void Parameters
event:SessionEvent
removeChildSession()method 
public function removeChildSession(session:AbstractRenderSession):void

Removes a child session of the session object.

Parameters
session:AbstractRenderSession — The session object to be removed.
removeOnSessionUpdate()method 
public function removeOnSessionUpdate(listener:Function):void

Default method for removing a sessionUpdated event listener

Parameters
listener:Function — The listener function
render()method 
public function render(view:View3D):void Parameters
view:View3D
renderBitmap()method 
public function renderBitmap(bitmap:BitmapData, v0:ScreenVertex, smooth:Boolean = false):void

Draws a non-scaled bitmap into the graphics object.

Parameters
bitmap:BitmapData
 
v0:ScreenVertex
 
smooth:Boolean (default = false)
renderDot()method 
public function renderDot(color:int, alpha:Number, x:Number, y:Number, layerGraphics:Graphics = null, w:int = 1):void

Draws a rect dot at given coordinates

Parameters
color:int
 
alpha:Number
 
x:Number
 
y:Number
 
layerGraphics:Graphics (default = null)
 
w:int (default = 1)
renderFogColor()method 
public function renderFogColor(clip:Clipping, color:int, alpha:Number):void

Draws a fog element into the graphics object.

Parameters
clip:Clipping
 
color:int
 
alpha:Number
renderLine()method 
public function renderLine(v0x:Number, v0y:Number, v1x:Number, v1y:Number, width:Number, color:uint, alpha:Number):void

Draws a segment element into the graphics object.

Parameters
v0x:Number
 
v0y:Number
 
v1x:Number
 
v1y:Number
 
width:Number
 
color:uint
 
alpha:Number
renderScaledBitmap()method 
public function renderScaledBitmap(primitive:DrawScaledBitmap, bitmap:BitmapData, mapping:Matrix, smooth:Boolean = false):void

Draws a bitmap with a precalculated matrix into the graphics object.

Parameters
primitive:DrawScaledBitmap
 
bitmap:BitmapData
 
mapping:Matrix
 
smooth:Boolean (default = false)
renderSpriteBitmap()method 
public function renderSpriteBitmap(bitmap:BitmapData, primitive:DrawSprite, smooth:Boolean):void

Draws a billboard element with a fill bitmap into the graphics object.

Parameters
bitmap:BitmapData
 
primitive:DrawSprite
 
smooth:Boolean
renderSpriteColor()method 
public function renderSpriteColor(color:int, alpha:Number, primitive:DrawSprite):void

Draws a billboard element with a fill color into the graphics object.

Parameters
color:int
 
alpha:Number
 
primitive:DrawSprite
renderTriangleBitmap()method 
public function renderTriangleBitmap(bitmap:BitmapData, uvtData:Vector, screenVertices:Array, screenIndices:Array, startIndex:Number, endIndex:Number, smooth:Boolean, repeat:Boolean, layerGraphics:Graphics = null):void

Draws a triangle element with a bitmap texture into the graphics object (Flash 10)

Parameters
bitmap:BitmapData
 
uvtData:Vector
 
screenVertices:Array
 
screenIndices:Array
 
startIndex:Number
 
endIndex:Number
 
smooth:Boolean
 
repeat:Boolean
 
layerGraphics:Graphics (default = null)
renderTriangleBitmapMask()method 
public function renderTriangleBitmapMask(bitmap:BitmapData, offX:Number, offY:Number, sc:Number, screenVertices:Array, screenIndices:Array, startIndex:Number, endIndex:Number, smooth:Boolean, repeat:Boolean, layerGraphics:Graphics = null):void

Draws a triangle element with a bitmap texture into the graphics object, with no uv transforms.

Parameters
bitmap:BitmapData
 
offX:Number
 
offY:Number
 
sc:Number
 
screenVertices:Array
 
screenIndices:Array
 
startIndex:Number
 
endIndex:Number
 
smooth:Boolean
 
repeat:Boolean
 
layerGraphics:Graphics (default = null)
renderTriangleColor()method 
public function renderTriangleColor(color:int, alpha:Number, screenVertices:Array, commands:Array, screenIndices:Array, startIndex:Number, endIndex:Number, layerGraphics:Graphics = null):void

Draws a triangle element with a fill color into the graphics object.

Parameters
color:int
 
alpha:Number
 
screenVertices:Array
 
commands:Array
 
screenIndices:Array
 
startIndex:Number
 
endIndex:Number
 
layerGraphics:Graphics (default = null)
renderTriangleLine()method 
public function renderTriangleLine(thickness:Number, wireColor:int, wireAlpha:Number, screenVertices:Array, commands:Array, screenIndices:Array, startIndex:Number, endIndex:Number):void

Draws a wire triangle element into the graphics object.

Parameters
thickness:Number
 
wireColor:int
 
wireAlpha:Number
 
screenVertices:Array
 
commands:Array
 
screenIndices:Array
 
startIndex:Number
 
endIndex:Number
renderTriangleLineFill()method 
public function renderTriangleLineFill(thickness:Number, color:int, alpha:Number, wireColor:int, wireAlpha:Number, screenVertices:Array, commands:Array, screenIndices:Array, startIndex:int, endIndex:int):void

Draws a wire triangle element with a fill color into the graphics object.

Parameters
thickness:Number
 
color:int
 
alpha:Number
 
wireColor:int
 
wireAlpha:Number
 
screenVertices:Array
 
commands:Array
 
screenIndices:Array
 
startIndex:int
 
endIndex:int
Event detail
sessionUpdatedevent 
Event object type: away3d.events.SessionEvent

Dispatched when the render contents of the session require updating.

Wiki link
Click to go to the wiki page for 'away3d.core.render.AbstractRenderSession'

Code examples

Comments