type-safe disposal

This commit is contained in:
tresabhi committed 2026-07-11 17:16:52 -05:00
1 parent 1061e003f7
commit 8df112aab4
1 file changed
+2 -1
+2 -1
View File
@@ -36,9 +36,10 @@ export function useDispose(gltf: GLTF & ObjectMap, path: string) {
for (const map of maps) {
if (!map) continue;
if (typeof map.source.data.close === "function") {
if (map.source.data instanceof ImageBitmap) {
map.source.data.close();
}
map.dispose();
}