Packageaway3d.containers
Classpublic class View3D
InheritanceView3D Inheritance flash.display.Sprite

Sprite container used for storing camera, scene, session, renderer and clip references, and resolving mouse events

Public Properties
 PropertyDefined by
  background : Sprite
A background sprite positioned under the rendered scene.
View3D
  camera : Camera3D
Camera used when rendering.
View3D
  clip : Clipping
Clipping area used when rendering.
View3D
  findhit : FindHit
Traverser used to find the current object under the mouse.
View3D
  hud : Sprite
A container for 2D overlays positioned over the rendered scene.
View3D
  mouseMaterial : IUVMaterial
Current material under the mouse.
View3D
  mouseObject : Object3D
Current object under the mouse.
View3D
  mouseZeroMove : Boolean
Forces mousemove events to fire even when cursor is static.
View3D
  primitives : Array
temporary store for rendered primitives.
View3D
  renderer : IRenderer
Renderer object used to traverse the scenegraph and output the drawing primitives required to render the scene to the view.
View3D
  scene : Scene3D
Scene used when rendering.
View3D
  session : AbstractRenderSession
Session object used to draw all drawing primitives returned from the renderer to the view container.
View3D
  sourceURL : String
Optional string for storing source url.
View3D
  stats : Boolean
Enables/Disables stats panel.
View3D
  statsOpen : Boolean
Keeps track of whether the stats panel is currently open.
View3D
  statsPanel : Stats
Object instance of the stats panel.
View3D
Public Methods
 MethodDefined by
  
View3D
(init:Object = null)
Creates a new View3D object.
View3D
  
addOnMouseDown(listener:Function):void
Default method for adding a mouseDown3D event listener.
View3D
  
addOnMouseMove(listener:Function):void
Default method for adding a mouseMove3D event listener.
View3D
  
addOnMouseOut(listener:Function):void
Default method for adding a mouseOut3D event listener.
View3D
  
addOnMouseOver(listener:Function):void
Default method for adding a mouseOver3D event listener.
View3D
  
addOnMouseUp(listener:Function):void
Default method for adding a mouseUp3D event listener.
View3D
  
addSourceURL(url:String):void
Defines a source url string that can be accessed though a View Source option in the right-click menu.
View3D
  
clear():void
Clears previuosly rendered view from the session.
View3D
  
fireMouseMoveEvent(force:Boolean = false):void
Manually fires a mouseMove3D event.
View3D
  
flush():void
Completes the rendering of a view by flushing the session
View3D
  
getBitmapData():BitmapData
Returns the bitmapData of the rendered scene.
View3D
  
getContainer():DisplayObject
Returns the DisplayObject container of the rendered scene.
View3D
  
removeOnMouseDown(listener:Function):void
Default method for removing a mouseDown3D event listener.
View3D
  
removeOnMouseMove(listener:Function):void
Default method for removing a mouseMove3D event listener.
View3D
  
removeOnMouseOut(listener:Function):void
Default method for removing a mouseOut3D event listener.
View3D
  
removeOnMouseOver(listener:Function):void
Default method for removing a mouseOver3D event listener.
View3D
  
removeOnMouseUp(listener:Function):void
Default method for removing a mouseUp3D event listener.
View3D
  
render():void
Renders a snapshot of the view to the render session's view container.
View3D
Events
 EventSummaryDefined by
   Dispatched when a user presses the let hand mouse button while the cursor is over a 3d object View3D
   Dispatched when a user moves the cursor while it is over a 3d object View3D
   Dispatched when a user moves the cursor away from a 3d object View3D
   Dispatched when a user moves the cursor over a 3d object View3D
   Dispatched when a user releases the let hand mouse button while the cursor is over a 3d object View3D
Property detail
backgroundproperty
public var background:Sprite

A background sprite positioned under the rendered scene.

cameraproperty 
public var camera:Camera3D

Camera used when rendering.

See also

render()
clipproperty 
public var clip:Clipping

Clipping area used when rendering. If null, the visible edges of the screen are located with the Clipping.screen() method.

See also

render()
away3d.core.render.Clipping.scene()
findhitproperty 
public var findhit:FindHit

Traverser used to find the current object under the mouse.

See also

fireMouseEvent
hudproperty 
public var hud:Sprite

A container for 2D overlays positioned over the rendered scene.

_interactiveLayerproperty 
arcane var _interactiveLayer:Sprite
mouseMaterialproperty 
public var mouseMaterial:IUVMaterial

Current material under the mouse.

mouseObjectproperty 
public var mouseObject:Object3D

Current object under the mouse.

mouseZeroMoveproperty 
public var mouseZeroMove:Boolean

Forces mousemove events to fire even when cursor is static.

primitivesproperty 
public var primitives:Array

temporary store for rendered primitives.

rendererproperty 
renderer:IRenderer  [read-write]

