Browse Source

CCDIKSolver: rename _q to _quaternion (#30918)

satelllte 10 months ago
parent
commit
8da96d094f
1 changed files with 3 additions and 3 deletions
  1. 3 3
      examples/jsm/animation/CCDIKSolver.js

+ 3 - 3
examples/jsm/animation/CCDIKSolver.js

@@ -13,7 +13,7 @@ import {
 	Vector3
 } from 'three';
 
-const _q = new Quaternion();
+const _quaternion = new Quaternion();
 const _targetPos = new Vector3();
 const _targetVec = new Vector3();
 const _effectorPos = new Vector3();
@@ -194,8 +194,8 @@ class CCDIKSolver {
 				_axis.crossVectors( _effectorVec, _targetVec );
 				_axis.normalize();
 
-				_q.setFromAxisAngle( _axis, angle );
-				link.quaternion.multiply( _q );
+				_quaternion.setFromAxisAngle( _axis, angle );
+				link.quaternion.multiply( _quaternion );
 
 				// TODO: re-consider the limitation specification
 				if ( limitation !== undefined ) {

粤ICP备19079148号