This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user