pixi.js
    Preparing search index...

    Interface ResizePluginOptions

    Application options for the ResizePlugin. These options control how your application handles window and element resizing.

    // Auto-resize to window
    await app.init({ resizeTo: window });

    // Auto-resize to container element
    await app.init({ resizeTo: document.querySelector('#game') });
    interface ResizePluginOptions {
        resizeTo?: HTMLElement | Window;
    }
    Index

    Properties

    Properties

    resizeTo?: HTMLElement | Window

    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
    });
    null