The data structure for a set of controls in the SceneControls#controls record.

interface SceneControl {
    activeTool: string;
    icon: string;
    name: string;
    onChange?: (event: Event, active: boolean) => void;
    onToolChange?: (event: Event, tool: SceneControlTool) => void;
    order: number;
    title: string;
    tools: Record<string, SceneControlTool>;
    visible?: boolean;
}

Properties

activeTool: string
icon: string

One or more icon classes for the control, typically Font Awesome classes such as "fa-solid fa-face-smile"

name: string

A unique identifier for the control

onChange?: (event: Event, active: boolean) => void

A callback invoked when control set is activated or deactivated

onToolChange?: (event: Event, tool: SceneControlTool) => void

A callback invoked when the active tool changes

order: number

An integer indicating the control's order, with 0 being at the top

title: string

A title for the control: can be a localization path

tools: Record<string, SceneControlTool>
visible?: boolean

Whether the control should be visible to the current User