Packageaway3d.core.base
Classpublic class Object3D
InheritanceObject3D Inheritance flash.events.EventDispatcher
ImplementsIClonable
SubclassesAmbientLight3D, BaseMesh, Camera3D, ConvexBlock, DirectionalLight3D, DirSprite2D, DofSprite2D, Morpher, MovieClipSprite, ObjectContainer3D, PointLight3D, Sprite2D

Base class for all 3d objects.

Public Properties
 PropertyDefined by
  alpha : Number
An optional alpha value that can be applied to the 3d object.
Object3D
  blendMode : String
An optional blend mode that can be applied to the 3d object.
Object3D
  boundingRadius : Number
[read-only] Returns the bounding radius of the 3d object
Object3D
  extra : Object
An optional untyped object that can contain used-defined properties
Object3D
  filters : Array
An optional array of filters that can be applied to the 3d object.
Object3D
  inverseSceneTransform : Matrix3D
Object3D
  maxX : Number
[read-only] Returns the maximum x value of the 3d object
Object3D
  maxY : Number
[read-only] Returns the maximum y value of the 3d object
Object3D
  maxZ : Number
[read-only] Returns the maximum z value of the 3d object
Object3D
  minX : Number
[read-only] Returns the minimum x value of the 3d object
Object3D
  minY : Number
[read-only] Returns the minimum y value of the 3d object
Object3D
  minZ : Number
[read-only] Returns the minimum z value of the 3d object
Object3D
  mouseEnabled : Boolean = true
Defines whether mouse events are received on the 3d object
Object3D
  name : String
An optional name string for the 3d object.
Object3D
  ownCanvas : Boolean = false
Defines whether the contents of the 3d object are rendered inside it's own sprite
Object3D
  ownSession : AbstractRenderSession
Defines whether the contents of the 3d object are rendered using it's own render session
Object3D
  parent : ObjectContainer3D
Defines the parent of the 3d object.
Object3D
  position : Number3D
Defines the position of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  projection : Projection
Object3D
  rotationX : Number
Defines the euler angle of rotation of the 3d object around the x-axis, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  rotationY : Number
Defines the euler angle of rotation of the 3d object around the y-axis, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  rotationZ : Number
Defines the euler angle of rotation of the 3d object around the z-axis, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  scene : Scene3D
[read-only] Returns the parent scene of the 3d object
Object3D
  scenePosition : Number3D
[read-only] Returns the position of the 3d object, relative to the global coordinates of the Scene3D.
Object3D
  sceneTransform : Matrix3D
[read-only] Returns the transformation of the 3d object, relative to the global coordinates of the Scene3D.
Object3D
  sceneTransformed : Boolean
Object3D
  session : AbstractRenderSession
The render session used by the 3d object
Object3D
  transform : Matrix3D
Defines the transformation of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  useHandCursor : Boolean = false
Defines whether a hand cursor is displayed when the mouse rolls over the 3d object.
Object3D
  viewTransform : Matrix3D
Object3D
  visible : Boolean = true
Defines whether the 3d object is visible in the scene
Object3D
  x : Number
Defines the x coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  y : Number
Defines the y coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  z : Number
Defines the z coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.
Object3D
Protected Properties
 PropertyDefined by
  ini : Init
Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.
Object3D
Public Methods
 MethodDefined by
  
addOnDimensionsChange(listener:Function):void
Default method for adding a dimensionschanged event listener
Object3D
  
addOnMouseDown(listener:Function):void
Default method for adding a mouseDown3D event listener
Object3D
  
addOnMouseMove(listener:Function):void
Default method for adding a mouseMove3D event listener
Object3D
  
addOnMouseOut(listener:Function):void
Default method for adding a mouseOut3D event listener
Object3D
  
addOnMouseOver(listener:Function):void
Default method for adding a mouseOver3D event listener
Object3D
  