Renderer object used to traverse the scenegraph and output the drawing primitives required to render the scene to the view.

Implementation
    public function get renderer():IRenderer
    public function set renderer(value:IRenderer):void
sceneproperty 
public var scene:Scene3D

Scene used when rendering.

See also

render()
sessionproperty 
session:AbstractRenderSession  [read-write]

Session object used to draw all drawing primitives returned from the renderer to the view container.

Implementation
    public function get session():AbstractRenderSession
    public function set session(value:AbstractRenderSession):void

See also

sourceURLproperty 
public var sourceURL:String

Optional string for storing source url.

statsproperty 
public var stats:Boolean

Enables/Disables stats panel.

See also

statsOpenproperty 
public var statsOpen:Boolean

Keeps track of whether the stats panel is currently open.

See also

statsPanelproperty 
public var statsPanel:Stats

Object instance of the stats panel.

See also

Constructor detail
View3D()constructor
public function View3D(init:Object = null)Parameters
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.
####INIT####
Method detail
addOnMouseDown()method
public function addOnMouseDown(listener:Function):void

Default method for adding a mouseDown3D event listener.

Parameters
listener:Function — The listener function.
addOnMouseMove()method 
public function addOnMouseMove(listener:Function):void

Default method for adding a mouseMove3D event listener.

Parameters
listener:Function — The listener function.
addOnMouseOut()method 
public function addOnMouseOut(listener:Function):void

Default method for adding a mouseOut3D event listener.

Parameters
listener:Function — The listener function.
addOnMouseOver()method 
public function addOnMouseOver(listener:Function):void

Default method for adding a mouseOver3D event listener.

Parameters
listener:Function — The listener function.
addOnMouseUp()method 
public function addOnMouseUp(listener:Function):void

Default method for adding a mouseUp3D event listener.

Parameters
listener:Function — The listener function.
addSourceURL()method 
public function addSourceURL(url:String):void

Defines a source url string that can be accessed though a View Source option in the right-click menu. Requires the stats panel to be enabled.

Parameters
url:String — The url to the source files.
clear()method 
public function clear():void

Clears previuosly rendered view from the session.

See also

session
dispatchMouseEvent()method 
arcane function dispatchMouseEvent(event:MouseEvent3D):void Parameters
event:MouseEvent3D
fireMouseMoveEvent()method 
public function fireMouseMoveEvent(force:Boolean = false):void

Manually fires a mouseMove3D event.

Parameters
force:Boolean (default = false)
flush()method 
public function flush():void

Completes the rendering of a view by flushing the session

See also

getBitmapData()method 
public function getBitmapData():BitmapData

Returns the bitmapData of the rendered scene. session is required to be an instance of BitmapRenderSession, otherwise an error is thrown.

Returns
BitmapData — The rendered view image.

Throws
— incorrect session object - require BitmapRenderSession.

See also

getContainer()method 
public function getContainer():DisplayObject

Returns the DisplayObject container of the rendered scene.

Returns
DisplayObject — The DisplayObject containing the output from the render session of the view.

See also

removeOnMouseDown()method 
public function removeOnMouseDown(listener:Function):void

Default method for removing a mouseDown3D event listener.

Parameters
listener:Function — The listener function.
removeOnMouseMove()method 
public function removeOnMouseMove(listener:Function):void

Default method for removing a mouseMove3D event listener.

Parameters
listener:Function — The listener function.
removeOnMouseOut()method 
public function removeOnMouseOut(listener:Function):void

Default method for removing a mouseOut3D event listener.

Parameters
listener:Function — The listener function.
removeOnMouseOver()method 
public function removeOnMouseOver(listener:Function):void

Default method for removing a mouseOver3D event listener.

Parameters
listener:Function — The listener function.
removeOnMouseUp()method 
public function removeOnMouseUp(listener:Function):void

Default method for removing a mouseUp3D event listener.

Parameters
listener:Function — The listener function.
render()method 
public function render():void

Renders a snapshot of the view to the render session's view container.

See also

Event detail
mouseDown3Devent 
Event object type: away3d.events.MouseEvent3D

Dispatched when a user presses the let hand mouse button while the cursor is over a 3d object

mouseMove3Devent  
Event object type: away3d.events.MouseEvent3D

Dispatched when a user moves the cursor while it is over a 3d object

mouseOut3Devent  
Event object type: away3d.events.MouseEvent3D

Dispatched when a user moves the cursor away from a 3d object

mouseOver3Devent  
Event object type: away3d.events.MouseEvent3D

Dispatched when a user moves the cursor over a 3d object

mouseUp3Devent  
Event object type: away3d.events.MouseEvent3D

Dispatched when a user releases the let hand mouse button while the cursor is over a 3d object

Wiki link
Click to go to the wiki page for ####WIKI####

Code examples

Comments