소스 검색

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;
 
 	}