Package | away3d.loaders |
Class | public class Md2 |
Inheritance | Md2 AbstractParser flash.events.EventDispatcher |
Property | Defined by | ||
---|---|---|---|
centerMeshes : Boolean
Controls the automatic centering of geometry data in the model, improving culling and the accuracy of bounding dimension values.
| AbstractParser | ||
container : Object3D
Retuns a 3d container object used for storing the parsed 3d object.
| AbstractParser | ||
fps : Number
defines the global frames per second for all animations in the Md2 file.
| Md2 | ||
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
Defines a timeout period for file parsing (in milliseconds).
| AbstractParser | ||
pcxConvert : String
Extension to use if .pcx format encountered.
| Md2 | ||
scaling : Number
A scaling factor for all geometry in the model.
| Md2 | ||
totalChunks : int
Returns the total number of data chunks available
| AbstractParser |
Method | Defined by | ||
---|---|---|---|
Md2
(init:Object = null)
Creates a new
Md2 object. | Md2 | ||
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]
Loads and parses an md2 file into a 3d mesh object.
| Md2 | ||
[static]
Creates a 3d mesh object from the raw binary data of an md2 file.
| Md2 | ||
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 |
fps | property |
public var fps:Number
defines the global frames per second for all animations in the Md2 file.
pcxConvert | property |
public var pcxConvert:String
Extension to use if .pcx format encountered. Defaults to jpg.
scaling | property |
public var scaling:Number
A scaling factor for all geometry in the model. Defaults to 1.
Md2 | () | constructor |
public function Md2(init:Object = null)
Parameters
init:Object (default = null ) — The binary data of a loaded file.
|
pcxConvert:String (default = "jpg") | |
scaling:Number (default = 1) | |
fps:Number (default = 10) |
See also
load | () | method |
public static function load(url:String, init:Object = null):Loader3D
Loads and parses an md2 file into a 3d mesh object.
Parametersurl:String — The url location of the file to load.
|
|
init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
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):Mesh
Creates a 3d mesh object from the raw binary data of an md2 file.
Parametersdata:* — The binary data of a loaded file.
|
|
init:Object (default = null ) — [optional] An initialisation object for specifying default instance properties.
|
Mesh —
A 3d mesh object representation of the md2 file.
|