xeogl.xeogl
The xeogl namespace.
Index
Events
Methods
_addScene
-
scene
Registers a scene on xeogl. This is called within the xeogl.Scene constructor.
Parameters:
-
scene
SceneThe scene
getDefaultScene
()
Scene
Returns the current default Scene.
If no Scenes exist yet, or no Scene has been made default yet with a previous call to Xeogl/setDefaultScene:function, then this method will create the default Scene on-the-fly.
Components created without specifying their Scene will be created within this Scene.
Returns:
The current default scene
scheduleTask
-
callback
-
[scope]
Schedule a task for xeogl to run at the next frame.
Internally, this pushes the task to a FIFO queue. Within each frame interval, xeogl processes the queue for a certain period of time, popping tasks and running them. After each frame interval, tasks that did not get a chance to run during the task are left in the queue to be run next time.
Parameters:
-
callback
FunctionCallback that runs the task.
-
[scope]
Object optionalScope for the callback.
setDefaultScene
-
scene
Sets the current default Scene.
A subsequent call to Xeogl/getDefaultScene:function will return this Scene.
Components created without specifying their Scene will be created within this Scene.
Parameters:
-
scene
SceneThe new current default scene
Returns:
The new current default scene
Properties
version
String
Semantic version number. The value for this is set by an expression that's concatenated to the end of the built binary by the xeogl build script.
Events
tick
Fired on each game loop iteration.
Event Payload:
-
sceneID
StringThe ID of this Scene.
-
startTime
NumberThe time in seconds since 1970 that this Scene was instantiated.
-
time
NumberThe time in seconds since 1970 of this "tick" event.
-
prevTime
NumberThe time of the previous "tick" event from this Scene.
-
deltaTime
NumberThe time in seconds since the previous "tick" event from this Scene.