This commit is contained in:
2026-03-23 19:56:37 +02:00
parent 45074d78d2
commit 627452a308
4 changed files with 15 additions and 21 deletions
+5 -2
View File
@@ -93,12 +93,14 @@ function clearObject(o){
disposables.push(object);
}
if (object.isLight){
object.shadow?.map?.dispose();
object.shadow?.dispose();
//console.log('Disposeing light', object)
object.dispose();
object.shadow?.dispose();
object.shadow?.map?.dispose();
}
if (object.userData?._io){
object.userData._io.dispose?.();
delete object.userData._io;
}
});
disposables.forEach(object=>{
@@ -110,6 +112,7 @@ function clearObject(o){
for (const material of object.material) clearMaterial(material)
}
})
o.clear();
}
function clearMaterial(material) {