Singleton constructor. If already created, returns the instance.
Required/precondition states.
States that are deactivated when this state activates.
Handler for keydown events.
Handler for keyup events.
Name/identifier for the state.
States that should be restored when this state ends.
Animates a smooth change to the camera's field of view (FOV) over a given duration.
Cesium Camera object.
Target FOV value.
Duration in milliseconds.
Resolves when animation completes.
Enters first-person navigation mode: disables selection, animates camera FOV, hides table checkboxes, sets event handlers, shows information window, disables inputs, and manages button state.
Exits first-person mode: animates camera FOV back, removes UI/event handlers, restores layer interaction/UI state.
Always true.
Removes the previously set up key event handlers.
Sets up keydown/keyup event handlers for navigation.
FirstPersonState – Application UI state to enable interactive first-person (pedestrian/walking) camera mode.
Implements singleton pattern to ensure only one active instance. Handles camera setup, FOV transitions, event wiring for controls, disables inappropriate layers, shows information windows, and manages custom UI button state. Resets scene and restores interaction when exited.
Param: button
The UI button for toggling/activating this state.
Static
instance - Singleton reference.
Example