Packageaway3dlite.loaders
Classpublic class Loader3D
InheritanceLoader3D Inheritance ObjectContainer3D Inheritance Mesh Inheritance Object3D Inheritance flash.display.Sprite

Abstract loader class used as a placeholder for loading 3d content

Public Properties
 PropertyDefined by
 InheritedanimationLibrary : AnimationLibrary
Used in the loaders to store all parsed animation data contained in the model.
Object3D
  autoLoadTextures : Boolean = true
Controls the automatic loading of image files used as textures in the model.
Loader3D
 Inheritedbothsides : Boolean
Determines whether the faces in teh mesh are visible on both sides (true) or just the front side (false).
Mesh
  bytesLoaded : int
[read-only]
Loader3D
  bytesTotal : int
[read-only]
Loader3D
 Inheritedchildren : Array
Returns the children of the container as an array of 3d objects.
ObjectContainer3D
  containerData : ContainerData
Returns the the data container being used by the loaded file.
Loader3D
 Inheritedfaces : Vector
Returns the faces used in the mesh.
Mesh
 InheritedgeometryLibrary : GeometryLibrary
Used in loaders to store all parsed geometry data contained in the model.
Object3D
  handle : Object3D
[read-only] Returns a 3d object relating to the currently visible model.
Loader3D
  IOErrorText : String
[read-only]
Loader3D
 Inheritedlayer : Sprite
An optional layer sprite used to draw into inseatd of the default view.
Object3D
 Inheritedlights : Vector
Returns the lights of the container as an array of 3d lights.
ObjectContainer3D
 Inheritedmaterial : Material
Determines the global material used on the faces in the mesh.
Mesh
 InheritedmaterialLibrary : MaterialLibrary
Used in loaders to store all parsed materials contained in the model.
Object3D
 InheritedmaxPersp : Number = 0
The maximum perspective value from which the 3d object can be viewed.
Object3D
 InheritedminPersp : Number = 0
The minimum perspective value from which the 3d object can be viewed.
Object3D
  mode : String
Returns the current loading mode of the 3d object loader.
Loader3D
  parser : AbstractParser
Loader3D
 Inheritedposition : Vector3D
Returns a 3d vector representing the local position of the 3d object.
Object3D
 Inheritedscene : Scene3D
Returns the scene to which the 3d object belongs
Object3D
 InheritedsceneMatrix3D : Matrix3D
Returns a 3d matrix representing the absolute transformation of the 3d object in the scene.
Object3D
 InheritedscreenZ : Number
Returns the z-sorting position of the 3d object.
Object3D
 InheritedsortFaces : Boolean = true
Determines if the faces in the mesh are sorted.
Mesh
 InheritedsortType : String
Determines by which mechanism vertices are sorted.
Mesh
 Inheritedsprites : Vector
Returns the sprites of the container as an array of 3d sprites.
ObjectContainer3D
  texturePath : String = ""
Defines a different path for the location of image files used as textures in the model.
Loader3D
 Inheritedtype : String
Returns the type of 3d object.
Object3D
 Inheritedurl : 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
 InheritedvectorsFixed : Boolean
lock or unlock vectors when adding or removing sprites
ObjectContainer3D
 Inheritedvertices : Vector
Returns the 3d vertices used in the mesh.
ObjectContainer3D
 InheritedviewMatrix3D : Matrix3D
Returns a 3d matrix representing the absolute transformation of the 3d object in the view.
Object3D
Protected Properties
 PropertyDefined by
 Inherited_vertexNormals : Vector
Mesh
Public Methods
 MethodDefined by
  
Creates a new Loader3D object.
Loader3D
 Inherited
addChild(child:DisplayObject):DisplayObject
Adds a 3d object to the scene as a child of the container.
ObjectContainer3D
 Inherited
addFace(vs:Vector, uvs:Vector):void
Mesh
 Inherited
Adds a 3d light to the lights array of the container.
ObjectContainer3D
 Inherited
Adds a 3d sprite to the scene as a child of the container.
ObjectContainer3D
 Inherited
clone(object:Object3D = null):Object3D
Duplicates the 3d object's properties to another ObjectContainer3D object
ObjectContainer3D
 Inherited
getBoneByName(boneName:String):Bone
Returns a bone object specified by name from the child array of the container
ObjectContainer3D
 Inherited
getChildByName(childName:String):DisplayObject
Returns a 3d object specified by name from the child array of the container
ObjectContainer3D
  
