Skip to content

Commit

Permalink
chore(model): tidy up import
Browse files Browse the repository at this point in the history
  • Loading branch information
fallenoak committed Feb 7, 2024
1 parent 9e4d1df commit 01b8933
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib/model/Model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import ModelMaterial from './ModelMaterial.js';
import ModelAnimator from './ModelAnimator.js';
import ModelAnimation from './ModelAnimation.js';
import { getSizeCategory } from '../world.js';
import { SkinnedMesh } from 'three';

class Model extends THREE.Object3D {
animation: ModelAnimation;
Expand Down Expand Up @@ -33,7 +32,7 @@ class Model extends THREE.Object3D {
// Avoid skinning overhead when model does not make use of bone animations
if (skinned) {
this.#mesh = new THREE.SkinnedMesh(geometry, materials);
(this.#mesh as SkinnedMesh).boundingSphere = this.boundingSphere;
(this.#mesh as THREE.SkinnedMesh).boundingSphere = this.boundingSphere;
} else {
this.#mesh = new THREE.Mesh(geometry, materials);
}
Expand All @@ -46,7 +45,7 @@ class Model extends THREE.Object3D {
this.animation = animator.createAnimation(this);

if (skinned) {
(this.#mesh as SkinnedMesh).skeleton = this.animation.skeleton as any;
(this.#mesh as THREE.SkinnedMesh).skeleton = this.animation.skeleton as any;
}

this.diffuseColor = new THREE.Color(1.0, 1.0, 1.0);
Expand Down

0 comments on commit 01b8933

Please sign in to comment.