Luxar Viewer API Documentation - v2026.10.19
    Preparing search index...
    • Clear loaded content from a scene root, preserving lights and any objects flagged with userData.isBackground = true.

      For each remaining direct child, disposes its full subtree via disposeObjectTree and removes it from the scene.

      This is the dataset-switch teardown, so it ALSO drops every one of the app coordinator's depth-sort registrations: the per-mesh release inside disposeObjectTree covers meshes reachable from the scene walk, and depthSort.releaseAllNodes() sweeps any coordinator/worker state whose mesh was never attached (or was detached before the switch) — the old dataset's registrations must not outlive it either way.

      Parameters

      Returns number

      number of removed objects (for logging by the caller).