Constructor
new Renderer(simulator)
Creates an instance of Renderer.
Initializes the renderer with the provided simulator.
Parameters:
Name | Type | Description |
---|---|---|
simulator |
Simulator | The simulator instance containing scene, canvas, and sizes. |
- Source:
Methods
dispose()
Disposes of the WebGLRenderer instance and cleans up event listeners.
Ensures that all GPU resources are properly released to avoid memory leaks.
- Source:
resize()
Adjusts the renderer size and pixel ratio when the window is resized.
- Source:
update()
Renders the scene from the perspective of the camera.
- Source: