Skip to content

Commit

Permalink
fix (1.0, springBone): remove Object.freeze
Browse files Browse the repository at this point in the history
using `Object.freeze` on Quaternion makes the quaternion type imcompatible because of iterator

It seems to be a bug of TypeScript which is already fixed in the latest version
See: microsoft/TypeScript#42543
  • Loading branch information
0b5vr committed May 23, 2022
1 parent 52e8c32 commit 7a7e33e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/three-vrm-springbone/src/VRMSpringBoneJoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import type { VRMSpringBoneJointSettings } from './VRMSpringBoneJointSettings';
// http://rocketjump.skr.jp/unity3d/109/
// https://github.com/dwango/UniVRM/blob/master/Scripts/SpringBone/VRMSpringBone.cs

const IDENTITY_MATRIX4 = Object.freeze(new THREE.Matrix4());
const IDENTITY_QUATERNION = Object.freeze(new THREE.Quaternion());
const IDENTITY_MATRIX4 = new THREE.Matrix4();
const IDENTITY_QUATERNION = new THREE.Quaternion();

// 計算中の一時保存用変数(一度インスタンスを作ったらあとは使い回す)
const _v3A = new THREE.Vector3();
Expand Down

0 comments on commit 7a7e33e

Please sign in to comment.