Browse Source

CSM.remove() removes the targets, too (#24658)

Yoshiki Ohshima 2 years ago
parent
commit
4de773d68a
1 changed files with 1 additions and 0 deletions
  1. 1 0
      examples/jsm/csm/CSM.js

+ 1 - 0
examples/jsm/csm/CSM.js

@@ -343,6 +343,7 @@ export class CSM {
 
 		for ( let i = 0; i < this.lights.length; i ++ ) {
 
+			this.parent.remove( this.lights[ i ].target );
 			this.parent.remove( this.lights[ i ] );
 
 		}