Packageaway3dlite.core.base
Classpublic class Object3D
InheritanceObject3D Inheritance flash.display.Sprite
SubclassesCamera3D, Mesh

The base class for all 3d objects.

Public Properties
 PropertyDefined by
  animationLibrary : AnimationLibrary
Used in the loaders to store all parsed animation data contained in the model.
Object3D
  geometryLibrary : GeometryLibrary
Used in loaders to store all parsed geometry data contained in the model.
Object3D
  layer : Sprite
An optional layer sprite used to draw into inseatd of the default view.
Object3D
  materialLibrary : MaterialLibrary
Used in loaders to store all parsed materials contained in the model.
Object3D
  maxPersp : Number = 0
The maximum perspective value from which the 3d object can be viewed.
Object3D
  minPersp : Number = 0
The minimum perspective value from which the 3d object can be viewed.
Object3D
  position : Vector3D
[read-only] Returns a 3d vector representing the local position of the 3d object.
Object3D
  scene : Scene3D
[read-only] Returns the scene to which the 3d object belongs
Object3D
  sceneMatrix3D : Matrix3D
[read-only] Returns a 3d matrix representing the absolute transformation of the 3d object in the scene.
Object3D
  screenZ : Number
[read-only] Returns the z-sorting position of the 3d object.
Object3D
  type : String
Returns the type of 3d object.
Object3D
  url : String
Returns the source url of the 3d object, or the name of the family of generative geometry objects if not loaded from an external source.
Object3D
  viewMatrix3D : Matrix3D
[read-only] Returns a 3d matrix representing the absolute transformation of the 3d object in the view.
Object3D
Public Methods
 MethodDefined by
  
Creates a new Object3D object.
Object3D
  
clone(object:Object3D = null):Object3D
Duplicates the 3D object's properties to another Object3D object
Object3D
  
lookAt(target:Vector3D, upAxis:Vector3D = 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
  
moveUp(distance:Number):void
Moves the 3D object forwards along it's local y axis
Object3D
  
pitch(degrees:Number):void
Rotates the 3D object around it's local x-axis
Object3D
  
roll(degrees:Number):void
Rotates the 3D object around it's local z-axis
Object3D
  
rotate(degrees:Number, axis:Vector3D, pivotPoint:Vector3D = null):void
Rotates the 3D object around an axis by a defined degrees
Object3D
  
translate(axis:Vector3D, distance:Number):void
Moves the 3D object along a vector by a defined length
Object3D
  
yaw(degrees:Number):void
Rotates the 3D object around it's local y-axis
Object3D
Protected Methods
 MethodDefined by
  
copyMatrix3D(m1:Matrix3D, m2:Matrix3D):void
Object3D
Events
 EventSummaryDefined by
   Dispatched when a user presses the left 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 left hand mouse button while the cursor is over the 3d object.Object3D
   Dispatched when a user rolls out of the 3d object.Object3D
   Dispatched when a user rolls over the 3d object.Object3D
Property detail
animationLibraryproperty
public var animationLibrary:AnimationLibrary

Used in the loaders to store all parsed animation data contained in the model.

geometryLibraryproperty 
public var geometryLibrary:GeometryLibrary

Used in loaders to store all parsed geometry data contained in the model.

layerproperty 
public var layer:Sprite

An optional layer sprite used to draw into inseatd of the default view.

materialLibraryproperty 
public var materialLibrary:MaterialLibrary

Used in loaders to store all parsed materials contained in the model.

maxPerspproperty 
public var maxPersp:Number = 0

The maximum perspective value from which the 3d object can be viewed.

minPerspproperty 
public var minPersp:Number = 0

The minimum perspective value from which the 3d object can be viewed.

positionproperty 
position:Vector3D  [read-only]

Returns a 3d vector representing the local position of the 3d object.

Implementation
    public function get position():Vector3D
sceneproperty 
scene:Scene3D  [read-only]

Returns the scene to which the 3d object belongs

Implementation
    public function get scene():Scene3D
sceneMatrix3Dproperty 
sceneMatrix3D:Matrix3D  [read-only]

Returns a 3d matrix representing the absolute transformation of the 3d object in the scene.

Implementation
    public function get sceneMatrix3D():Matrix3D
screenZproperty 
screenZ:Number  [read-only]

Returns the z-sorting position of the 3d object.

Implementation
    public function get screenZ():Number
typeproperty 
public var type:String

Returns the type of 3d object.

urlproperty 
public var url:String

Returns the source url of the 3d object, or the name of the family of generative geometry objects if not loaded from an external source.

viewMatrix3Dproperty 
viewMatrix3D:Matrix3D  [read-only]

Returns a 3d matrix representing the absolute transformation of the 3d object in the view.

Implementation
    public function get viewMatrix3D():Matrix3D
Constructor detail
Object3D()constructor
public function Object3D() Init Parameters
Method detail
clone()method
public function clone(object:Object3D = null):Object3D

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

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

Returns
Object3D — The new object instance with duplicated properties applied
copyMatrix3D()method 
protected function copyMatrix3D(m1:Matrix3D, m2:Matrix3D):void Parameters
m1:Matrix3D
 
m2:Matrix3D
lookAt()method 
public function lookAt(target:Vector3D, upAxis:Vector3D = null):void

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

Parameters
target:Vector3D — The vector defining the point to be looked at
 
upAxis:Vector3D (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
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(degrees:Number):void

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

Parameters
degrees:Number — The degree of the rotation.
roll()method 
public function roll(degrees:Number):void

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

Parameters
degrees:Number — The degree of the rotation.
rotate()method 
public function rotate(degrees:Number, axis:Vector3D, pivotPoint:Vector3D = null):void

Rotates the 3D object around an axis by a defined degrees

Parameters
degrees:Number — The degree of the rotation.
 
axis:Vector3D — The axis or direction of rotation. The usual axes are the X_AXIS (Vector3D(1,0,0)), Y_AXIS (Vector3D(0,1,0)), and Z_AXIS (Vector3D(0,0,1)).
 
pivotPoint:Vector3D (default = null) — A point that determines the center of an object's rotation. The default pivot point for an object is its registration point.
translate()method 
public function translate(axis:Vector3D, distance:Number):void

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

Parameters
axis:Vector3D — The vector defining the axis of movement
 
distance:Number — The length of the movement
yaw()method 
public function yaw(degrees:Number):void

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

Parameters
degrees:Number — The degree of the rotation.
Event detail
mouseDownevent 
Event object type: away3dlite.events.MouseEvent3D

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

mouseMoveevent  
Event object type: away3dlite.events.MouseEvent3D

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

mouseOutevent  
Event object type: away3dlite.events.MouseEvent3D

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

mouseOverevent  
Event object type: away3dlite.events.MouseEvent3D

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

mouseUpevent  
Event object type: away3dlite.events.MouseEvent3D

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

rollOutevent  
Event object type: away3dlite.events.MouseEvent3D

Dispatched when a user rolls out of the 3d object.

rollOverevent  
Event object type: away3dlite.events.MouseEvent3D

Dispatched when a user rolls over the 3d object.

Wiki link
Click to go to the wiki page for 'away3dlite.core.base.Object3D'

Code examples

Comments