prune

  • Removes properties from the file if they are not referenced by a Scene. Commonly helpful for cleaning up after other operations, e.g. allowing a node to be detached and any unused meshes, materials, or other resources to be removed automatically.

    Example:

    document.getRoot().listMaterials(); // → [Material, Material]
    
    await document.transform(prune());
    
    document.getRoot().listMaterials(); // → [Material]
    

    No options are currently implemented for this function.

Function symbol, where the argument and output are a box labeled 'glTF'.

Made by Don McCurdy Documented with greendoc © 2023 MIT License