Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Module scene/scene-manager/render-pipeline/scene-disposal

    Scene-graph disposal helpers extracted from scene/scene-manager.ts.

    Three independent behaviors live here, all pure with respect to the scene manager:

    • disposeObjectTree — recursively dispose a single Object3D and its descendants, removing children from their parents as it goes. Used by clearSceneContent() for objects below the scene root that are being unloaded.
    • clearLoadedSceneContent — walk the direct children of the scene root, skip lights and userData.isBackground markers, dispose and remove the rest. Returns the count of removed objects so the caller can log it.
    • disposeSceneGraphResources — traverse the scene one last time on shutdown, disposing every geometry + material reference. The scene root is NOT cleared from scene.children; the caller is about to drop the renderer/scene/camera anyway.
    disposeObjectTree
    clearLoadedSceneContent
    disposeSceneGraphResources