WindowRequest

View source

Defines the numeric request kinds consumed by WindowCommand.

Pass one of these values as WindowCommand#type. Each variant selects a canvas operation and determines the payload shape stored in WindowCommand#data:

WindowCommands#requestPointerCapture and WindowCommands#requestPointerRelease queue the required {id} payloads for pointer capture operations.

Examples

new WindowCommand(entity, WindowRequest.Resize, { x: 1280, y: 720 })
new WindowCommand(entity, WindowRequest.PointerCapture, { id: pointerId })

Variants


FullScreen

View source

Requests the target canvas enter fullscreen; no payload is required (0).

PointerLock

View source

Requests pointer lock on the target canvas; no payload is required (1).

PointerCapture

View source

Captures the pointer identified by data.id on the target canvas (2).

PointerRelease

View source

Releases the pointer identified by data.id from the target canvas (3).

Resize

View source

Resizes the target canvas from data.x width and data.y height (4).

Reposition

View source

Repositions the target canvas from data.x right and data.y left styles (5).