API Docs for:

xeogl.xeogl

The xeogl namespace.

Methods

_addScene

(
  • scene
)
private

Registers a scene on xeogl. This is called within the xeogl.Scene constructor.

Parameters:

clear

()

Destroys all user-created Scenes and clears the default 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:

Scene:

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 Function

    Callback that runs the task.

  • [scope] Object optional

    Scope for the callback.

setDefaultScene

(
  • scene
)
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 Scene

    The new current default scene

Returns:

Scene:

The new current default scene

Properties

scenes

{String:xeogl.Scene}

Existing Scenes , mapped to their IDs

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 String

    The ID of this Scene.

  • startTime Number

    The time in seconds since 1970 that this Scene was instantiated.

  • time Number

    The time in seconds since 1970 of this "tick" event.

  • prevTime Number

    The time of the previous "tick" event from this Scene.

  • deltaTime Number

    The time in seconds since the previous "tick" event from this Scene.