浏览代码

DirectGeometry: clone bounding volumes in fromGeometry method

Jason Wang 7 年之前
父节点
当前提交
9b71b63906
共有 1 个文件被更改,包括 12 次插入0 次删除
  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;
 
 	}