Preparing search index...

    Interface representing a toggleable component.

    interface Toggleable {
        initialize(): void;
        get initialized(): boolean;
        get isOn(): boolean;
        set isOn(on: boolean): void;
        onFinished: PublicApi<boolean>;
        onInitialized: PublicApi<void>;
        onValueChange: PublicApi<number>;
        get sceneObject(): SceneObject;
        setIsToggleable(isToggleable: boolean): void;
        toggle(on: boolean): void;
    }

    Implemented by

    Index

    Properties

    onFinished: PublicApi<boolean>

    Event that is triggered when the toggle finishes its action. The event data represents whether it's an explicit change.

    onInitialized: PublicApi<void>

    Event that is triggered when the component is initialized.

    onValueChange: PublicApi<number>

    Event that is triggered when the toggle value changes.

    Accessors

    • get initialized(): boolean

      Indicates whether the toggleable component has been initialized.

      Returns boolean

    • get isOn(): boolean

      Indicates whether the toggle is currently on.

      Returns boolean

    • set isOn(on: boolean): void

      Sets the toggle state, implicitly and silently Setting this does not trigger toggle group to turn on/off other toggles.

      Parameters

      • on: boolean

        A boolean value indicating the desired toggle state.

      Returns void

    • get sceneObject(): SceneObject

      sceneObject - The scene object associated with the toggleable component.

      Returns SceneObject

      The scene object of the toggleable component.

    Methods

    • initialize the component

      Returns void

    • Converts the component to a toggleable state.

      Parameters

      • isToggleable: boolean

      Returns void

    • Set the toggleable on or off.

      Parameters

      • on: boolean

        A boolean value indicating the desired toggle state.

      Returns void