pixi-jsInterfaces
Interface: ResizePluginOptions
Defined in: node_modules/pixi.js/lib/app/ResizePlugin.d.ts:18
Application options for the ResizePlugin. These options control how your application handles window and element resizing.
Example
// Auto-resize to window
await app.init({ resizeTo: window });
// Auto-resize to container element
await app.init({ resizeTo: document.querySelector('#game') });
Standard
Properties
resizeTo?
> optional resizeTo?: HTMLElement | Window
Defined in: node_modules/pixi.js/lib/app/ResizePlugin.d.ts:34
Element to automatically resize the renderer to.
Example
const app = new Application();
await app.init({
resizeTo: window, // Resize to the entire window
// or
resizeTo: document.querySelector('#game-container'), // Resize to a specific element
// or
resizeTo: null, // Disable auto-resize
});
Default
null