addOnMouseUp(listener:Function):void
Default method for adding a mouseUp3D event listener
Object3D
  
addOnRadiusChange(listener:Function):void
Default method for adding a radiuschanged event listener
Object3D
  
addOnSceneChange(listener:Function):void
Default method for adding a scenechanged event listener
Object3D
  
addOnSceneTransformChange(listener:Function):void
Default method for adding a scenetransformchanged event listener
Object3D
  
addOnTransformChange(listener:Function):void
Default method for adding a transformchanged event listener
Object3D
  
clone(object:* = null):*
Duplicates the 3d object's properties to another Object3D object
Object3D
  
distanceTo(obj:Object3D):Number
Calulates the absolute distance between the local 3d object position and the position of the given 3d object
Object3D
  
lookAt(target:Number3D, upAxis:Number3D = null):void
Rotates the 3d object around to face a point defined relative to the local coordinates of the parent ObjectContainer3D.
Object3D
  
moveBackward(distance:Number):void
Moves the 3d object backwards along it's local z axis
Object3D
  
moveDown(distance:Number):void
Moves the 3d object backwards along it's local y axis
Object3D
  
moveForward(distance:Number):void
Moves the 3d object forwards along it's local z axis
Object3D
  
moveLeft(distance:Number):void
Moves the 3d object backwards along it's local x axis
Object3D
  
moveRight(distance:Number):void
Moves the 3d object forwards along it's local x axis
Object3D
  
moveTo(target:Number3D):void
Moves the 3d object directly to a point in space
Object3D
  
moveUp(distance:Number):void
Moves the 3d object forwards along it's local y axis
Object3D
  
pitch(angle:Number):void
Rotates the 3d object around it's local x-axis
Object3D
  
Called from the PrimitiveTraverser when passing DrawPrimitive objects to the primitive consumer object
Object3D
  
removeOnDimensionsChange(listener:Function):void
Default method for removing a dimensionschanged event listener
Object3D
  
removeOnMouseDown(listener:Function):void
Default method for removing a mouseDown3D event listener
Object3D
  
removeOnMouseMove(listener:Function):void
Default method for removing a mouseMove3D event listener
Object3D
  
removeOnMouseOut(listener:Function):void
Default method for removing a mouseOut3D event listener
Object3D
  
removeOnMouseOver(listener:Function):void
Default method for removing a mouseOver3D event listener
Object3D
  
removeOnMouseUp(listener:Function):void
Default method for removing a mouseUp3D event listener
Object3D
  
removeOnRadiusChange(listener:Function):void
Default method for removing a radiuschanged event listener
Object3D
  
removeOnSceneChange(listener:Function):void
Default method for removing a scenechanged event listener
Object3D
  
removeOnSceneTransformChange(listener:Function):void
Default method for removing a scenetransformchanged event listener
Object3D
  
removeOnTransformChange(listener:Function):void
Default method for removing a transformchanged event listener
Object3D
  
roll(angle:Number):void
Rotates the 3d object around it's local z-axis
Object3D
  
rotate(axis:Number3D, angle:Number):void
Rotates the 3d object around an axis by a defined angle
Object3D
  
scale(scale:Number):void
Scales the contents of the 3d object.
Object3D
  
tick(time:int):void
Called by the TickTraverser.
Object3D
  
toString():String
Used to trace the values of a 3d object.
Object3D
  
translate(axis:Number3D, distance:Number):void
Moves the 3d object along a vector by a defined length
Object3D
  
traverse(traverser:Traverser):void
Used when traversing the scenegraph
Object3D
  
