In-game tools · interface
Selection
What is selected, which of it is primary, and in what order.
Explained in In-game tools.
interface Selectionimport type { Selection } from '@driftengine/tools';In depth
Order is kept, and that is not cosmetic. A multi-entity gizmo pivots on the primary selection; if the order drifts between frames the pivot jumps, and a drag that started around one object finishes around another. Insertion order with the primary as the most recent addition is both what a person expects and what keeps the pivot still.
Properties
| Name | Type | Description |
|---|---|---|
entities | number[] | Selected entities, in the order they were added. |