three-base 2.0.32 → 2.0.33

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/MeshBase.ts CHANGED
@@ -82,7 +82,7 @@ export default class MeshBase extends Group {
82
82
  if (MeshBase.models.get(url)) {
83
83
 
84
84
  this.clear();
85
- const mesh = MeshBase.models.get(url);
85
+ const mesh = MeshBase.models.get(url)!;
86
86
  // 判断是否有动画
87
87
  this.hasAnimation = mesh.animations.length > 0;
88
88
 
@@ -92,7 +92,7 @@ export default class MeshBase extends Group {
92
92
 
93
93
  this.animationActions = {};
94
94
  mesh.animations.map(animation => {
95
- const animationAction = this.mixer.clipAction(animation).play();
95
+ const animationAction = this.mixer!.clipAction(animation).play();
96
96
  animationAction.weight = 0;
97
97
  this.animationActions[animation.name] = animationAction;
98
98
  });
package/ThreeBase.js CHANGED
@@ -234,7 +234,7 @@ export default class ThreeBase extends EventDispatcher {
234
234
  });
235
235
  }
236
236
  // 重置控制器的位置
237
- resetLookAt({ position = this.renderBindThis.camera.position, center = this.controls.target, }) {
237
+ resetLookAt({ position = this.perspectiveCamera.position, center = this.controls.target, }) {
238
238
  // 停止控制器的惯性
239
239
  this.controls.enableDamping = false;
240
240
  this.controls.saveState();
package/ThreeBase.ts CHANGED
@@ -280,7 +280,7 @@ export default class ThreeBase extends EventDispatcher {
280
280
 
281
281
  // 重置控制器的位置
282
282
  resetLookAt({
283
- position = this.renderBindThis.camera.position,
283
+ position = this.perspectiveCamera.position,
284
284
  center = this.controls.target,
285
285
  }: { position: Vector3, center: Vector3 }) {
286
286
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-base",
3
- "version": "2.0.32",
3
+ "version": "2.0.33",
4
4
  "description": "three 3d three-base",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"