yaw(angle:Number):void
Rotates the 3d object around it's local y-axis
Object3D
Events
 EventSummaryDefined by
   Dispatched when the bounding dimensions of the 3d object changes.Object3D
   Dispatched when a user presses the let hand mouse button while the cursor is over the 3d object.Object3D
   Dispatched when a user moves the cursor while it is over the 3d object.Object3D
   Dispatched when a user moves the cursor away from the 3d object.Object3D
   Dispatched when a user moves the cursor over the 3d object.Object3D
   Dispatched when a user releases the let hand mouse button while the cursor is over the 3d object.Object3D
   Dispatched when the bounding radius of the 3d object changes.Object3D
   Dispatched when the parent scene of the 3d object changes Object3D
   Dispatched when the scene transform matrix of the 3d object changes.Object3D
   Dispatched when the local transform matrix of the 3d object changes.Object3D
Property detail
alphaproperty
public var alpha:Number

An optional alpha value that can be applied to the 3d object. Requires ownCanvas to be set to true.

See also

blendModeproperty 
public var blendMode:String

An optional blend mode that can be applied to the 3d object. Requires ownCanvas to be set to true.

See also

boundingRadiusproperty 
boundingRadius:Number  [read-only]

Returns the bounding radius of the 3d object

Implementation
    public function get boundingRadius():Number
extraproperty 
public var extra:Object

An optional untyped object that can contain used-defined properties

filtersproperty 
public var filters:Array

An optional array of filters that can be applied to the 3d object. Requires ownCanvas to be set to true.

See also

iniproperty 
protected var ini:Init

Instance of the Init object used to hold and parse default property values specified by the initialiser object in the 3d object constructor.

inverseSceneTransformproperty 
public var inverseSceneTransform:Matrix3D
maxXproperty 
maxX:Number  [read-only]

Returns the maximum x value of the 3d object

Implementation
    public function get maxX():Number

See also

x
maxYproperty 
maxY:Number  [read-only]

Returns the maximum y value of the 3d object

Implementation
    public function get maxY():Number

See also

y
maxZproperty 
maxZ:Number  [read-only]

Returns the maximum z value of the 3d object

Implementation
    public function get maxZ():Number

See also

z
minXproperty 
minX:Number  [read-only]

Returns the minimum x value of the 3d object

Implementation
    public function get minX():Number

See also

x
minYproperty 
minY:Number  [read-only]

Returns the minimum y value of the 3d object

Implementation
    public function get minY():Number

See also

y
minZproperty 
minZ:Number  [read-only]

Returns the minimum z value of the 3d object

Implementation
    public function get minZ():Number

See also

z
mouseEnabledproperty 
public var mouseEnabled:Boolean = true

Defines whether mouse events are received on the 3d object

nameproperty 
public var name:String

An optional name string for the 3d object. Can be used to access specific 3d object in a scene by calling the getChildByName method on the parent ObjectContainer3D.

See also

ownCanvasproperty 
public var ownCanvas:Boolean = false

Defines whether the contents of the 3d object are rendered inside it's own sprite

ownSessionproperty 
public var ownSession:AbstractRenderSession

Defines whether the contents of the 3d object are rendered using it's own render session

parentproperty 
parent:ObjectContainer3D  [read-write]

Defines the parent of the 3d object.

Implementation
    public function get parent():ObjectContainer3D
    public function set parent(value:ObjectContainer3D):void
positionproperty 
position:Number3D  [read-write]

Defines the position of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.

Implementation
    public function get position():Number3D
    public function set position(value:Number3D):void
projectionproperty 
public var projection:Projection
rotationXproperty 
rotationX:Number  [read-write]

Defines the euler angle of rotation of the 3d object around the x-axis, relative to the local coordinates of the parent ObjectContainer3D.

Implementation
    public function get rotationX():Number
    public function set rotationX(value:Number):void
rotationYproperty 
rotationY:Number  [read-write]

Defines the euler angle of rotation of the 3d object around the y-axis, relative to the local coordinates of the parent ObjectContainer3D.

Implementation
    public function get rotationY():Number
    public function set rotationY(value:Number):void
rotationZproperty 
rotationZ:Number  [read-write]

Defines the euler angle of rotation of the 3d object around the z-axis, relative to the local coordinates of the parent ObjectContainer3D.

