3D-City Model
    Preparing search index...

    WaterLevelState – UI interaction state for modifying or visualizing the scene's water level.

    Implements singleton pattern (only one instance at a time). Handles button/click/slider events for setting water height, toggling water visibility, and positioning. Integrates with in-scene picking (LEFT_CLICK) to extract height and update the global water level model.

    instance - Singleton reference.

    const state = new WaterLevelState();
    app.applyState(state);

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    callback: undefined | ((e: any) => void)

    Event handler for slider value changes.

    dependentStates: string[]

    Required/precondition states.

    exclusiveStates: string[]

    States that are deactivated when this state activates.

    handler: any
    name: string

    Name/identifier for the state.

    removeLeftClickHandler: any

    Function to deregister LEFT_CLICK input action.

    restoreStates: string[]

    States that should be restored when this state ends.

    slider: undefined | null | HTMLElement

    Slider input for adjusting water level height.

    waterLevelButton: undefined | null | HTMLElement

    Associated control button for toggling water display.

    waterLevelClick: undefined | null | HTMLElement

    Button/element for activating/deactivating water level mode.

    Methods

    • Activates water level editing mode: wires button, sets info window, adjusts controls, and manages scene toggles.

      Parameters

      • app: any

      Returns void

    • Sets up event handlers for water level slider and click, including height setting from picked position.

      Parameters

      • app: any

      Returns void