mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 10:47:04 +02:00
type-safe disposal
This commit is contained in:
1 parent
1061e003f7
commit
8df112aab4
1 file changed
+2
-1
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user