提交 b3df09a0 编写于 作者: M Mr.doob

XRHandPrimitiveModel: Clean up.

上级 c1790135
......@@ -8,6 +8,9 @@ import {
Vector3
} from '../../../build/three.module.js';
const _matrix = new Matrix4();
const _vector = new Vector3();
class XRHandPrimitiveModel {
constructor( handModel, controller, path, handedness, options ) {
......@@ -64,9 +67,6 @@ class XRHandPrimitiveModel {
'pinky-finger-tip'
];
this.tempMat = new Matrix4();
this.tempVec = new Vector3();
}
updateMesh() {
......@@ -82,9 +82,9 @@ class XRHandPrimitiveModel {
if ( joint.visible ) {
this.tempVec.setScalar( joint.jointRadius || defaultRadius );
this.tempMat.compose( joint.position, joint.quaternion, this.tempVec );
this.handMesh.setMatrixAt( i, this.tempMat );
_vector.setScalar( joint.jointRadius || defaultRadius );
_matrix.compose( joint.position, joint.quaternion, _vector );
this.handMesh.setMatrixAt( i, _matrix );
count ++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册