pixi.js
    Preparing search index...

    Interface BaseDestroyOptions

    Base options for destroying display objects. Controls how deep the destruction process should go through the display tree.

    // Basic destruction - only this container
    container.destroy({ children: false });

    // Deep destruction - container and all children
    container.destroy({ children: true });

    // Cleanup pattern
    function cleanupScene(scene: Container) {
    // Remove from parent first
    scene.parent?.removeChild(scene);
    // Then destroy with all children
    scene.destroy({ children: true });
    }
    interface BaseDestroyOptions {
        children?: boolean;
    }
    Index

    Properties

    Properties

    children?: boolean

    Whether to destroy children recursively. When true, runs destroy() on all children in the display tree.

    false
    
    container.destroy({ children: true });