Constructor
(abstract) new AbstractRenderer(shader1, shader2, set, camera, scene, params, threeRenderer)
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 underlying teleportation set |
camera |
BasicCamera | the camera |
scene |
Scene | the scene |
params |
Object | parameters for the Thurston part of the render. For the moment includes |
threeRenderer |
WebGLRenderer | Object | either a Three.js renderer or the parameters to build it
|
Classes
Members
camera :DollyCamera
Non-euclidean camera
Type:
domElement
Shortcut to the DOM element of the underlying Three.js renderer. See Three.js doc.
maxBounces :number
Number of time the light rays bounce
Type:
- number
postProcess :Boolean
Add post processing to the final output
Type:
- Boolean
scene :Scene
Non-euclidean scene
Type:
set :TeleportationSet
The underlying subgroup
Type:
shader1
The first part of the geometry dependent shader.
shader2
The second part of the geometry dependent shader.
threeRenderer :WebGLRenderer
The underlying Three.js renderer If the passed argument is already a WebGLRenderer, we directly use it, otherwise, we build a WebGLRenderer from the passed parameters.
Type:
- WebGLRenderer
threeScene :ThreeScene
The underlying Three.js scene Not to be confused with the non-euclidean scene.
Type:
- ThreeScene
Methods
(abstract) build()
Build the Three.js scene with the non-euclidean shader.
(abstract) render()
Render the non-euclidean scene.
The method build
should be called before.
setAnimationLoop(callback)
Shortcut to set the animation loop of the underlying Three.js renderer. See Three.js doc.
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
setClearColor(color, alpha)
Shortcut to set the clear color of the underlying Three.js renderer. See Three.js doc.
Parameters:
Name | Type | Description |
---|---|---|
color |
Color | |
alpha |
number |
setPixelRatio(value)
Shortcut to set the pixel ratio of the underlying Three.js renderer. See Three.js doc.
Parameters:
Name | Type | Description |
---|---|---|
value |
number |
setSize(width, height, updateStyle)
Shortcut to set the size of the underlying Three.js renderer. See Three.js doc.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
width |
number | ||
height |
number | ||
updateStyle |
boolean |
true
|