constructor(world: World)
View sourceCreates a builder for queuing requests in the supplied world.
Class
Fluent builder for queuing window requests for an entity.
Call WindowCommands#window to select the target entity, then
call one or more request methods to queue WindowCommand values.
Each request method returns this builder, so related requests can be chained.
new WindowCommands(world)
.window(entity)
.resize(1280, 720)
.requestFullscreen()constructor(world: World)Creates a builder for queuing requests in the supplied world.
window(entity: EntityHandle): WindowCommandsSelects the EntityHandle that receives subsequent window
requests.
Selection is retained until another entity is passed to this method. This method does not queue a command; request methods queue commands for the selected entity instead.
resize(width: number, height: number): WindowCommandsQueues a WindowRequest.Resize with a Vector2 payload
containing the requested width in x and height in y.
Throws No window entity selected for resize when called before
WindowCommands#window.
requestPointerLock(): WindowCommandsQueues a WindowRequest.PointerLock with an undefined payload.
Throws No window entity selected for pointer lock when called before
WindowCommands#window.
requestPointerCapture(id: number): WindowCommandsQueues a WindowRequest.PointerCapture for a pointer id.
Throws No window entity selected for pointer capture when called before
WindowCommands#window.
requestPointerRelease(id: number): WindowCommandsQueues a WindowRequest.PointerRelease for a pointer id.
requestFullscreen(): WindowCommandsQueues a WindowRequest.FullScreen with an undefined payload.
Throws No window entity selected for fullscreen when called before
WindowCommands#window.