Constructor
new Simulator(canvas)
Creates an instance of the Simulator class.
Initializes all necessary components and sets up event listeners.
Parameters:
Name | Type | Description |
---|---|---|
canvas |
HTMLCanvasElement | The HTML canvas element for rendering. |
- Source:
Methods
destroy()
Destroys the simulator instance and cleans up resources.
This method unsubscribes from events, disposes resources, and clears scene objects.
- Source:
resize()
Handles resize event by updating camera and renderer dimensions.
- Source:
update()
Updates the simulation state on each frame tick.
- Source: