Packageaway3d.loaders
Classpublic class AWData
InheritanceAWData Inheritance AbstractParser Inheritance flash.events.EventDispatcher

File loader/parser for the native .awd data file format.



Public Properties
 PropertyDefined By
 InheritedcenterMeshes : Boolean
Controls the automatic centering of geometry data in the model, improving culling and the accuracy of bounding dimension values.
AbstractParser
 Inheritedcontainer : Object3D
[read-only] Retuns a 3d container object used for storing the parsed 3d object.
AbstractParser
  customPath : String
[static]
AWData
 InheritedgeometryLibrary : GeometryLibrary
[read-only] Retuns a geometryLibrary object used for storing the parsed geometry data.
AbstractParser
 Inheritedmaterial : Material
Overrides all materials in the model.
AbstractParser
 InheritedmaterialLibrary : MaterialLibrary
[read-only] Retuns a materialLibrary object used for storing the parsed material objects.
AbstractParser
 Inheritedmaterials : Object
Overides materials in the model using name:value pairs.
AbstractParser
 InheritedparsedChunks : int
[read-only] Returns the total number of data chunks parsed
AbstractParser
 InheritedparseTimeout : int
Defines a timeout period for file parsing (in milliseconds).
AbstractParser
  pathToSources : String
[write-only] Allows to set custom path to source(s) map(s) other than set in file Standard output url from Prefab awd files is "images/filename.jpg" when set pathToSources, url becomes [newurl]filename.jpg.
AWData
 InheritedtotalChunks : int
[read-only] Returns the total number of data chunks available
AbstractParser
  url : String
[static]
AWData
Protected Properties
 PropertyDefined By
 Inheritedini : Init
Instance of the Init object used to hold and parse default property values specified by the initialiser object in the parser constructor.
AbstractParser
 Inherited_symbolLibrary : Dictionary
AbstractParser
Public Methods
 MethodDefined By
  
AWData(init:Object = null)
Creates a new AWData object.
AWData
 Inherited
addOnError(listener:Function):void
Default method for adding a parseError event listener
AbstractParser
 Inherited
addOnProgress(listener:Function):void
Default method for adding a parseProgress event listener
AbstractParser
 Inherited
addOnSuccess(listener:Function):void
Default method for adding a parseSuccess event listener
AbstractParser
  
load(url:String, init:Object = null):Loader3D
[static] Loads and parses a .awd file (The Away3D native.awd data files) into an Object3D object.
AWData
  
parse(data:*, init:Object = null):Object3D
[static] Creates an Object3D from the raw ascii data of an .awd file.
AWData
 Inherited
Parses 3d file data.
AbstractParser
 Inherited
removeOnError(listener:Function):void
Default method for removing a parseError event listener
AbstractParser
 Inherited
removeOnProgress(listener:Function):void
Default method for removing a parseProgress event listener
AbstractParser
 Inherited
removeOnSuccess(listener:Function):void
Default method for removing a parseSuccess event listener
AbstractParser
Protected Methods
 MethodDefined By
 Inherited
buildContainers(containerData:ContainerData, parent:ObjectContainer3D):void
AbstractParser
 Inherited
AbstractParser
 Inherited
AbstractParser
Events
 Event Summary Defined By
 InheritedDispatched when the 3d object parser fails to parse a file.AbstractParser
 InheritedDispatched when the 3d object parser progresses by one chunk.AbstractParser
 InheritedDispatched when the 3d object parser completes a file parse successfully.AbstractParser
Property Detail
customPathproperty
public static var customPath:String

pathToSourcesproperty 
pathToSources:String  [write-only]

Allows to set custom path to source(s) map(s) other than set in file Standard output url from Prefab awd files is "images/filename.jpg" when set pathToSources, url becomes [newurl]filename.jpg. Example: AWData.pathToSources = "mydisc/myfiles/";


Implementation
    public function set pathToSources(value:String):void
urlproperty 
public static var url:String

Constructor Detail
AWData()Constructor
public function AWData(init:Object = null)

Creates a new AWData object.

Parameters
init:Object (default = null)

See also

####INIT####
Method Detail
load()method
public static function load(url:String, init:Object = null):Loader3D

Loads and parses a .awd file (The Away3D native.awd data files) into an Object3D object.

Parameters

url:String — The url location of the .awd file to load.
 
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.

Returns
Loader3D — A 3d loader object that can be used as a placeholder in a scene while the file is loading.
parse()method 
public static function parse(data:*, init:Object = null):Object3D

Creates an Object3D from the raw ascii data of an .awd file. The Away3D native.awd data files. Exporters to awd format are available in Away3d exporters package and in PreFab3D export options.

Parameters

data:* — The ascii data of a .awd file.
 
init:Object (default = null) — [optional] An initialisation object for specifying default instance properties.

Returns
Object3D — An Object3D representation of the .awd file.