Package | away3d.loaders.parsers |
Class | public class OBJParser |
Inheritance | OBJParser ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
![]() | dataFormat : String [read-only]
The data format of the file data to be parsed. | ParserBase | |
![]() | dependencies : Vector.<ResourceDependency> [read-only]
A list of dependencies that need to be loaded and resolved for the object being parsed. | ParserBase | |
![]() | parsingComplete : Boolean [read-only] | ParserBase | |
![]() | parsingFailure : Boolean | ParserBase | |
![]() | parsingPaused : Boolean [read-only] | ParserBase | |
scale : Number [write-only]
Scaling factor applied directly to vertices data
| OBJParser |
Method | Defined By | ||
---|---|---|---|
OBJParser(scale:Number = 1)
Creates a new OBJParser object. | OBJParser | ||
![]() | isBitmapDataValid(bitmapData:BitmapData):Boolean
Validates a bitmapData loaded before assigning to a default BitmapMaterial
| ParserBase | |
![]() | parseAsync(data:*, frameLimit:Number = 30):void
Parse data (possibly containing bytearry, plain text or BitmapAsset) asynchronously, meaning that
the parser will periodically stop parsing so that the AVM may proceed to the
next frame. | ParserBase | |
supportsData(data:*):Boolean [static]
Tests whether a data block can be parsed by the parser. | OBJParser | ||
supportsType(extension:String):Boolean [static]
Indicates whether or not a given file extension is supported by the parser. | OBJParser |
Method | Defined By | ||
---|---|---|---|
![]() | addDependency(id:String, req:URLRequest, retrieveAsRawData:Boolean = false, data:* = null, suppressErrorEvents:Boolean = false):void | ParserBase | |
![]() | dieWithError(message:String = Unknown parsing error):void | ParserBase | |
![]() | finalizeAsset(asset:IAsset, name:String = null):void | ParserBase | |
![]() | finishParsing():void
Finish parsing the data. | ParserBase | |
![]() | getByteData():ByteArray | ParserBase | |
![]() | getTextData():String | ParserBase | |
![]() | hasTime():Boolean
Tests whether or not there is still time left for parsing within the maximum allowed time frame per session. | ParserBase | |
![]() | onInterval(event:TimerEvent = null):void
Called when the parsing pause interval has passed and parsing can proceed. | ParserBase | |
![]() | pauseAndRetrieveDependencies():void | ParserBase | |
proceedParsing():Boolean [override]
Parse the next block of data. | OBJParser |
scale | property |
scale:Number
[write-only] Scaling factor applied directly to vertices data
public function set scale(value:Number):void
OBJParser | () | Constructor |
public function OBJParser(scale:Number = 1)
Creates a new OBJParser object.
Parametersscale:Number (default = 1 ) — The url or id of the data or file to be parsed.
|
proceedParsing | () | method |
override protected function proceedParsing():Boolean
Parse the next block of data.
ReturnsBoolean — Whether or not more data needs to be parsed. Can be ParserBase.PARSING_DONE or
ParserBase.MORE_TO_PARSE .
|
resolveDependency | () | method |
override arcane function resolveDependency(resourceDependency:ResourceDependency):void
Resolve a dependency when it's loaded. For example, a dependency containing an ImageResource would be assigned to a Mesh instance as a BitmapMaterial, a scene graph object would be added to its intended parent. The dependency should be a member of the dependencies property.
Parameters
resourceDependency:ResourceDependency — The dependency to be resolved.
|
resolveDependencyFailure | () | method |
override arcane function resolveDependencyFailure(resourceDependency:ResourceDependency):void
Resolve a dependency loading failure. Used by parser to eventually provide a default map
Parameters
resourceDependency:ResourceDependency — The dependency to be resolved.
|
supportsData | () | method |
public static function supportsData(data:*):Boolean
Tests whether a data block can be parsed by the parser.
Parameters
data:* — The data block to potentially be parsed.
|
Boolean — Whether or not the given data is supported.
|
supportsType | () | method |
public static function supportsType(extension:String):Boolean
Indicates whether or not a given file extension is supported by the parser.
Parameters
extension:String — The file extension of a potential file to be parsed.
|
Boolean — Whether or not the given file type is supported.
|