Constructor
new Scene(params)
- Source:
Constructor.
Parameters:
Name | Type | Description |
---|---|---|
params |
Object | parameters of the scene including
|
Classes
Members
background
- Source:
Background material
fog
- Source:
Fog in the scene
lights :Array.<Light>
- Source:
List of all the lights in the scene.
Type:
- Array.<Light>
nextId :number
- Source:
Next available ID in the scene.
Type:
- number
ptBackground
- Source:
Background material (for path tracing)
solids :Array.<Solid>
- Source:
List of all the solids in the scene.
Type:
- Array.<Solid>
Methods
_add(obj) → {Scene}
- Source:
Add exactly one object to the scene
Parameters:
Name | Type | Description |
---|---|---|
obj |
Solid | Light | the object to add to the scene |
Returns:
the current scene
- Type
- Scene
add(…obj) → {Scene}
- Source:
Add one or more object in the scene
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
obj |
Solid | Light |
<repeatable> |
the objects to add |
Returns:
the current scene
- Type
- Scene
shader(shaderBuilder)
- Source:
Build the shader relative to the scene. Only the dependencies (solids, shapes, materials, lights, etc) are loaded here. The scenes SDF (local and global) are built at the Renderer level. Indeed these chunk need to know what is the teleportation set to implement nearest neighbors Another strategy would be to link the scene to the teleportation set (in the constructor for instance)
Parameters:
Name | Type | Description |
---|---|---|
shaderBuilder |
ShaderBuilder |