Class Selection<T>

Selection manager that supports adding, removing, toggling, and querying selected objects. The selection change signal is debounced to dispatch only once per animation frame.

Type Parameters

Constructors

Properties

enabled: boolean = true

If true, the selection manager is enabled and can modify the selection.

toggleOnRepeatSelect: boolean = false

If true, reselecting the currently selected single target will toggle it instead of doing nothing.

Accessors

Methods

  • Computes the bounding box that contains all selected objects. Skips objects that do not implement getBoundingBox().

    Returns Promise<Box3>

    A promise resolving to the combined bounding box.

  • Replaces the current selection with the given object(s). If toggleOnRepeatSelect is true and the object is already the only selected one, it toggles it instead.

    Parameters

    • object: T

    Returns void

  • Replaces the current selection with the given object(s). If toggleOnRepeatSelect is true and the object is already the only selected one, it toggles it instead.

    Parameters

    • objects: T[]

    Returns void