ThurstonVR

ThurstonVR

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

Constructor

new ThurstonVR(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

ThurstonVR

Members

callback :function

Source:

A callback called at each frame

Type:
  • function

camera :VRCamera

Source:

The non-euclidean camera

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

Type:

gui :GUI

Source:

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

Type:
  • GUI

renderer :VRRenderer

Source:

The non-euclidean 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

(protected) VRControlsDrag :DragVRControls

Source:

Rotating the scene with the VR controller

Type:

(protected) VRControlsMove :MoveVRControls

Source:

Moving in the scene with the VR controller

Type:

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() → {Thurston}

Source:

Initialize the graphic user interface

Returns:

the current Thurston object

Type
Thurston

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.