artcraft/frontend/libs
heojunfo 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
..
analytics/google-analytics ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00
api thumbnail speedup (and fix for non-rendering thumbnails) (#1964) 2026-09-28 01:28:45 -04:00
api-enums Added new models and modes: GPT Image 2.5, Wan, Output Formats (#1954) 2026-09-18 16:23:44 -04:00
common ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00
components Free GPU resources on New Scene, object delete and skybox change 2026-10-06 17:46:29 -07:00
icons ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00
markdown-content ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00
model-list Added new models and modes: GPT Image 2.5, Wan, Output Formats (#1954) 2026-09-18 16:23:44 -04:00
omni-gen ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00
soundboard ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00
state ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00
tauri-api thumbnail speedup (and fix for non-rendering thumbnails) (#1964) 2026-09-28 01:28:45 -04:00
tauri-events ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00
tauri-utils ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00
shared-vite-config.ts ArtCraft Desktop (fresh start) 2026-09-11 14:19:51 -04:00