Przeglądaj źródła

DirectGeometry: clone bounding volumes in fromGeometry method

Jason Wang 7 lat temu
rodzic
commit
9b71b63906
1 zmienionych plików z 12 dodań i 0 usunięć
  1. 12 0
      src/core/DirectGeometry.js

+ 12 - 0
src/core/DirectGeometry.js

@@ -252,6 +252,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;
 
 	}