ThurstonLite

ThurstonLite

A combination of all main parts of the API. It can be used to quickly create scenes

Constructor

new ThurstonLite(shader1, shader2, set, params)

Source:

Constructor.

Parameters:
Name Type Description
shader1 string

the first part of the geometry dependent shader

shader2 string

the second part of the geometry dependent shader

set TeleportationSet

the teleportation set

params Object

additional parameters including

  • {string} keyboard - the type of keyboard (french, american, etc)

Classes

ThurstonLite

Members

callback :function

Source:

A callback called at each frame

Type:
  • function

camera :BasicCamera

Source:

The non-euclidean camera for the basic renderer

Type:

(protected) clock :Clock

Source:

A clock to measure the time between two call of animate

Type:
  • Clock

(protected) flyControls :FlyControls

Source:

The keyboard controls to fly in the scene

Type:

gui :GUI

Source:

The graphical user interface. Setup when the renderer is built.

Type:
  • GUI

renderer :BasicRenderer

Source:

Non-euclidean renderer for basic renderer

Type:

scene :Scene

Source:

The non-euclidean scene

Type:

set :TeleportationSet

Source:

The underlying subgroup

Type:

stats :Stats

Source:

The performance stats. Setup when the renderer is built.

Type:
  • Stats

Methods

add(…obj)

Source:

Shortcut to add objects to the scene.

Parameters:
Name Type Attributes Description
obj Solid | Light <repeatable>

the objects to add

animate()

Source:

animation function

initGUI() → {ThurstonLite}

Source:

Initialize the graphic user interface

Returns:

the current Thurston object

Type
ThurstonLite

initStats() → {Thurston}

Source:

Initialize the performance stats

Returns:

the current Thurston object

Type
Thurston

onWindowResize(event)

Source:

Action when the window is resized.

Parameters:
Name Type Description
event UIEvent

run()

Source:

Build the renderer and run the animation.