The Parser factory class creates instances of parser classes.
The specific parser can be specified in the create method's second parameter.
Example
To parse a 3DS file at runtime:
var parser:IParser = Parser.create( "/path/to/my/3dsfile.3ds", Parser.3DS );
public static function create(p_sFile:*, p_sParserType:String = null, p_nScale:Number = 1):IParser
The create method chooses which parser to use. This can be done automatically
by looking at the file extension or by passing the parser type String as the
second parameter.
Parameters
| p_sFile:* — Can be either a string pointing to the location of the
file or an instance of an embedded file
|
| |
| p_sParserType:String (default = null) — The parser type string
|
| |
| p_nScale:Number (default = 1) — The scale factor
|
Returns
Example
To parse a 3DS file at runtime:
var parser:IParser = Parser.create( "/path/to/my/3dsfile.3ds", Parser.3DS );
public static const ASE:String = "ASE"
Parameter that is used to specify that the ASE (ASCII Scene Export)
Parser should be used
public static const COLLADA:String = "DAE"
Parameter that is used to specify that the COLLADA (COLLAborative
Design Activity ) Parser should be used
public static const MAX_3DS:String = "3DS"
Parameter that is used to specify that the 3DS (3D Studio) Parser
should be used
ASDoc: Preliminary documentation for the Sandy 3D Engine, version 3.0.1