Interface: ScreenSpaceUiCanvasOptions
Defined in: ui/utilities/create-ui-canvas.ts:25
createUiCanvas options for renderMode: 'screenSpace' (the default) -
a dedicated, static UI camera drawing through its own off-screen
RenderTarget, resolved every frame from the render destination's live
size.
Extends
Properties
cancelInput?
optionalcancelInput?:TriggerAction
Defined in: ui/components/canvas-component.ts:56
The action that clears this canvas's currently focused element, read by
createUiNavigationEcsSystem. Register your own listener on
cancelInput.triggerEvent (e.g. to close a menu) - the canvas itself
only clears focus.
Inherited from
CanvasInputOptions.cancelInput
cullingMask
cullingMask:
number
Defined in: ui/utilities/create-ui-canvas.ts:45
The dedicated UI camera's culling mask, matched against
Renderable.category (see createImageSprite's layer option) and
TextEcsComponent.category to decide what this camera draws. Forge
doesn't reserve or suggest any particular bit for UI - pick any value
your game isn't already using for another camera, and reuse that same
value for every UI visual's own category (createLabel's category
option, the layer you build UI sprites with) so this canvas draws
them and no other camera's cullingMask also matches them. A
hardcoded "UI" bit baked into this module would only work by
coincidence once more than one Forge-based package picks its own
default independently - explicit, caller-owned values avoid that
collision entirely. Note matchesMask does identifier & mask on
plain JS numbers, which & coerces to 32-bit signed integers - bit
31 is the sign bit, so 1 << 31 is -2147483648, not a clean
single-bit flag; stick to bits 0-30.
layer?
optionallayer?:number
Defined in: ui/utilities/create-ui-canvas.ts:63
The dedicated UI camera's layer, i.e. its position in the present
pass's compositing order (see CameraEcsComponent.layer). Defaults to
1000, comfortably above any world camera's default layer of 0, so
the UI composites on top without every game having to hand-tune camera
layers just to put a HUD on screen.
navigateInput?
optionalnavigateInput?:Axis2dAction
Defined in: ui/components/canvas-component.ts:64
The action that moves this canvas's focus between interactable
elements, read by createUiNavigationEcsSystem. A step is taken on the
tick the dominant axis first crosses navigationThreshold, not every
tick the stick is held over.
Inherited from
CanvasInputOptions.navigateInput
referenceResolution?
optionalreferenceResolution?:Vector2
Defined in: ui/utilities/create-ui-canvas.ts:51
The resolution UI is authored against, in reference pixels. Defaults to
1920x1080.
renderMode?
optionalrenderMode?:"screenSpace"
Defined in: ui/utilities/create-ui-canvas.ts:26
scaleMode?
optionalscaleMode?:UiScaleMode
Defined in: ui/utilities/create-ui-canvas.ts:54
How the canvas's root rect responds to the destination's live size.
submitInput?
optionalsubmitInput?:TriggerAction
Defined in: ui/components/canvas-component.ts:48
The action that raises onInvoke on the currently focused interactable
- the gamepad/keyboard counterpart to a pointer click, read by
createUiNavigationEcsSystem. Omit to leave this canvas's focused element only invocable by pointer.