loadGeometry(url:String, parser:AbstractParser):void
Loads and parses a 3d file format.
Loader3D
  
loadTextures(data:*, parser:AbstractParser):void
Parses 3d file data and loads any subsequent textures if required.
Loader3D
 Inherited
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
 Inherited
moveBackward(distance:Number):void
Moves the 3D object backwards along it's local z axis
Object3D
 Inherited
moveDown(distance:Number):void
Moves the 3D object backwards along it's local y axis
Object3D
 Inherited
moveForward(distance:Number):void
Moves the 3D object forwards along it's local z axis
Object3D
 Inherited
moveLeft(distance:Number):void
Moves the 3D object backwards along it's local x axis
Object3D
 Inherited
moveRight(distance:Number):void
Moves the 3D object forwards along it's local x axis
Object3D
 Inherited
moveUp(distance:Number):void
Moves the 3D object forwards along it's local y axis
Object3D
 Inherited
pitch(degrees:Number):void
Rotates the 3D object around it's local x-axis
Object3D
 Inherited
pushV3D(v:Vector3D, uv:Point):void
Mesh
 Inherited
removeChild(child:DisplayObject):DisplayObject
Removes a 3d object from the child array of the container.
ObjectContainer3D
 Inherited
Removes a 3d light from the lights array of the container.
ObjectContainer3D
 Inherited
Removes a 3d sprite from the sprites array of the container.
ObjectContainer3D
 Inherited
roll(degrees:Number):void
Rotates the 3D object around it's local z-axis
Object3D
 Inherited
rotate(degrees:Number, axis:Vector3D, pivotPoint:Vector3D = null):void
Rotates the 3D object around an axis by a defined degrees
Object3D
 Inherited
translate(axis:Vector3D, distance:Number):void
Moves the 3D object along a vector by a defined length
Object3D
 Inherited
yaw(degrees:Number):void
Rotates the 3D object around it's local y-axis
Object3D
Protected Methods
 MethodDefined by
 Inherited
copyMatrix3D(m1:Matrix3D, m2:Matrix3D):void
Object3D
  
notifyError():void
Loader3D
  
Loader3D
  
notifySuccess():void
Loader3D
  
onGeometryComplete(event:Event):void
Automatically fired on a geometry complete event
Loader3D
  
onGeometryError(event:IOErrorEvent):void
Automatically fired on an geometry error event.
Loader3D
  
onGeometryProgress(event:ProgressEvent):void
Automatically fired on a geometry progress event
Loader3D
  
Automatically fired on a parser complete event
Loader3D
  
Automatically fired on an parser error event.
Loader3D
  
Automatically fired on a parser progress event
Loader3D
  
onTextureComplete(event:Event):void
Automatically fired on a texture complete event
Loader3D
  
onTextureError(event:IOErrorEvent):void
Automatically fired on an texture error event.
Loader3D
  
onTextureProgress(event:ProgressEvent):void
Automatically fired on a texture progress event
Loader3D
Events
 EventSummaryDefined by
   Dispatched when the 3d object loader fails to load a file.Loader3D
   Dispatched when the 3d object loader progresses in the laoding of a file.Loader3D
   Dispatched when the 3d object loader completes a file load successfully.Loader3D
 Inherited Dispatched when a user presses the left hand mouse button while the cursor is over the 3d object.Object3D
 Inherited Dispatched when a user moves the cursor while it is over the 3d object.Object3D
 Inherited Dispatched when a user moves the cursor away from the 3d object.Object3D
 Inherited Dispatched when a user moves the cursor over the 3d object.Object3D
 Inherited Dispatched when a user releases the left hand mouse button while the cursor is over the 3d object.Object3D
 Inherited Dispatched when a user rolls out of the 3d object.Object3D
 Inherited Dispatched when a user rolls over the 3d object.Object3D
Public Constants
 ConstantDefined by
  COMPLETE : String = "complete"
Constant value string representing a completed loader mode.
Loader3D
  LOADING_GEOMETRY : String = "loading_geometry"
Constant value string representing the geometry loading mode of the 3d object loader.
Loader3D
  LOADING_TEXTURES : String = "loading_textures"
Constant value string representing the texture loading mode of the 3d object loader.
Loader3D
  PARSING_GEOMETRY : String = "parsing_geometry"
Constant value string representing the geometry parsing mode of the 3d object loader.
Loader3D
Property detail
autoLoadTexturesproperty
public var autoLoadTextures:Boolean = true

Controls the automatic loading of image files used as textures in the model. Defaults to true.

