| Package | alternativa.engine3d.loaders |
| Class | public class Parser3DS |
Creates a tree of 3d objects and a list of textures, which are used by the objects. Unsupported objects are represented by instances of Object3D. 3DS materials which have a diffuse texture are represented by TextureMaterial with null texture, which has to be set later. Information about textures is stored in the textureMaterials property. The names of the texture files are converted to lowercase. 3DS materials which have no diffuse texture are represented as FillMaterial. All faces with the same material are put into one surface which has the identifier as the name of the material. If an object has no materials, all its faces are put into default surface. This surface receives WireMaterial with gray lines.
The class has properties which affect created objects.
| Property | Defined by | ||
|---|---|---|---|
| blendMode : String Color blending mode for texture materials.
| Parser3DS | ||
| content : Object3D
[read-only] object containing all loaded objects
| Parser3DS | ||
| mobility : int The value of the
mobility property of 3d objects. | Parser3DS | ||
| precision : Number The value of the
precision | Parser3DS | ||
| repeat : Boolean The value of the
repeat | Parser3DS | ||
| scale : Number The scaling coefficient wich is applied to all parsed objects.
| Parser3DS | ||
| smooth : Boolean The value of the
smooth | Parser3DS | ||
| textureMaterials : Map
[read-only] The property contains information about textures used by the parsed objects.
| Parser3DS | ||
| Method | Defined by | ||
|---|---|---|---|
|
parse(data:ByteArray):Boolean
The method parses 3DS data.
| Parser3DS | ||
|
unload():void
Clears internal references to the loaded data.
| Parser3DS | ||
| blendMode | property |
blendMode:String [read-write]Color blending mode for texture materials.
The default value is BlendMode.NORMAL.
public function get blendMode():String
public function set blendMode(value:String):void
See also
| content | property |
content:Object3D [read-only]object containing all loaded objects
Implementation public function get content():Object3D
| mobility | property |
mobility:int [read-write]The value of the mobility property of 3d objects.
The default value is 0.
public function get mobility():int
public function set mobility(value:int):void
See also
| precision | property |
precision:Number [read-write]The value of the precision property of texture materials which are created during parsing process.
The default value is TextureMaterialPrecision.MEDIUM.
public function get precision():Number
public function set precision(value:Number):void
See also
| repeat | property |
repeat:Boolean [read-write]The value of the repeat property of texture materials which are created during parsing process.
The default value is true.
public function get repeat():Boolean
public function set repeat(value:Boolean):void
See also
| scale | property |
scale:Number [read-write]The scaling coefficient wich is applied to all parsed objects.
The default value is 1.
public function get scale():Number
public function set scale(value:Number):void
| smooth | property |
smooth:Boolean [read-write]The value of the smooth property of texture materials which are created during parsing process.
The default value is false.
public function get smooth():Boolean
public function set smooth(value:Boolean):void
See also
| textureMaterials | property |
textureMaterials:Map [read-only]The property contains information about textures used by the parsed objects. Keys of the map are names of texture materials, values are instances of TextureMapsInfo class.
public function get textureMaterials():Map
See also
| parse | () | method |
public function parse(data:ByteArray):BooleanThe method parses 3DS data. The data is read starting from the current position in the specified byte array. After data has been parsed, the object tree is available via content property. The textureMaterials property will contain information about texture materials used by the objects or will be null if there are no texture materials.
data:ByteArray — 3DS data |
Boolean — true if the data has been successfully parsed, otherwise false |
See also
| unload | () | method |
public function unload():voidClears internal references to the loaded data. The method doesn't work during loading process.