Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / components / SelectionTransformState

Class: SelectionTransformState

Defined in: components/SelectionTransformState.ts:16

Singleton-style component (attached once to a system entity) that mirrors the editor's current transform-gizmo state into the ECS world. Persisted in snapshots so undo/redo restores the exact gizmo configuration.

Extends

Constructors

Constructor

ts
new SelectionTransformState(
   transform?, 
   space?, 
   selectedEntityId?): SelectionTransformState;

Defined in: components/SelectionTransformState.ts:24

Parameters

ParameterTypeDefault value
transformTransformModeValue"translate"
spaceTransformSpaceValue"world"
selectedEntityIdnumber | nullnull

Returns

SelectionTransformState

Overrides

Component.constructor

Properties

PropertyTypeDescriptionDefined in
transformTransformModeValueActive gizmo mode (translate, rotate, or scale).components/SelectionTransformState.ts:18
spaceTransformSpaceValueReference frame for the gizmo (world or local).components/SelectionTransformState.ts:20
selectedEntityIdnumber | nullCurrently selected entity id, or null if nothing is selected.components/SelectionTransformState.ts:22