Constructor
new Thurston(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
|
Classes
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
currentRenderer :BasicRenderer|PathTracerRenderer
- Source:
The renderer we are currently using
Type:
(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
pathTracerUI :PathTracerUI
- Source:
The UI for path tracing
Type:
ptCamera :PathTracerCamera
- Source:
The non-euclidean camera for the path tracer
Type:
ptRenderer :PathTracerRenderer
- Source:
Non-euclidean renderer for path tracer
Type:
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
threeRenderer :WebGLRenderer
- Source:
Three.js renderer
Type:
- WebGLRenderer
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.
switchRenderer()
- Source:
Switch between the two renderer