Application options for the ResizePlugin. These options control how your application handles window and element resizing.
// Auto-resize to windowawait app.init({ resizeTo: window });// Auto-resize to container elementawait app.init({ resizeTo: document.querySelector('#game') }); Copy
// Auto-resize to windowawait app.init({ resizeTo: window });// Auto-resize to container elementawait app.init({ resizeTo: document.querySelector('#game') });
Optional
Element to automatically resize the renderer to.
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}); Copy
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});
null Copy
null
Application options for the ResizePlugin. These options control how your application handles window and element resizing.
Example