three-base 2.0.47 → 2.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/threeUtils.js +2 -2
- package/threeUtils.ts +2 -2
package/package.json
CHANGED
package/threeUtils.js
CHANGED
|
@@ -116,7 +116,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
116
116
|
object3d.computeBoundingBox();
|
|
117
117
|
object3d.boundingBox.getCenter(this._center);
|
|
118
118
|
}
|
|
119
|
-
return this._center;
|
|
119
|
+
return this._center.clone();
|
|
120
120
|
}
|
|
121
121
|
// 获取模型大小
|
|
122
122
|
getSize(object3d) {
|
|
@@ -128,7 +128,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
128
128
|
object3d.computeBoundingBox();
|
|
129
129
|
object3d.boundingBox.getSize(this._size);
|
|
130
130
|
}
|
|
131
|
-
return this._size;
|
|
131
|
+
return this._size.clone();
|
|
132
132
|
}
|
|
133
133
|
// 模型对齐底面
|
|
134
134
|
alignBottom(object3d, y = 0) {
|
package/threeUtils.ts
CHANGED
|
@@ -139,7 +139,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
139
139
|
(object3d as BufferGeometry).boundingBox!.getCenter(this._center);
|
|
140
140
|
}
|
|
141
141
|
|
|
142
|
-
return this._center;
|
|
142
|
+
return this._center.clone();
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
// 获取模型大小
|
|
@@ -152,7 +152,7 @@ class ThreeUtils extends EventDispatcher {
|
|
|
152
152
|
(object3d as BufferGeometry).boundingBox!.getSize(this._size);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
return this._size;
|
|
155
|
+
return this._size.clone();
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
// 模型对齐底面
|