Package | away3dlite.loaders |
Class | public class AWData |
Inheritance | AWData AbstractParser flash.events.EventDispatcher |
Property | Defined by | ||
---|---|---|---|
container : Object3D
Retuns a 3d container object used for storing the parsed 3d object.
| AbstractParser | ||
geometryLibrary : GeometryLibrary
Retuns a geometryLibrary object used for storing the parsed geometry data.
| AbstractParser | ||
material : Material
Overrides all materials in the model.
| AbstractParser | ||
materialLibrary : MaterialLibrary
Retuns a materialLibrary object used for storing the parsed material objects.
| AbstractParser | ||
materials : Object
Overides materials in the model using name:value pairs.
| AbstractParser | ||
parsedChunks : int
Returns the total number of data chunks parsed
| AbstractParser | ||
parseTimeout : int = 40000
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 | ||
totalChunks : int
Returns the total number of data chunks available
| AbstractParser |
Method | Defined by | ||
---|---|---|---|
AWData
()
Creates a new
AWData object, a parser for .awd files. | AWData | ||
addOnError(listener:Function):void
Default method for adding a parseError event listener
| AbstractParser | ||
addOnProgress(listener:Function):void
Default method for adding a parseProgress event listener
| AbstractParser | ||
addOnSuccess(listener:Function):void
Default method for adding a parseSuccess event listener
| AbstractParser | ||
[static]
Parses and creates an Object3D from the raw ascii data of an .awd file.
| AWData | ||
Parses 3d file data.
| AbstractParser | ||
removeOnError(listener:Function):void
Default method for removing a parseError event listener
| AbstractParser | ||
removeOnProgress(listener:Function):void
Default method for removing a parseProgress event listener
| AbstractParser | ||
removeOnSuccess(listener:Function):void
Default method for removing a parseSuccess event listener
| AbstractParser |
pathToSources | property |
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/"; Only required for load method using Loader3D var awd:AWData = new AWData(); awd.pathToSources = "mydisc/myfiles/"; loader = new Loader3D(); loader.addEventListener(Loader3DEvent.LOAD_SUCCESS, onSuccess); loader.loadGeometry("mymodels/car.awd", awd);
Implementation public function set pathToSources(value:String):void
AWData | () | constructor |
public function AWData()
Init Parameters
See also
parse | () | method |
public static function parse(data:*, sourcesUrl:String = ""):Object3D
Parses and 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
Parametersdata:* — The ascii data of a .awd file.
|
|
sourcesUrl:String (default = " ") — [optional] If the url for the source materials muts be changed.
Standard urls set for image sources from Prefab3D awd exports is "images/filename.jpg"
Example:
[Embed(source="aircraft/Aircraft.awd", mimeType="application/octet-stream")]
private var Aircraft:Class;
[...] awaylite code
var myoutput:Object3D = AWData.parse(new Aircraft(), "mydisc/myfiles/");//path becomes then "mydisc/myfiles/filename.jpg"
scene.addChild(myoutput);
|
Object3D —
An Object3D representation of the .awd file.
|