Attaches to dom for pointer, wheel and keyboard input.
Camera altitude above the ground under it, metres (updated every frame).
Horizontal view angle, radians.
ReadonlycameraThe controlled camera.
Distance from the focus to the camera, metres.
ReadonlydomElement that receives pointer and wheel input.
Angle above the horizon, radians.
Planet-centred (or flat-world) focus point on the ground, float64. Render-space zero.
Settings.
ReadonlyworldThe world the camera moves over.
Detaches all event listeners.
Jumps to look at focus from distance metres.
Applies input and places the camera. Call once per frame.
Camera controls that work at every scale, on flat worlds and planets: orbit around a focus point that stays on the ground, exponential zoom from centimetres to orbit, pan/WASD at a speed proportional to the distance, the camera's "up" always the local up, and automatic near/far planes. The focus point is also the floating origin: the camera is placed in render space relative to it, so pass SurfaceControls.origin to terrain, water and anything else that uses a floating origin.