bytesLoadedproperty 
bytesLoaded:int  [read-only]Implementation
    public function get bytesLoaded():int
bytesTotalproperty 
bytesTotal:int  [read-only]Implementation
    public function get bytesTotal():int
containerDataproperty 
public var containerData:ContainerData

Returns the the data container being used by the loaded file.

handleproperty 
handle:Object3D  [read-only]

Returns a 3d object relating to the currently visible model. While a file is being loaded, this takes the form of the 3d object loader placeholder. The default placeholder is LoaderCube Once the file has been loaded and is ready to view, the handle returns the parsed 3d object file and the placeholder object is swapped in the scenegraph tree.

Implementation
    public function get handle():Object3D

See also

away3dlite.loaders.LoaderCube
IOErrorTextproperty 
IOErrorText:String  [read-only]Implementation
    public function get IOErrorText():String
modeproperty 
public var mode:String

Returns the current loading mode of the 3d object loader.

parserproperty 
public var parser:AbstractParser
texturePathproperty 
public var texturePath:String = ""

Defines a different path for the location of image files used as textures in the model. Defaults to the location of the loaded model file.

Constructor detail
Loader3D()constructor
public function Loader3D() Init Parameters
Method detail
loadGeometry()method
public function loadGeometry(url:String, parser:AbstractParser):void

Loads and parses a 3d file format.

Parameters
url:String — The url location of the file to be loaded.
 
parser:AbstractParser — The parser class to be used on the file data once loaded.
loadTextures()method 
public function loadTextures(data:*, parser:AbstractParser):void

Parses 3d file data and loads any subsequent textures if required.

Parameters
data:* — The file data to be parsed. Can be in text or binary form.
 
parser:AbstractParser — The parser class to be used on the file data.
notifyError()method 
protected function notifyError():void
notifyProgress()method 
protected function notifyProgress():void
notifySuccess()method 
protected function notifySuccess():void
onGeometryComplete()method 
protected function onGeometryComplete(event:Event):void

Automatically fired on a geometry complete event

Parameters
event:Event
onGeometryError()method 
protected function onGeometryError(event:IOErrorEvent):void

Automatically fired on an geometry error event.

Parameters
event:IOErrorEvent

See also

onGeometryProgress()method 
protected function onGeometryProgress(event:ProgressEvent):void

Automatically fired on a geometry progress event

Parameters
event:ProgressEvent
onParserComplete()method 
protected function onParserComplete(event:ParserEvent):void

Automatically fired on a parser complete event

Parameters
event:ParserEvent
onParserError()method 
protected function onParserError(event:ParserEvent):void

Automatically fired on an parser error event.

Parameters
event:ParserEvent

See also

onParserProgress()method 
protected function onParserProgress(event:ParserEvent):void

Automatically fired on a parser progress event

Parameters
event:ParserEvent
onTextureComplete()method 
protected function onTextureComplete(event:Event):void

Automatically fired on a texture complete event

Parameters
event:Event
onTextureError()method 
protected function onTextureError(event:IOErrorEvent):void

Automatically fired on an texture error event.

Parameters
event:IOErrorEvent

See also

onTextureProgress()method 
protected function onTextureProgress(event:ProgressEvent):void

Automatically fired on a texture progress event

Parameters
event:ProgressEvent
Event detail
loadErrorevent 
Event object type: away3dlite.events.Loader3DEvent

Dispatched when the 3d object loader fails to load a file.

loadProgressevent  
Event object type: away3dlite.events.Loader3DEvent

Dispatched when the 3d object loader progresses in the laoding of a file.

loadSuccessevent  
Event object type: away3dlite.events.Loader3DEvent

Dispatched when the 3d object loader completes a file load successfully.

Constant detail
COMPLETEconstant
public const COMPLETE:String = "complete"

Constant value string representing a completed loader mode.

LOADING_GEOMETRYconstant 
public const LOADING_GEOMETRY:String = "loading_geometry"

Constant value string representing the geometry loading mode of the 3d object loader.

LOADING_TEXTURESconstant 
public const LOADING_TEXTURES:String = "loading_textures"

Constant value string representing the texture loading mode of the 3d object loader.

PARSING_GEOMETRYconstant 
public const PARSING_GEOMETRY:String = "parsing_geometry"

Constant value string representing the geometry parsing mode of the 3d object loader.

Wiki link
Click to go to the wiki page for 'away3dlite.loaders.Loader3D'

Code examples

Comments