| Package | alternativa.engine3d.loaders |
| Class | public class Loader3DS |
| Inheritance | Loader3DS Loader3D flash.events.EventDispatcher |
The class implements functionality needed for loading a 3DS model from specified URL. If the model uses textures, then they have to be placed in the same folder as the model.
The next entities are loaded from a 3DS file:
TextureMaterial instance, otherwise as a FillMaterial instance. For each texture material a lightmap can be specified. If size of a lightmap and size of corresponding diffuse texture are different, then the lightmap is resized to match dimensions of the diffuse texture. If an error occurs during texture loading, the texture is replaced by stub texture.
In the loaded objects all faces with the same material are put in the same surface whose indetifier matches the name of the material. If an object has no materials, then all faces are put in a single surface which gets a wire material.
See also
| Property | Defined by | ||
|---|---|---|---|
| blendMode : String The value of the
blendMode property of texture materials which are created during loading process. | Loader3DS | ||
![]() | content : Object3D
The container with all loaded objects.
| Loader3D | |
| loadMaterials : Boolean = true If
false, then materials will not be loaded. | Loader3DS | ||
| mobility : int The value of the
mobility property of 3d objects. | Loader3DS | ||
| precision : Number The value of the
precision property of texture materials which are created during loading process. | Loader3DS | ||
| repeat : Boolean The value of the
repeat property of texture materials which are created during loading process. | Loader3DS | ||
| scale : Number The scaling coefficient wich is applied to all loaded objects.
| Loader3DS | ||
| smooth : Boolean The value of the
smooth property of texture materials which are created during loading process. | Loader3DS | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new instance of the class.
| Loader3DS | ||
![]() |
close():void
Stops current loading process.
| Loader3D | |
![]() |
load(url:String, loaderContext:LoaderContext = null):void
Loads a scene from specified URL.
| Loader3D | |
![]() |
loadBytes(data:ByteArray, baseUrl:String = null, loaderContext:LoaderContext = null):void
Loads data from a byte array.
| Loader3D | |
![]() |
unload():void
Clears internal references to the loaded data.
| Loader3D | |
| Method | Defined by | ||
|---|---|---|---|
![]() |
clean():void
| Loader3D | |
|
closeInternal():void
| Loader3DS | ||
![]() |
complete():void
| Loader3D | |
![]() |
onMainLoadingError(e:ErrorEvent):void
| Loader3D | |
|
parse(data:ByteArray):void
| Loader3DS | ||
![]() |
setState(state:int):void
| Loader3D | |
|
unloadInternal():void
| Loader3DS | ||
| blendMode | property |
blendMode:String [read-write]The value of the blendMode property of texture materials which are created during loading process.
The default value is BlendMode.NORMAL.
public function get blendMode():String
public function set blendMode(value:String):void
See also
| loadMaterials | property |
public var loadMaterials:Boolean = trueIf false, then materials will not be loaded.
The default value is true.
| 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 loading 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 loading 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 loaded 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 loading process.
The default value is false.
public function get smooth():Boolean
public function set smooth(value:Boolean):void
See also
| Loader3DS | () | constructor |
public function Loader3DS()Creates a new instance of the class.
| closeInternal | () | method |
protected override function closeInternal():void| parse | () | method |
protected override function parse(data:ByteArray):voidParameters
data:ByteArray — |
| unloadInternal | () | method |
protected override function unloadInternal():void