FlightCamera

class FlightCamera
devtools/src/flightCamera.ts:47

Members

constructor

constructor(host: Host) → FlightCamera
hostHost
Undocumented

stateaccessor

state() → FlightCameraState

cycleView

cycleView() → FlightCameraStatus

The next view along: chase, orbit, chase.

drag

drag(dxPixels: number, dyPixels: number, sensitivity: number) → void

A drag, in pixels. In the orbit it orbits; in the chase it turns the head, because there is nothing else a drag from a chase position can mean — the eye is bolted to the hull.

dxPixelsnumber
Undocumented
dyPixelsnumber
Undocumented
sensitivitynumber
Undocumented

dragSensitivity

dragSensitivity() → number

Radians per CSS pixel of drag, as a multiple of the reference.

recenter

recenter() → FlightCameraStatus

Look where the view aims again.

reset

reset() → FlightCameraStatus

Back to the chase, as a session opens.

setView

setView(view: FlightView) → FlightCameraStatus

Stand in a view.

Entering the orbit opens it where the chase camera was standing — the chase offset, turned by the ship's attitude, read off this frame's scene — so the switch is a change of what the camera does next rather than a jump. The head is centered on every switch: a look is an offset from the view's own aim, and the aim it was measured against is gone.

viewFlightView
Undocumented

status

status() → FlightCameraStatus

turn

turn(dxPixels: number, dyPixels: number, sensitivity: number) → void

A drag applied to the look alone, whichever view is up.

dxPixelsnumber
Undocumented
dyPixelsnumber
Undocumented
sensitivitynumber
Undocumented

zoom

zoom(factor: number) → void

Multiply the orbit's distance; above 1 retreats. Nothing in the chase.

factornumber
Undocumented

zoomNotches

zoomNotches(notches: number) → void
notchesnumber
Undocumented