Package | alternativa.engine3d.loaders |
Class | public class ParserCollada |
Inheritance | ParserCollada ![]() ![]() |
Property | Defined By | ||
---|---|---|---|
![]() | animations : Vector.<AnimationClip>
Array of animations. | Parser | |
![]() | hierarchy : Vector.<Object3D>
List of root objects. | Parser | |
lights : Vector.<Light3D>
List of the light sources
| ParserCollada | ||
![]() | materials : Vector.<ParserMaterial>
List of all materials assigned to objects, that are got after parsing. | Parser | |
![]() | objects : Vector.<Object3D>
List of objects, that are got after parsing. | Parser |
Method | Defined By | ||
---|---|---|---|
Creates a new ParserCollada instance. | ParserCollada | ||
clean():void [override]
Clears all links to external objects. | ParserCollada | ||
getAnimationByObject(object:Object):AnimationClip
Returns animation from animations array by object, to which it refers. | ParserCollada | ||
![]() | getLayerByObject(object:Object3D):String
Returns name of layer for specified object. | Parser | |
![]() | getObjectByName(name:String):Object3D
Returns object from array objects by name. | Parser | |
parse(data:XML, baseURL:String = null, trimPaths:Boolean = false):void
Method parses xml of collada and fills arrays objects, hierarchy, materials, animations
If you need to download textures, use class TexturesLoader. | ParserCollada | ||
parseAnimation(data:XML):AnimationClip [static]
Parses and returns animation. | ParserCollada |
lights | property |
public var lights:Vector.<Light3D>
List of the light sources
ParserCollada | () | Constructor |
public function ParserCollada()
Creates a new ParserCollada instance.
clean | () | method |
override public function clean():void
Clears all links to external objects.
getAnimationByObject | () | method |
public function getAnimationByObject(object:Object):AnimationClip
Returns animation from animations
array by object, to which it refers.
Parameters
object:Object |
AnimationClip |
parse | () | method |
public function parse(data:XML, baseURL:String = null, trimPaths:Boolean = false):void
Method parses xml
of collada and fills arrays objects
, hierarchy
, materials
, animations
If you need to download textures, use class TexturesLoader
.
Path to collada file should match with URI
specification. E.g., file:///C:/test.dae
or /C:/test.dae
for the full paths and test.dae
, ./test.dae
in case of relative.
Parameters
data:XML — XML data type of collada.
| |
baseURL:String (default = null ) — Path to textures relative to swf-file (Or file name only in case of trimPaths=true ).
| |
trimPaths:Boolean (default = false ) — Use file names only, without paths.
|
See also
parseAnimation | () | method |
public static function parseAnimation(data:XML):AnimationClip
Parses and returns animation.
Parameters
data:XML |
AnimationClip |