Constructor
new Camera(simulator)
Creates an instance of Camera.
Initializes the camera and controls.
Parameters:
Name | Type | Description |
---|---|---|
simulator |
Simulator | The simulator instance containing scene, canvas, and sizes. |
- Source:
Methods
dispose()
Disposes of the camera controls and cleans up resources.
This method disposes the OrbitControls instance, ensuring all associated
resources are properly released to avoid memory leaks.
- Source:
getInstance() → {THREE.PerspectiveCamera}
Returns the instance of the perspective camera.
This method provides access to the internal THREE.PerspectiveCamera instance,
allowing external classes or functions to interact with the camera directly.
- Source:
Returns:
The perspective camera instance.
- Type
- THREE.PerspectiveCamera
resize()
Resize the camera aspect ratio when the simulator size changes.
- Source:
update()
Update the camera controls.
- Source:
updateTarget(target)
Update the target for the camera controls.
Parameters:
Name | Type | Description |
---|---|---|
target |
THREE.Vector3 | The new target position for the camera. |
- Source: