Package | away3d.exporters |
Class | public class AS3Exporter |
Method | Defined by | ||
---|---|---|---|
Generates a string in the Actionscript3 format representing the object3D(s).
| AS3Exporter |
AS3Exporter | () | constructor |
public function AS3Exporter(object3d:Object3D, classname:String, packagename:String = "")
Parameters
object3d:Object3D — Object3D. The Object3D to be exported to the AS3 format.
|
|
classname:String — Defines the class name used in the output string.
|
|
packagename:String (default = " ") — [optional] Defines the package name used in the output string. Defaults to no package.
The generated class will require one parameter: a Scene3D object already instanciated, and optional an init object with property scaling. Default being 1.
Example: var myClass:ClassName = new ClassName(this.view.scene, {scaling:.5});
To access the objects stored into the class:
- ClassName.containers, a getter returns the ObjectContainers3D Array.
- ClassName.meshes, a getter returns the Mesh Array.
Example to access to change a material
(ClassName.meshes[0] as Mesh).material = myNewMat;
|