| Package | sandy.core |
| Class | public class World3D |
| Inheritance | World3D Scene3D flash.events.EventDispatcher |
The World3D object is the central point of a Sandy world.
World3D is a singleton class, which means that you can have only one World3D instance.
It contains the object tree with groups, a camera, a light source and a canvas to draw on
var world:World3D = World3D.getInstance();
world.container = this; // The document calss is a Sprite or MovieClip
world.camera = new Camera3D( 200, 200 );
world.root.addChild( world.camera );
// Go on to create the 3D objects and transforms
world.root = createScene();
// Listen for the ENTER-FRAME event.
//The handler calls the world.render() method to render the world for each frame.
addEventListener( Event.ENTER_FRAME, enterFrameHandler );
| Method | Defined by | ||
|---|---|---|---|
|
World3D()
Creates a specific Scene3D called World3D.
| World3D | ||
![]() |
dispose():Boolean
Dispose all the resources of this given scene.
| Scene3D | |
|
[static]
Returns an instance of World3D.
| World3D | ||
![]() |
render(p_oEvt:SandyEvent = null):void
Renders this scene into its display object container.
| Scene3D | |
|
toString():String
| World3D | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| World3D | ||||
| World3D | ||||
| World3D | ||||
| World3D | () | constructor |
public function World3D()Creates a specific Scene3D called World3D. This is done for backward compatibility
You can have only one World3D instance ( singleton ) in a Flash movie.
You should not call this constructor directly, but use the static getInstance() method
| getInstance | () | method |
public static function getInstance():World3DReturns an instance of World3D.
ReturnsWorld3D —
The single World3D instance
|
| toString | () | method |
public override function toString():String
Returns
String |
| containerCreated | event |
| lightAdded | event |
| render | event |