Type Alias: CanvasEcsComponent
CanvasEcsComponent =
ResolvedScreenSpaceCanvasFields|WorldSpaceCanvasFields&CanvasInputOptions&object
Defined in: ui/components/canvas-component.ts:91
Type Declaration
camera
camera:
number
focusedEntity
focusedEntity:
number|null
The entity id of this canvas's currently focused interactable - the
source-agnostic "currently selected element" (see
UiInteractableEcsComponent.isFocused) - or null if none. Written
by createUiNavigationEcsSystem (directional navigation,
cancelInput) and createUiInteractionEcsSystem (the pointer moving
over an interactable also focuses it, so the highlight follows the
mouse). Read-only to callers.
hoveredEntity
hoveredEntity:
number|null
The entity id the pointer is currently over on this canvas (the
topmost raycast-blocking element under it), or null if none.
Written every frame by createUiRaycastEcsSystem;
isPointerOverUi is exactly hoveredEntity !== null. Read-only to
callers.
isPointerOverUi
isPointerOverUi:
boolean
Whether the pointer is currently over any raycast-blocking
interactable on this canvas. Written every frame by
createUiRaycastEcsSystem so game systems can gate world interaction
("don't fire the weapon when the click landed on the pause button")
without guessing. Read-only to callers.
wasNavigateInputBeyondThreshold
wasNavigateInputBeyondThreshold:
boolean
Whether navigateInput's magnitude was already past
createUiNavigationEcsSystem's navigation threshold as of the last
tick - the edge-detection state behind "a step is taken on the tick
the stick first crosses the threshold, not every tick it's held past
it." Lives here (rather than in the system itself) so it's ordinary,
serializable component state instead of memory private to one system
instance. System-owned, read-only to callers.