WindowResize

View source

Reports the dimensions produced by a window resize event.

The DOM window integration writes this value to the typed event stream after it synchronizes a canvas and its Window component. Read width and height from the event value to handle the new dimensions.

Examples

const resize = new WindowResize(1280, 720)
console.log(resize.width, resize.height) // 1280 720

Constructor


constructor(width: number, height: number)

View source

Creates a resize event value with the new dimensions.

Parameters

NameDescriptionDefault
width——
height——

Properties