Implementation
    public function get rotationZ():Number
    public function set rotationZ(value:Number):void
sceneproperty 
scene:Scene3D  [read-only]

Returns the parent scene of the 3d object

Implementation
    public function get scene():Scene3D
scenePositionproperty 
scenePosition:Number3D  [read-only]

Returns the position of the 3d object, relative to the global coordinates of the Scene3D.

Implementation
    public function get scenePosition():Number3D
sceneTransformproperty 
sceneTransform:Matrix3D  [read-only]

Returns the transformation of the 3d object, relative to the global coordinates of the Scene3D.

Implementation
    public function get sceneTransform():Matrix3D
sceneTransformedproperty 
public var sceneTransformed:Boolean
sessionproperty 
public var session:AbstractRenderSession

The render session used by the 3d object

transformproperty 
transform:Matrix3D  [read-write]

Defines the transformation of the 3d object, relative to the local coordinates of the parent ObjectContainer3D.

Implementation
    public function get transform():Matrix3D
    public function set transform(value:Matrix3D):void
useHandCursorproperty 
public var useHandCursor:Boolean = false

Defines whether a hand cursor is displayed when the mouse rolls over the 3d object.

viewTransformproperty 
public var viewTransform:Matrix3D
visibleproperty 
public var visible:Boolean = true

Defines whether the 3d object is visible in the scene

xproperty 
x:Number  [read-write]

Defines the x coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.

Implementation
    public function get x():Number
    public function set x(value:Number):void
yproperty 
y:Number  [read-write]

Defines the y coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.

Implementation
    public function get y():Number
    public function set y(value:Number):void
zproperty 
z:Number  [read-write]

Defines the z coordinate of the 3d object relative to the local coordinates of the parent ObjectContainer3D.

Implementation
    public function get z():Number
    public function set z(value:Number):void
Method detail
addOnDimensionsChange()method
public function addOnDimensionsChange(listener:Function):void

Default method for adding a dimensionschanged event listener

Parameters
listener:Function — The listener function
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
addOnRadiusChange()method 
public function addOnRadiusChange(listener:Function):void

Default method for adding a radiuschanged event listener

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

Default method for adding a scenechanged event listener

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

Default method for adding a scenetransformchanged event listener

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

Default method for adding a transformchanged event listener

Parameters
listener:Function — The listener function
clone()method 
public function clone(object:* = null):*

Duplicates the 3d object's properties to another Object3D object

Parameters
object:* (default = null) — [optional] The new object instance into which all properties are copied

Returns
* — The new object instance with duplicated properties applied
distanceTo()method 
public function distanceTo(obj:Object3D):Number

Calulates the absolute distance between the local 3d object position and the position of the given 3d object

Parameters
obj:Object3D — The 3d object to use for calulating the distance

Returns
Number — The scalar distance between objects

See also

lookAt()method 
public function lookAt(target:Number3D, upAxis:Number3D = null):void

Rotates the 3d object around to face a point defined relative to the local coordinates of the parent ObjectContainer3D.

Parameters
target:Number3D — The vector defining the point to be looked at
 
upAxis:Number3D (default = null) — An optional vector used to define the desired up orientation of the 3d object after rotation has occurred
moveBackward()method 
public function moveBackward(distance:Number):void

Moves the 3d object backwards along it's local z axis

Parameters
distance:Number — The length of the movement
moveDown()method 
public function moveDown(distance:Number):void

Moves the 3d object backwards along it's local y axis

Parameters
distance:Number — The length of the movement
moveForward()method 
public function moveForward(distance:Number):void

Moves the 3d object forwards along it's local z axis

Parameters
distance:Number — The length of the movement
moveLeft()method 
public function moveLeft(distance:Number):void

Moves the 3d object backwards along it's local x axis

Parameters
distance:Number — The length of the movement
moveRight()method 
public function moveRight(distance:Number):void

