three-base 2.0.127 → 2.0.129

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.
@@ -27,7 +27,7 @@ export default class InstancedMeshBase extends MeshBase {
27
27
  scale?: Vector3;
28
28
  }): Promise<void>;
29
29
  getTRS(index?: number): Promise<{
30
- positon: Vector3;
30
+ position: Vector3;
31
31
  rotation: Euler;
32
32
  scale: Vector3;
33
33
  }>;
@@ -144,7 +144,7 @@ export default class InstancedMeshBase extends MeshBase {
144
144
  // 更新包围盒
145
145
  computeBoundingSphere = throttle(() => {
146
146
  this.children.map((instancedMesh) => {
147
- instancedMesh.computeBoundingSphere();
147
+ instancedMesh.computeBoundingSphere && instancedMesh.computeBoundingSphere();
148
148
  });
149
149
  }, 1000);
150
150
  //初始实例矩阵的数量
@@ -228,17 +228,17 @@ export default class InstancedMeshBase extends MeshBase {
228
228
  //获取指定位置的移动旋转缩放
229
229
  async getTRS(index = 0) {
230
230
  await this.awaitLoaded();
231
- const positon = new Vector3();
231
+ const position = new Vector3();
232
232
  const rotation = new Euler();
233
233
  const scale = new Vector3();
234
234
  const uuid = first(Object.keys(this.instanceCollect));
235
235
  const instancedMesh = this.instanceCollect[uuid];
236
236
  if (instancedMesh) {
237
237
  instancedMesh.getMatrixAt(index, InstancedMeshBase._matrix);
238
- InstancedMeshBase._matrix.decompose(positon, InstancedMeshBase._Quaternion, scale);
238
+ InstancedMeshBase._matrix.decompose(position, InstancedMeshBase._Quaternion, scale);
239
239
  rotation.setFromQuaternion(InstancedMeshBase._Quaternion);
240
240
  }
241
- return { positon, rotation, scale };
241
+ return { position, rotation, scale };
242
242
  }
243
243
  // 设置颜色
244
244
  async setColorAt(index, color) {
@@ -13,7 +13,7 @@ export default class PlaneModal1 extends Mesh {
13
13
  super();
14
14
  this.updata(config);
15
15
  this.material.map = this.texture;
16
- this.scale.set(10, 10, 10);
16
+ // this.scale.set(10, 10, 10);
17
17
  }
18
18
  geometry = new PlaneGeometry(1 * 0.65, 0.728 * 0.65, 1, 1);
19
19
  material = new MeshBasicMaterial({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-base",
3
- "version": "2.0.127",
3
+ "version": "2.0.129",
4
4
  "description": "three 3d three-base",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"