@pixi/3d
    Preparing search index...

    Type Alias Destroy3DOptions

    Destroy3DOptions: TypeOrBool<
        BaseDestroyOptions & TextureDestroyOptions & {
            geometry?: boolean;
            material?: boolean;
        },
    >

    What a 3D node's destroy() takes down with it

    The flags are pixi.js's children, texture and textureSource, plus geometry and material for meshes. Each defaults to false, since children, geometries, materials and textures are often shared. true sets every flag, so it also destroys resources other nodes still use. A node passes the same options to the children it destroys.

    texture frees the textures of the materials the call destroys, so on a Mesh3D, texture alone frees nothing and material alone keeps the textures. On a Sprite3D, texture always frees the sprite's texture. textureSource also frees the sources behind those textures and, as in pixi.js, does nothing alone.

    What a node made for itself always goes, whatever the flags: a View3D's GPU resources, a BatchedMesh3D's batch, the material a Sprite3D built for its texture.

    sprite.destroy({ texture: true });               // the sprite, the material it built, its texture
    mesh.destroy({ geometry: true, material: true }); // keeps the material's textures
    model.destroy(true); // everything it can reach, shared or not