three-base 2.0.51 → 2.0.52
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/InstancedMeshBase.js +3 -1
- package/InstancedMeshBase.ts +3 -1
- package/package.json +1 -1
package/InstancedMeshBase.js
CHANGED
|
@@ -126,7 +126,9 @@ export default class InstancedMeshBase extends MeshBase {
|
|
|
126
126
|
// 更新包围盒
|
|
127
127
|
computeBoundingSphere = throttle(() => {
|
|
128
128
|
this.traverse(m => {
|
|
129
|
-
m
|
|
129
|
+
if (m !== this) {
|
|
130
|
+
m.computeBoundingSphere();
|
|
131
|
+
}
|
|
130
132
|
});
|
|
131
133
|
}, 1000);
|
|
132
134
|
//初始实例矩阵的数量
|
package/InstancedMeshBase.ts
CHANGED
|
@@ -162,7 +162,9 @@ export default class InstancedMeshBase extends MeshBase {
|
|
|
162
162
|
// 更新包围盒
|
|
163
163
|
computeBoundingSphere = throttle(() => {
|
|
164
164
|
this.traverse(m => {
|
|
165
|
-
(m
|
|
165
|
+
if (m !== this) {
|
|
166
|
+
(m as InstancedMesh).computeBoundingSphere();
|
|
167
|
+
}
|
|
166
168
|
})
|
|
167
169
|
}, 1000)
|
|
168
170
|
|