Packageaway3d.core.session
Classpublic class AbstractSession
InheritanceAbstractSession Inheritance flash.events.EventDispatcher
SubclassesBitmapSession, SpriteSession

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
AbstractSession
  blendMode : String
Placeholder for blendMode property of containers
AbstractSession
  consumer : Renderer
AbstractSession
  filters : Array
Placeholder for filters property of containers
AbstractSession
  graphics : Graphics
Reference to the current graphics object being used for drawing.
AbstractSession
  layer : DisplayObject
AbstractSession
  object3D : Object3D
AbstractSession
  parent : AbstractSession
AbstractSession
  priconsumers : Dictionary
AbstractSession
  primitives : Array
AbstractSession
  renderer : Renderer
AbstractSession
  screenZ : Number
AbstractSession
  sessions : Array
Array of child sessions.
AbstractSession
  updated : Boolean
AbstractSession
Public Methods
 MethodDefined by
  
Adds a session as a child of the session object.
AbstractSession
  
addDisplayObject(child:DisplayObject):void
Adds a display object to the render session display list.
AbstractSession
  
addOnSessionUpdate(listener:Function):void
Default method for adding a sessionUpdated event listener
AbstractSession
  
clear(view:View3D):void
Clears the render session.
AbstractSession
  
AbstractSession
  
AbstractSession
  
Duplicates the render session's properties to another render session.
AbstractSession
  
getContainer(view:View3D):DisplayObject
Returns a display object representing the container for the specified view.
AbstractSession
  
getLightShape(material:LayerMaterial, level:int, parent:Sprite, light:AbstractLight):Shape
AbstractSession
  
getLightShapeLayer(view:View3D):Dictionary
AbstractSession
  
AbstractSession
  
getShape(material:LayerMaterial, level:int, parent:Sprite):Shape
AbstractSession
  
getShapeLayer(view:View3D):Dictionary
AbstractSession
  
getSprite(material:LayerMaterial, level:int, parent:Sprite = null):Sprite
AbstractSession
  
getSpriteLayer(view:View3D):Dictionary
AbstractSession
  
getTotalFaces(view:View3D):int
AbstractSession
  
Removes a child session of the session object.
AbstractSession
  
removeOnSessionUpdate(listener:Function):void
Default method for removing a sessionUpdated event listener
AbstractSession
  
render(view:View3D):void
AbstractSession
  
renderDot(color:int, alpha:Number, x:Number, y:Number, layerGraphics:Graphics = null, w:int = 1):void
Draws a rect dot at given coordinates
AbstractSession
  
renderFogColor(color:int, alpha:Number, minX:Number, maxX:Number, minY:Number, maxY:Number):void
Draws a fog element into the graphics object.
AbstractSession
  
renderLine(v0x:Number, v0y:Number, v1x:Number, v1y:Number, width:Number, color:uint, alpha:Number):void
Draws a segment element into the graphics object.
AbstractSession
  
renderSpriteBitmap(bitmap:BitmapData, smooth:Boolean, priIndex:uint, viewSourceObject:ViewSourceObject, renderer:Renderer):void
Draws a billboard element with a fill bitmap into the graphics object.
AbstractSession
  
renderSpriteColor(color:int, alpha:Number, priIndex:uint, viewSourceObject:ViewSourceObject, renderer:Renderer):void
Draws a billboard element with a fill color into the graphics object.
AbstractSession
  
renderSpriteLine(thickness:Number, wireColor:int, wireAlpha:Number, priIndex:uint, viewSourceObject:ViewSourceObject, renderer:Renderer):void
Draws a billboard element with a fill color into the graphics object.
AbstractSession
  
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)
AbstractSession
  
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.
AbstractSession
  
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.
AbstractSession
  
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.
AbstractSession
  
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.
AbstractSession
Protected Methods
 MethodDefined by
  
createLayer():void
Creates a new render layer for rendering composite materials.
AbstractSession
  
createShape(parent:Sprite):Shape
AbstractSession
  
createSprite(parent:Sprite = null):Sprite
AbstractSession
  
AbstractSession
Events
 EventSummaryDefined by
   Dispatched when the render contents of the session require updating.AbstractSession
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:Renderer
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
object3Dproperty 
public var object3D:Object3D
parentproperty 
public var parent:AbstractSession
priconsumersproperty 
public var priconsumers:Dictionary
primitivesproperty 
public var primitives:Array
rendererproperty 
renderer:Renderer  [read-write]Implementation
    public function get renderer():Renderer
    public function set renderer(value:Renderer):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:AbstractSession):void

Adds a session as a child of the session object.

Parameters
session:AbstractSession — 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():AbstractSession

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

Returns
AbstractSession — 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
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:AbstractLight):Shape Parameters
material:LayerMaterial
 
level:int
 
parent:Sprite
 
light:AbstractLight

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

Returns
Dictionary
getRenderer()method 
public function getRenderer(view:View3D):Renderer Parameters
view:View3D

Returns
Renderer
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:AbstractSession):void

Removes a child session of the session object.

Parameters
session:AbstractSession — 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
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(color:int, alpha:Number, minX:Number, maxX:Number, minY:Number, maxY:Number):void

Draws a fog element into the graphics object.

Parameters
color:int
 
alpha:Number
 
minX:Number
 
maxX:Number
 
minY:Number
 
maxY: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
renderSpriteBitmap()method 
public function renderSpriteBitmap(bitmap:BitmapData, smooth:Boolean, priIndex:uint, viewSourceObject:ViewSourceObject, renderer:Renderer):void

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

Parameters
bitmap:BitmapData
 
smooth:Boolean
 
priIndex:uint
 
viewSourceObject:ViewSourceObject
 
renderer:Renderer
renderSpriteColor()method 
public function renderSpriteColor(color:int, alpha:Number, priIndex:uint, viewSourceObject:ViewSourceObject, renderer:Renderer):void

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

Parameters
color:int
 
alpha:Number
 
priIndex:uint
 
viewSourceObject:ViewSourceObject
 
renderer:Renderer
renderSpriteLine()method 
public function renderSpriteLine(thickness:Number, wireColor:int, wireAlpha:Number, priIndex:uint, viewSourceObject:ViewSourceObject, renderer:Renderer):void

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

Parameters
thickness:Number
 
wireColor:int
 
wireAlpha:Number
 
priIndex:uint
 
viewSourceObject:ViewSourceObject
 
renderer:Renderer
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.session.AbstractSession'

Code examples

Comments