Creates a new WebaniScene with an optional set of transformable objects.
Automatically creates a main camera and adds a default point light.
A list of WebaniTransformable objects to add to the scene.
The colors of all lights in the scene stored in a flat Float32Array.
The intensities of all lights in the scene stored in a flat Float32Array.
The positions of all lights in the scene stored in a flat Float32Array.
A list of point lights in the scene.
The main camera of the scene.
A list of transformable objects in the scene.
Retrieves all objects in the scene that are ready to be rendered. It includes transformable objects, lights, and cameras.
An array of WebaniTransformable objects for rendering.
The colors of all the lights in the scene.
A Float32Array containing the colors of the lights.
The intensities of all the lights in the scene.
A Float32Array containing the intensities of the lights.
The positions of all the lights in the scene.
A Float32Array containing the positions of the lights.
The number of lights in the scene.
The number of lights as a number.
Adds an object to the scene.
The WebaniTransformable object to add to the scene.
The index of the object in the members array, or undefined if not added.
Adds a light to the scene.
The light to add to the scene.
Clears all objects and lights from the scene.
The current WebaniScene instance after clearing.
Removes an object from the scene by index.
The index of the object to remove from the scene.
The current WebaniScene instance after removal.
Sets the main camera of the scene.
The camera to set as the main camera.
The
WebaniSceneclass represents a 3D scene that contains various objects, lights, and a camera. This class is responsible for managing objects to be rendered and lights in the scene, as well as the camera.