Files
artcraft/frontend/libs/components
heojunfoandClaude Opus 5.5 2abba5bd20 Free GPU resources on New Scene, object delete and skybox change
Three paths in the 3D stage dropped objects without releasing what they
held on the GPU:

- Scene.clear() (New Scene) assigned `scene.children = []`, which
  disposed nothing and left each child parented to the scene. Every New
  Scene leaked all geometries, materials, textures and splat buffers of
  the previous one.
- SceneUtils.deleteObject disposed geometries and materials but not the
  textures they reference (Material.dispose() does not free its maps),
  so deleting a textured GLB leaked every map.
- _create_skybox replaced scene.background without disposing the
  previous cube texture.

Add disposeObject3D(), which frees geometries, materials and their
textures (deduplicated), skeleton bone textures and Spark splat buffers,
and use it in clear() and deleteObject. clear() now uses Object3D.clear()
so children are actually unparented. The old deleteObject also checked a
custom `.texture` field that nothing in the codebase sets; that branch
is dropped.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 17:46:29 -07:00
..
2026-09-11 14:19:51 -04:00
2026-09-11 14:19:51 -04:00
2026-09-11 14:19:51 -04:00
2026-09-11 14:19:51 -04:00