Browse Source

Merge pull request #13428 from WJsjtu/dev1

DirectGeometry: clone bounding volumes in fromGeometry method
Mr.doob 6 years ago
parent
commit
2d19c071fa
1 changed files with 12 additions and 0 deletions
  1. 12 0
      src/core/DirectGeometry.js

+ 12 - 0
src/core/DirectGeometry.js

@@ -264,6 +264,18 @@ Object.assign( DirectGeometry.prototype, {
 		this.uvsNeedUpdate = geometry.uvsNeedUpdate;
 		this.groupsNeedUpdate = geometry.groupsNeedUpdate;
 
+		if ( geometry.boundingSphere !== null ) {
+
+			this.boundingSphere = geometry.boundingSphere.clone();
+
+		}
+
+		if ( geometry.boundingBox !== null ) {
+
+			this.boundingBox = geometry.boundingBox.clone();
+
+		}
+
 		return this;
 
 	}