Moves the 3d object forwards along it's local x axis

Parameters
distance:Number — The length of the movement
moveTo()method 
public function moveTo(target:Number3D):void

Moves the 3d object directly to a point in space

Parameters
target:Number3D — A vector defining the new position of the 3d object
moveUp()method 
public function moveUp(distance:Number):void

Moves the 3d object forwards along it's local y axis

Parameters
distance:Number — The length of the movement
pitch()method 
public function pitch(angle:Number):void

Rotates the 3d object around it's local x-axis

Parameters
angle:Number — The amount of rotation in degrees
primitives()method 
public function primitives(consumer:IPrimitiveConsumer, session:AbstractRenderSession):void

Called from the PrimitiveTraverser when passing DrawPrimitive objects to the primitive consumer object

Parameters
consumer:IPrimitiveConsumer — The consumer instance
 
session:AbstractRenderSession — The render session of the 3d object

See also

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

Default method for removing a dimensionschanged event listener

Parameters
listener:Function — The listener function
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
removeOnRadiusChange()method 
public function removeOnRadiusChange(listener:Function):void

Default method for removing a radiuschanged event listener

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

Default method for removing a scenechanged event listener

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

Default method for removing a scenetransformchanged event listener

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

Default method for removing a transformchanged event listener

Parameters
listener:Function — The listener function
roll()method 
public function roll(angle:Number):void

Rotates the 3d object around it's local z-axis

Parameters
angle:Number — The amount of rotation in degrees
rotate()method 
public function rotate(axis:Number3D, angle:Number):void

Rotates the 3d object around an axis by a defined angle

Parameters
axis:Number3D — The vector defining the axis of rotation
 
angle:Number — The amount of rotation in degrees
scale()method 
public function scale(scale:Number):void

Scales the contents of the 3d object.

Parameters
scale:Number — The scaling value
tick()method 
public function tick(time:int):void

Called by the TickTraverser. Can be overridden to provide updates to the 3d object based on individual render calls from the renderer.

Parameters
time:int — The absolute time at the start of the render cycle

See also

toString()method 
public override function toString():String

Used to trace the values of a 3d object.

Returns
String — A string representation of the 3d object.
translate()method 
public function translate(axis:Number3D, distance:Number):void

Moves the 3d object along a vector by a defined length

Parameters
axis:Number3D — The vector defining the axis of movement
 
distance:Number — The length of the movement
traverse()method 
public function traverse(traverser:Traverser):void

Used when traversing the scenegraph

Parameters
traverser:Traverser — The traverser object

See also

yaw()method 
public function yaw(angle:Number):void

Rotates the 3d object around it's local y-axis

Parameters
angle:Number — The amount of rotation in degrees
Event detail
dimensionschangedevent 
Event object type: away3d.events.Object3DEvent

Dispatched when the bounding dimensions of the 3d object changes.

See also

mouseDown3Devent  
Event object type: away3d.events.MouseEvent3D

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

mouseMove3Devent  
Event object type: away3d.events.MouseEvent3D

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

mouseOut3Devent  
Event object type: away3d.events.MouseEvent3D

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

mouseOver3Devent  
Event object type: away3d.events.MouseEvent3D

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

mouseUp3Devent  
Event object type: away3d.events.MouseEvent3D

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

radiuschangedevent  
Event object type: away3d.events.Object3DEvent

Dispatched when the bounding radius of the 3d object changes.

See also

scenechangedevent  
Event object type: away3d.events.Object3DEvent

Dispatched when the parent scene of the 3d object changes

See also

scenetransformchangedevent  
Event object type: away3d.events.Object3DEvent

Dispatched when the scene transform matrix of the 3d object changes.

See also

transformchangedevent  
Event object type: away3d.events.Object3DEvent

Dispatched when the local transform matrix of the 3d object changes.

See also

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

Code examples

Comments