Package | flare.core |
Class | public class Pivot3D |
Inheritance | Pivot3D ![]() |
Subclasses | Camera3D, ColladaLoader, Flare3DLoader, Flare3DLoader1, Flare3DLoader2, Flare3DLoader3, Light3D, Lines3D, Mesh3D, ParticleEmiter3D, Scene3D, Shape3D |
Represents a point, its orientation and scale in the 3d space.
The Pivot3D object can also be parent or container of other 3d objects and can be animated.
Property | Defined By | ||
---|---|---|---|
animationEnabled : Boolean = true
Activates or deactivates the animation. | Pivot3D | ||
animationMode : int = 0 | Pivot3D | ||
children : Vector.<Pivot3D> [read-only]
Returns a Pivot3D-type vector with its children. | Pivot3D | ||
components : Vector.<IComponent>
A collection vector that contains all the components of the object. | Pivot3D | ||
currentFrame : Number
Returns or sets the frame number where the pivot is situated. | Pivot3D | ||
dirty : Boolean = true
Gets or sets when the object has changed his transform matrix by hand. | Pivot3D | ||
frames : Vector.<Frame3D>
Vector that contains all the animation frames. | Pivot3D | ||
frameSpeed : Number
Returns or sets animation speed. | Pivot3D | ||
global : Matrix3D
Returns a matrix with the global position, rotation and scale of the object. | Pivot3D | ||
invGlobal : Matrix3D [read-only]
Returns a matrix with the inverse global position, rotation and scale of the object. | Pivot3D | ||
inView : Boolean [read-only] | Pivot3D | ||
isPlaying : Boolean [read-only]
Returns true if an animation is being played. | Pivot3D | ||
labels : Array
Returns or sets a vector that contains the Labels3D objects used to play and manage animations. | Pivot3D | ||
layer : int = 0
Gets or sets the layer to render the object. | Pivot3D | ||
name : String
Sets or returns the object name. | Pivot3D | ||
parent : Pivot3D
Returns or sets the object’s parent. | Pivot3D | ||
priority : int = 0
This value is for internal use to calculate the priority acording the distance from the camera during the render. | Pivot3D | ||
scaleX : Number
Increases or decreases the object scale on the X axis from its current scale. | Pivot3D | ||
scaleY : Number
Increases or decreases the object scale on the Y axis from its current scale. | Pivot3D | ||
scaleZ : Number
Increases or decreases the object scale on the Z axis from its current scale. | Pivot3D | ||
scene : Scene3D [read-only]
Gets a reference to the scene that contains the object. | Pivot3D | ||
sortMode : int
Gets ot sets the sorting mode for the object. | Pivot3D | ||
updatable : Boolean | Pivot3D | ||
userData : Object
Sets or returns an object for free use by the user. | Pivot3D | ||
visible : Boolean
Sets or returns whether the object is visible. | Pivot3D | ||
world : Matrix3D
Sets or returns the matrix of local position, rotation and scale. | Pivot3D | ||
x : Number
Returns or sets the position on the X axis. | Pivot3D | ||
y : Number
Returns or sets the position on the Y axis. | Pivot3D | ||
z : Number
Returns or sets the position on the Z axis. | Pivot3D |
Method | Defined By | ||
---|---|---|---|
Pivot3D(name:String)
Creates a new Pivot3D object. | Pivot3D | ||
Add a new object as a child. | Pivot3D | ||
addComponent(component:IComponent):Boolean
Adds a new component to the object. | Pivot3D | ||
Adds a label that refers to a given animation. | Pivot3D | ||
Creates a copy of the object and all its elements. | Pivot3D | ||
copyTransformFrom(source:Pivot3D, local:Boolean = true):void
Copies all transformations (position, rotation and scale) from another Pivot3D object. | Pivot3D | ||
download():void | Pivot3D | ||
draw(includeChildren:Boolean = true):void
Draws the object. | Pivot3D | ||
forEach(callback:Function, filterClass:Class = null, params:Object = null, includeChildren:Boolean = true):void
Excecutes a calback functions for each of his children. | Pivot3D | ||
getBackward(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the back of the object. | Pivot3D | ||
getChildByName(name:String, startIndex:int = 0, includeChildren:Boolean = true):Pivot3D
Returns the first child that matches the specified name. | Pivot3D | ||
getDir(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the front of the object. | Pivot3D | ||
getDown(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the bottom side of the object. | Pivot3D | ||
getLeft(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the left side of the object. | Pivot3D | ||
getMaterialByName(name:String, includeChildren:Boolean = true):Material3D
Returns the first material that matches the specified name. | Pivot3D | ||
getPosition(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the current position of the object. | Pivot3D | ||
getRight(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the right side of the object. | Pivot3D | ||
getRotation(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the current rotation of the object in euler angles. | Pivot3D | ||
getScale(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the current scale of the object. | Pivot3D | ||
getScreenCoords(out:Vector3D = null, camera:Camera3D = null, viewPort:Rectangle = null):Vector3D
Returns the coordinates of an object with respect to the screen. | Pivot3D | ||
getUp(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the upper side of the object. | Pivot3D | ||
globalToLocal(point:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the global space of the object into a local space. | Pivot3D | ||
globalToLocalVector(vector:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the global space of the object into a local space without translation. | Pivot3D | ||
gotoAndPlay(frame:Object, blendFrames:Number = 0, animationMode:int):void | Pivot3D | ||
gotoAndStop(frame:Object, blendFrames:Number = 0):void
Stops the animation at the specified frame. | Pivot3D | ||
hide():void
Sets whether the object is visible. | Pivot3D | ||
localToGlobal(point:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the local space into the global space. | Pivot3D | ||
localToGlobalVector(vector:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the local space of the object into a global space without translation. | Pivot3D | ||
lookAt(x:Number, y:Number, z:Number, up:Vector3D = null, smooth:Number = 1):void
Directs the object towards the specified position. | Pivot3D | ||
nextFrame():void | Pivot3D | ||
play(animationMode:int = 0):void | Pivot3D | ||
prevFrame():void | Pivot3D | ||
Removes a child of the object. | Pivot3D | ||
removeComponent(component:IComponent):Boolean
Removes a component from the object. | Pivot3D | ||
Removes a label. | Pivot3D | ||
Replaces an existing material of the object with another material. | Pivot3D | ||
resetTransforms():void
Resets the object position, rotation and scale. | Pivot3D | ||
rotateAxis(angle:Number, axis:Vector3D, pivotPoint:Vector3D = null):void
Rotates the object on the specified axis from its current position. | Pivot3D | ||
rotateX(angle:Number, local:Boolean = true, pivotPoint:Vector3D = null):void
Rotates the object on the X axis from its current position. | Pivot3D | ||
rotateY(angle:Number, local:Boolean = true, pivotPoint:Vector3D = null):void
Rotates the object on the Y axis from its current position. | Pivot3D | ||
rotateZ(angle:Number, local:Boolean = true, pivotPoint:Vector3D = null):void
Rotates the pivot on the Z axis from its current position. | Pivot3D | ||
setLayer(value:int, includeChildren:Boolean = true):void
Sets the layer to render the object and all of his children. | Pivot3D | ||
setMaterial(material:Material3D, includeChildren:Boolean = true):void
Sets a material for the object and, optionally, all its descendants. | Pivot3D | ||
setNormalOrientation(normal:Vector3D, smooth:Number = 1):void
Aligns the object to a normal. | Pivot3D | ||
setOrientation(dir:Vector3D, up:Vector3D = null, smooth:Number = 1):void
Orients the object in a specific direction. | Pivot3D | ||
setPosition(x:Number, y:Number, z:Number, smooth:Number = 1, local:Boolean = true):void
Sets the position of the object. | Pivot3D | ||
setRotation(x:Number, y:Number, z:Number):void
Sets the object rotation using euler angles. | Pivot3D | ||
setScale(x:Number, y:Number, z:Number, smooth:Number = 1):void
Sets the object scale. | Pivot3D | ||
setTranslation(x:Number = 0, y:Number = 0, z:Number = 0, local:Boolean = true):void
Translates the object from its current position to the specified distance. | Pivot3D | ||
show():void
Sets whether the object is visible. | Pivot3D | ||
startDrag(lockCenter:Boolean = false, reference:Vector3D = null):void
Lets the user drag the specified Pivot3D. | Pivot3D | ||
stop():void | Pivot3D | ||
stopDrag():void
Ends the startDrag() method. | Pivot3D | ||
translateAxis(distance:Number, axis:Vector3D):void
Translates the object on a certain axis from its current position. | Pivot3D | ||
translateX(distance:Number, local:Boolean = true):void
Translates the object on the X axis from its current position. | Pivot3D | ||
translateY(distance:Number, local:Boolean = true):void
Translates the object on the Y axis from its current position. | Pivot3D | ||
translateZ(distance:Number, local:Boolean = true):void
Translates the object on the Z axis from its current position. | Pivot3D | ||
update():void | Pivot3D | ||
updateTransforms(includeChildren:Boolean = false):void
This method is used to force the system to update the object in those cases where its matrices have been modified manually. | Pivot3D | ||
Pivot3D |
Event | Summary | Defined By | ||
---|---|---|---|---|
This event occurs when the object is added to a scene or to any other object. | Pivot3D | |||
This event occurs when the object is added to a scene. | Pivot3D | |||
This event occurs at the end of an animation. | Pivot3D | |||
This event occurs whatever the object changes his position, rotation or scale. | Pivot3D | |||
This event occurs before drag the object. | Pivot3D | |||
This event occurs before draw the object. | Pivot3D | |||
This event occurs before entering any frame. | Pivot3D | |||
This event occurs after drag the object. | Pivot3D | |||
This event occurs after draw the object. | Pivot3D | |||
This event occurs after updating every frame. | Pivot3D | |||
This event occurs when the object is removed from a scene or from any other object. | Pivot3D | |||
This event occurs when the object is removed from a scene. | Pivot3D | |||
This event occurs when the dispose method of the object itself or of a parent object is called. | Pivot3D |
Constant | Defined By | ||
---|---|---|---|
ADDED_EVENT : String = added [static]
Defines the value for the 'added' event. | Pivot3D | ||
ADDED_TO_SCENE_EVENT : String = addedToScene [static]
Defines the value for the 'addedToScene' event. | Pivot3D | ||
ANIMATION_COMPLETE_EVENT : String = animationComplete [static]
Defines the value for the 'animationComplete' event. | Pivot3D | ||
ANIMATION_LOOP_MODE : int = 0 [static] | Pivot3D | ||
ANIMATION_PING_PONG_MODE : int = 1 [static] | Pivot3D | ||
ANIMATION_STOP_MODE : int = 2 [static] | Pivot3D | ||
ENTER_DRAW_EVENT : String = enterDraw [static]
Defines the value for the 'enterDraw' event. | Pivot3D | ||
ENTER_FRAME_EVENT : String = enterFrame [static]
Defines the value for the 'enterFrame' event. | Pivot3D | ||
EXIT_DRAW_EVENT : String = exitDraw [static]
Defines the value for the 'exitDraw' event. | Pivot3D | ||
EXIT_FRAME_EVENT : String = exitFrame [static]
Defines the value for the 'exitFrame' event. | Pivot3D | ||
REMOVED_EVENT : String = removed [static]
Defines the value for the 'removed' event. | Pivot3D | ||
REMOVED_FROM_SCENE_EVENT : String = removedFromScene [static]
Defines the value for the 'removedFromScene' event. | Pivot3D | ||
SORT_CENTER : int = 1 [static] | Pivot3D | ||
SORT_FAR : int = 4 [static] | Pivot3D | ||
SORT_NEAR : int = 2 [static] | Pivot3D | ||
SORT_NONE : int = 0 [static] | Pivot3D | ||
UNLOAD_EVENT : String = unload [static]
Defines the value for the 'unload' event. | Pivot3D | ||
UPDATE_TRANSFORM_EVENT : String = updateTransform [static]
Defines the value for the 'updateTransform' event. | Pivot3D |
animationEnabled | property |
public var animationEnabled:Boolean = true
Activates or deactivates the animation. If the object is animated and this animation is being placed, the element will be blocked by the animation and will not be able to move or rotate manually; therefore, if an animated object is to be controlled, the animation must first be disabled by setting animationEnabled false.
animationMode | property |
public var animationMode:int = 0
children | property |
children:Vector.<Pivot3D>
[read-only] Returns a Pivot3D-type vector with its children.
public function get children():Vector.<Pivot3D>
components | property |
public var components:Vector.<IComponent>
A collection vector that contains all the components of the object.
currentFrame | property |
currentFrame:Number
Returns or sets the frame number where the pivot is situated. Animation frames are zero-based.
public function get currentFrame():Number
public function set currentFrame(value:Number):void
dirty | property |
public var dirty:Boolean = true
Gets or sets when the object has changed his transform matrix by hand.
See also
frames | property |
public var frames:Vector.<Frame3D>
Vector that contains all the animation frames.
frameSpeed | property |
frameSpeed:Number
Returns or sets animation speed. The default value is 1. The frame number is increased by the “frameSpeed” value in each update (“update” event) and is directly related to the number of updates per second in Device3D.
public function get frameSpeed():Number
public function set frameSpeed(value:Number):void
See also
global | property |
global:Matrix3D
Returns a matrix with the global position, rotation and scale of the object. If the object is part of a hierarchy that has been moved, rotated, scaled, etc., this property will return the matrix relative to the furthest parent that can be found. In general, this could be the scene. The “world” matrix, instead, represents the local position, rotation and scale. If the “world” matrix has been manually modified, it will have to call the updateTransforms method to update the global matrix.
public function get global():Matrix3D
public function set global(value:Matrix3D):void
See also
invGlobal | property |
invGlobal:Matrix3D
[read-only] Returns a matrix with the inverse global position, rotation and scale of the object. If the object is part of a hierarchy that has been moved, rotated, scaled, etc., this property will return the matrix relative to the furthest parent that can be found. In general, this could be the scene.
public function get invGlobal():Matrix3D
See also
inView | property |
inView:Boolean
[read-only] public function get inView():Boolean
isPlaying | property |
isPlaying:Boolean
[read-only] Returns true if an animation is being played.
public function get isPlaying():Boolean
labels | property |
public var labels:Array
Returns or sets a vector that contains the Labels3D objects used to play and manage animations.
See also
layer | property |
public var layer:int = 0
Gets or sets the layer to render the object.
name | property |
public var name:String
Sets or returns the object name.
parent | property |
parent:Pivot3D
Returns or sets the object’s parent. Setting the parent through the “parent” property has the same effect as establishing the “parent” property with the AddChild method of the Pivot3D that will be parent. It can remove parent object by setting the “parent” property to “null”.
public function get parent():Pivot3D
public function set parent(value:Pivot3D):void
See also
priority | property |
public var priority:int = 0
This value is for internal use to calculate the priority acording the distance from the camera during the render.
scaleX | property |
scaleX:Number
Increases or decreases the object scale on the X axis from its current scale. Use a value greater than one to increase or less than one to decrease. Setting the scale to 2 means that objects will be scaled to twice their original size, whereas a value of 0.5 would scale objects to one half of their original size.
public function get scaleX():Number
public function set scaleX(value:Number):void
scaleY | property |
scaleY:Number
Increases or decreases the object scale on the Y axis from its current scale. Use a value greater than one to increase or less than one to decrease. Setting the scale to 2 means that objects will be scaled to twice their original size, whereas a value of 0.5 would scale objects to one half of their original size.
public function get scaleY():Number
public function set scaleY(value:Number):void
scaleZ | property |
scaleZ:Number
Increases or decreases the object scale on the Z axis from its current scale. Use a value greater than one to increase or less than one to decrease. Setting the scale to 2 means that objects will be scaled to twice their original size, whereas a value of 0.5 would scale objects to one half their original size.
public function get scaleZ():Number
public function set scaleZ(value:Number):void
scene | property |
scene:Scene3D
[read-only] Gets a reference to the scene that contains the object.
public function get scene():Scene3D
sortMode | property |
sortMode:int
Gets ot sets the sorting mode for the object.
public function get sortMode():int
public function set sortMode(value:int):void
updatable | property |
updatable:Boolean
public function get updatable():Boolean
public function set updatable(value:Boolean):void
userData | property |
public var userData:Object
Sets or returns an object for free use by the user. The userData object may also contain variables included within the f3d files.
visible | property |
visible:Boolean
Sets or returns whether the object is visible. If the visible property is set false, the object will be hidden and so will all its descendants.
public function get visible():Boolean
public function set visible(value:Boolean):void
See also
world | property |
public var world:Matrix3D
Sets or returns the matrix of local position, rotation and scale. The world property corresponds to the local space of the object.
x | property |
x:Number
Returns or sets the position on the X axis.
public function get x():Number
public function set x(value:Number):void
y | property |
y:Number
Returns or sets the position on the Y axis.
public function get y():Number
public function set y(value:Number):void
z | property |
z:Number
Returns or sets the position on the Z axis.
public function get z():Number
public function set z(value:Number):void
Pivot3D | () | Constructor |
public function Pivot3D(name:String)
Creates a new Pivot3D object.
Parametersname:String — 3d object name.
|
addChild | () | method |
public function addChild(pivot:Pivot3D, useGlobalSpace:Boolean = false):Pivot3D
Add a new object as a child.
Parameters
pivot:Pivot3D — Object to be added.
| |
useGlobalSpace:Boolean (default = false )
|
Pivot3D — The object that has been added.
|
See also
addComponent | () | method |
public function addComponent(component:IComponent):Boolean
Adds a new component to the object.
Parameters
component:IComponent — The component to add.
|
Boolean — 'true' is the component was sucesfully added, 'false' otherwise.
|
addLabel | () | method |
public function addLabel(label:Label3D, includeChildren:Boolean = true):Label3D
Adds a label that refers to a given animation.
Parameters
label:Label3D — Label3D object.
| |
includeChildren:Boolean (default = true ) — true if labels are to be included in all the sub-objects.
|
Label3D — Returns same Label3D object that contains the label information.
|
clone | () | method |
public function clone():Pivot3D
Creates a copy of the object and all its elements.
ReturnsPivot3D — A new Pivot3D object.
|
copyTransformFrom | () | method |
public function copyTransformFrom(source:Pivot3D, local:Boolean = true):void
Copies all transformations (position, rotation and scale) from another Pivot3D object.
Parameters
source:Pivot3D — Source object from you want to copy.
| |
local:Boolean (default = true ) — true to copy from/to local coordinates, false will take global space coordinates.
|
download | () | method |
public function download():void
draw | () | method |
public function draw(includeChildren:Boolean = true):void
Draws the object. This method is generally called by the scene that contains it and manages it. However, it is possible to manage the drawing process independently from a scene. To do so, it is essential that the canvas and the camera be properly set in the Device3D class and that the calculateView method of the Camera3D class be previously called.
Parameters
includeChildren:Boolean (default = true )
|
See also
forEach | () | method |
public function forEach(callback:Function, filterClass:Class = null, params:Object = null, includeChildren:Boolean = true):void
Excecutes a calback functions for each of his children. The callback should recibe a object:Pivot3D parameter.
Parameters
callback:Function | |
filterClass:Class (default = null )
| |
params:Object (default = null )
| |
includeChildren:Boolean (default = true )
|
getBackward | () | method |
public function getBackward(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the back of the object.
Parameters
local:Boolean (default = true )
| |
out:Vector3D (default = null )
|
Vector3D — The new direction vector.
|
getChildByName | () | method |
public function getChildByName(name:String, startIndex:int = 0, includeChildren:Boolean = true):Pivot3D
Returns the first child that matches the specified name.
Parameters
name:String — Name of the object to be searched for.
| |
startIndex:int (default = 0 ) — An optional integer specifying the starting index of the search.
| |
includeChildren:Boolean (default = true ) — true to extend the search to all the hierarchy.
|
Pivot3D — The object that matches the specified name.
|
getDir | () | method |
public function getDir(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the front of the object.
Parameters
local:Boolean (default = true )
| |
out:Vector3D (default = null )
|
Vector3D — The new direction vector.
|
getDown | () | method |
public function getDown(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the bottom side of the object.
Parameters
local:Boolean (default = true )
| |
out:Vector3D (default = null )
|
Vector3D — The new direction vector.
|
getLeft | () | method |
public function getLeft(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the left side of the object.
Parameters
local:Boolean (default = true )
| |
out:Vector3D (default = null )
|
Vector3D — The new direction vector.
|
getMaterialByName | () | method |
public function getMaterialByName(name:String, includeChildren:Boolean = true):Material3D
Returns the first material that matches the specified name.
Parameters
name:String — Name of the material to be searched for.
| |
includeChildren:Boolean (default = true ) — true to extend the search to all the object hierarchy.
|
Material3D — The material that matches the specified name.
|
getPosition | () | method |
public function getPosition(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the current position of the object.
Parameters
local:Boolean (default = true )
| |
out:Vector3D (default = null )
|
Vector3D — A new vector with the current position of the object.
|
getRight | () | method |
public function getRight(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the right side of the object.
Parameters
local:Boolean (default = true )
| |
out:Vector3D (default = null )
|
Vector3D — The new direction vector.
|
getRotation | () | method |
public function getRotation(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the current rotation of the object in euler angles.
Parameters
local:Boolean (default = true )
| |
out:Vector3D (default = null )
|
Vector3D — A new vector with the current rotation of the object.
|
getScale | () | method |
public function getScale(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the current scale of the object.
Parameters
local:Boolean (default = true )
| |
out:Vector3D (default = null )
|
Vector3D — A new vector with the current scale of the object.
|
getScreenCoords | () | method |
public function getScreenCoords(out:Vector3D = null, camera:Camera3D = null, viewPort:Rectangle = null):Vector3D
Returns the coordinates of an object with respect to the screen. The returned values are relative to the viewPort size that is currently used.
Parameters
out:Vector3D (default = null ) — If a vector is specified, this vector will be filled with the returned values.
| |
camera:Camera3D (default = null )
| |
viewPort:Rectangle (default = null )
|
Vector3D — The vector with the coordinates.
|
getUp | () | method |
public function getUp(local:Boolean = true, out:Vector3D = null):Vector3D
Returns the direction vector that points to the upper side of the object.
Parameters
local:Boolean (default = true )
| |
out:Vector3D (default = null )
|
Vector3D — The new direction vector.
|
globalToLocal | () | method |
public function globalToLocal(point:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the global space of the object into a local space.
Parameters
point:Vector3D — The point to be transformed.
| |
out:Vector3D (default = null ) — Vector3D where the transformed point will be returned. If null, a new Vector3D is returned.
|
Vector3D — Vector3D with the transformed point.
|
globalToLocalVector | () | method |
public function globalToLocalVector(vector:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the global space of the object into a local space without translation. Useful to convert direction normals or vectors.
Parameters
vector:Vector3D — The point to be transformed.
| |
out:Vector3D (default = null ) — Vector3D where the transformed point will be returned. If null, a new Vector3D is returned.
|
Vector3D — Vector3D with the transformed point.
|
gotoAndPlay | () | method |
public function gotoAndPlay(frame:Object, blendFrames:Number = 0, animationMode:int):void
Parameters
frame:Object | |
blendFrames:Number (default = 0 )
| |
animationMode:int (default = NaN )
|
gotoAndStop | () | method |
public function gotoAndStop(frame:Object, blendFrames:Number = 0):void
Stops the animation at the specified frame.
Parameters
frame:Object — Frame number at which animation will be stopped. Animation frames are zero-based.
| |
blendFrames:Number (default = 0 )
|
hide | () | method |
public function hide():void
Sets whether the object is visible. Only affects the current object.
See also
localToGlobal | () | method |
public function localToGlobal(point:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the local space into the global space.
Parameters
point:Vector3D — The point to be transformed.
| |
out:Vector3D (default = null ) — The Vector3D where the transformed point will be returned. If null, a new Vector3D is returned.
|
Vector3D — If the “out” parameter is “null”, a new Vector3D object with the transformed point will be returned, or the same “out” vector.
|
localToGlobalVector | () | method |
public function localToGlobalVector(vector:Vector3D, out:Vector3D = null):Vector3D
Transforms a point of the local space of the object into a global space without translation. Useful to convert direction normals or vectors.
Parameters
vector:Vector3D — The point to be transformed.
| |
out:Vector3D (default = null ) — Vector3D where the transformed point will be returned. If null, a new Vector3D is returned.
|
Vector3D — Vector3D with the transformed point.
|
lookAt | () | method |
public function lookAt(x:Number, y:Number, z:Number, up:Vector3D = null, smooth:Number = 1):void
Directs the object towards the specified position. Coordinates are related to the local space of the object.
Parameters
x:Number — Position on x
| |
y:Number — Position on Y
| |
z:Number — Position on z
| |
up:Vector3D (default = null ) — Vector3D related to the direction of the upper side of the object. The default value is (0, 1, 0).
| |
smooth:Number (default = 1 ) — Optional interpolation value towards final transformation (0-1).
|
See also
nextFrame | () | method |
public function nextFrame():void
play | () | method |
public function play(animationMode:int = 0):void
Parameters
animationMode:int (default = 0 )
|
prevFrame | () | method |
public function prevFrame():void
removeChild | () | method |
public function removeChild(pivot:Pivot3D):Pivot3D
Removes a child of the object.
Parameters
pivot:Pivot3D — Object to be removed.
|
Pivot3D — The object that has been removed.
|
removeComponent | () | method |
public function removeComponent(component:IComponent):Boolean
Removes a component from the object.
Parameters
component:IComponent — The component to remove.
|
Boolean — 'true' if the component was sucesfully removed, 'false' otherwise or if the components was in the components list..
|
removeLabel | () | method |
public function removeLabel(label:Label3D, includeChildren:Boolean = true):Label3D
Removes a label.
Parameters
label:Label3D — Label3D object to be removed.
| |
includeChildren:Boolean (default = true ) — true if the labels of all the sub-objects are to be removed.
|
Label3D — The label has been removed.
|
replaceMaterial | () | method |
public function replaceMaterial(source:Material3D, replaceFor:Material3D, includeChildren:Boolean = true):void
Replaces an existing material of the object with another material.
Parameters
source:Material3D — Material that is to be replaced.
| |
replaceFor:Material3D — Material that is to replace the previous one.
| |
includeChildren:Boolean (default = true ) — true if children are to be included.
|
See also
resetTransforms | () | method |
public function resetTransforms():void
Resets the object position, rotation and scale.
rotateAxis | () | method |
public function rotateAxis(angle:Number, axis:Vector3D, pivotPoint:Vector3D = null):void
Rotates the object on the specified axis from its current position. The pivotPoint parameter can be used to rotate around a point.
Parameters
angle:Number — Angles to be rotated
| |
axis:Vector3D — Direction vector or axis on which to rotate.
| |
pivotPoint:Vector3D (default = null ) — Position vector that sets an anchoring point for rotation. The position must be expressed in local units.
|
rotateX | () | method |
public function rotateX(angle:Number, local:Boolean = true, pivotPoint:Vector3D = null):void
Rotates the object on the X axis from its current position. The pivotPoint parameter can be used to rotate around a point.
Parameters
angle:Number — Angles to be rotated.
| |
local:Boolean (default = true ) — true to rotate respecting current orientation, or false to rotate according to orientation relative to parent.
| |
pivotPoint:Vector3D (default = null ) — Position vector that sets an anchoring point for rotation. The position must be expressed in local units.
|
rotateY | () | method |
public function rotateY(angle:Number, local:Boolean = true, pivotPoint:Vector3D = null):void
Rotates the object on the Y axis from its current position. The pivotPoint parameter can be used to rotate around a point.
Parameters
angle:Number — Angles to be rotated.
| |
local:Boolean (default = true ) — true to rotate respecting current orientation, or false to rotate according to orientation relative to parent.
| |
pivotPoint:Vector3D (default = null ) — Position vector that sets an anchoring point for rotation. The position must be expressed in local units.
|
rotateZ | () | method |
public function rotateZ(angle:Number, local:Boolean = true, pivotPoint:Vector3D = null):void
Rotates the pivot on the Z axis from its current position. The pivotPoint parameter can be used to rotate around a point.
Parameters
angle:Number — Angles to be rotated.
| |
local:Boolean (default = true ) — true to rotate respecting current orientation, or false to rotate according to orientation relative to parent.
| |
pivotPoint:Vector3D (default = null ) — Position vector that sets an anchoring point for rotation. The position must be expressed in local units.
|
setLayer | () | method |
public function setLayer(value:int, includeChildren:Boolean = true):void
Sets the layer to render the object and all of his children.
Parameters
value:int — The layer index.
| |
includeChildren:Boolean (default = true ) — true to apply the same value to all the object hierarchy.
|
setMaterial | () | method |
public function setMaterial(material:Material3D, includeChildren:Boolean = true):void
Sets a material for the object and, optionally, all its descendants. The material will only affect Mesh3D objects that contain the Pivot3D.
Parameters
material:Material3D — Material that will be assigned.
| |
includeChildren:Boolean (default = true ) — true if all the hierarchy is to be included.
|
setNormalOrientation | () | method |
public function setNormalOrientation(normal:Vector3D, smooth:Number = 1):void
Aligns the object to a normal.
Parameters
normal:Vector3D — Normal used for alignment.
| |
smooth:Number (default = 1 ) — Optional interpolation value (0-1).
|
setOrientation | () | method |
public function setOrientation(dir:Vector3D, up:Vector3D = null, smooth:Number = 1):void
Orients the object in a specific direction.
Parameters
dir:Vector3D — Direction set for orientation.
| |
up:Vector3D (default = null ) — Upper side of the object. The default value is (0,1,0).
| |
smooth:Number (default = 1 ) — Optional interpolation value (0-1).
|
setPosition | () | method |
public function setPosition(x:Number, y:Number, z:Number, smooth:Number = 1, local:Boolean = true):void
Sets the position of the object.
Parameters
x:Number — Position on x
| |
y:Number — Position on y
| |
z:Number — Position on z
| |
smooth:Number (default = 1 ) — Optional interpolation value towards final transformation (0-1).
| |
local:Boolean (default = true )
|
setRotation | () | method |
public function setRotation(x:Number, y:Number, z:Number):void
Sets the object rotation using euler angles. Rotation is absolute, so any previous rotation will be ignored.
Parameters
x:Number — Rotation on x in angles.
| |
y:Number — Rotation on y in angles.
| |
z:Number — Rotation on z in angles.
|
setScale | () | method |
public function setScale(x:Number, y:Number, z:Number, smooth:Number = 1):void
Sets the object scale. This method sets the scale in an absolute manner; therefore, any previous scale will be ignored. Default value is 1, use a value greater than one to increase or less than 1 to decrease the scale. Setting the scale to 2 means that objects will be scaled to twice their original size, whereas a value of 0.5 would scale objects to one half of their original size.
Parameters
x:Number — Scale on x
| |
y:Number — Scale on y
| |
z:Number — Scale on z
| |
smooth:Number (default = 1 )
|
setTranslation | () | method |
public function setTranslation(x:Number = 0, y:Number = 0, z:Number = 0, local:Boolean = true):void
Translates the object from its current position to the specified distance.
Parameters
x:Number (default = 0 ) — Distance in units to translate on X axis.
| |
y:Number (default = 0 ) — Distance in units to translate on Y axis.
| |
z:Number (default = 0 ) — Distance in units to translate on Z axis.
| |
local:Boolean (default = true ) — true to translate respecting current orientation or false to translate on the coordinates relative to the parent.
|
See also
show | () | method |
public function show():void
Sets whether the object is visible. Only affects the current object.
See also
startDrag | () | method |
public function startDrag(lockCenter:Boolean = false, reference:Vector3D = null):void
Lets the user drag the specified Pivot3D. The Pivot3D remains draggable until explicitly stopped through a call to the Pivot3D.stopDrag() method, or until another Pivot3D is made draggable. Only one Pivot3D is draggable at a time.
Parameters
lockCenter:Boolean (default = false )
| |
reference:Vector3D (default = null )
|
stop | () | method |
public function stop():void
stopDrag | () | method |
public function stopDrag():void
Ends the startDrag() method. A Pivot3D that was made draggable with the startDrag() method remains draggable until a stopDrag() method is added, or until another Pivot3D becomes draggable. Only one Pivot3D is draggable at a time.
translateAxis | () | method |
public function translateAxis(distance:Number, axis:Vector3D):void
Translates the object on a certain axis from its current position.
Parameters
distance:Number — Distance to translate.
| |
axis:Vector3D — Direction vector or axis on which to translate.
|
See also
translateX | () | method |
public function translateX(distance:Number, local:Boolean = true):void
Translates the object on the X axis from its current position.
Parameters
distance:Number — Distance to translate.
| |
local:Boolean (default = true ) — true to translate respecting current orientation, or false to translate on the coordinates relative to parent.
|
See also
translateY | () | method |
public function translateY(distance:Number, local:Boolean = true):void
Translates the object on the Y axis from its current position.
Parameters
distance:Number — Distance to translate.
| |
local:Boolean (default = true ) — true to translate respecting current orientation, or false to translate on the coordinates relative to parent.
|
See also
translateZ | () | method |
public function translateZ(distance:Number, local:Boolean = true):void
Translates the object on the Z axis from its current position.
Parameters
distance:Number — Distance to translate.
| |
local:Boolean (default = true ) — true to translate respecting current orientation, or false to translate on the coordinates relative to parent.
|
See also
update | () | method |
public function update():void
updateTransforms | () | method |
public function updateTransforms(includeChildren:Boolean = false):void
This method is used to force the system to update the object in those cases where its matrices have been modified manually.
Parameters
includeChildren:Boolean (default = false ) — true to include all the hierarchy.
|
upload | () | method |
public function upload(scene:Scene3D = null, force:Boolean = false, includeChildren:Boolean = true):Boolean
Parameters
scene:Scene3D (default = null )
| |
force:Boolean (default = false )
| |
includeChildren:Boolean (default = true )
|
Boolean —
|
added | Event |
flash.events.Event
flash.events.Event
This event occurs when the object is added to a scene or to any other object.
addedToScene | Event |
flash.events.Event
flash.events.Event
This event occurs when the object is added to a scene.
animationComplete | Event |
flash.events.Event
flash.events.Event
This event occurs at the end of an animation.
changeTransform | Event |
flash.events.Event
flash.events.Event
This event occurs whatever the object changes his position, rotation or scale.
enterDrag | Event |
flash.events.Event
flash.events.Event
This event occurs before drag the object.
enterDraw | Event |
flash.events.Event
flash.events.Event
This event occurs before draw the object.
enterFrame | Event |
flash.events.Event
flash.events.Event
This event occurs before entering any frame.
exitDrag | Event |
flash.events.Event
flash.events.Event
This event occurs after drag the object.
exitDraw | Event |
flash.events.Event
flash.events.Event
This event occurs after draw the object.
exitFrame | Event |
flash.events.Event
flash.events.Event
This event occurs after updating every frame.
removed | Event |
flash.events.Event
flash.events.Event
This event occurs when the object is removed from a scene or from any other object.
removedFromScene | Event |
flash.events.Event
flash.events.Event
This event occurs when the object is removed from a scene.
unload | Event |
flash.events.Event
flash.events.Event
This event occurs when the dispose method of the object itself or of a parent object is called.
ADDED_EVENT | Constant |
public static const ADDED_EVENT:String = added
Defines the value for the 'added' event.
ADDED_TO_SCENE_EVENT | Constant |
public static const ADDED_TO_SCENE_EVENT:String = addedToScene
Defines the value for the 'addedToScene' event.
ANIMATION_COMPLETE_EVENT | Constant |
public static const ANIMATION_COMPLETE_EVENT:String = animationComplete
Defines the value for the 'animationComplete' event.
ANIMATION_LOOP_MODE | Constant |
public static const ANIMATION_LOOP_MODE:int = 0
ANIMATION_PING_PONG_MODE | Constant |
public static const ANIMATION_PING_PONG_MODE:int = 1
ANIMATION_STOP_MODE | Constant |
public static const ANIMATION_STOP_MODE:int = 2
ENTER_DRAW_EVENT | Constant |
public static const ENTER_DRAW_EVENT:String = enterDraw
Defines the value for the 'enterDraw' event.
ENTER_FRAME_EVENT | Constant |
public static const ENTER_FRAME_EVENT:String = enterFrame
Defines the value for the 'enterFrame' event.
EXIT_DRAW_EVENT | Constant |
public static const EXIT_DRAW_EVENT:String = exitDraw
Defines the value for the 'exitDraw' event.
EXIT_FRAME_EVENT | Constant |
public static const EXIT_FRAME_EVENT:String = exitFrame
Defines the value for the 'exitFrame' event.
REMOVED_EVENT | Constant |
public static const REMOVED_EVENT:String = removed
Defines the value for the 'removed' event.
REMOVED_FROM_SCENE_EVENT | Constant |
public static const REMOVED_FROM_SCENE_EVENT:String = removedFromScene
Defines the value for the 'removedFromScene' event.
SORT_CENTER | Constant |
public static const SORT_CENTER:int = 1
SORT_FAR | Constant |
public static const SORT_FAR:int = 4
SORT_NEAR | Constant |
public static const SORT_NEAR:int = 2
SORT_NONE | Constant |
public static const SORT_NONE:int = 0
UNLOAD_EVENT | Constant |
public static const UNLOAD_EVENT:String = unload
Defines the value for the 'unload' event.
UPDATE_TRANSFORM_EVENT | Constant |
public static const UPDATE_TRANSFORM_EVENT:String = updateTransform
Defines the value for the 'updateTransform' event.