소스 검색

Updated builds.

Mr.doob 1 년 전
부모
커밋
737f11616e
3개의 변경된 파일9개의 추가작업 그리고 9개의 파일을 삭제
  1. 3 3
      build/three.cjs
  2. 3 3
      build/three.js
  3. 3 3
      build/three.module.js

+ 3 - 3
build/three.cjs

@@ -4160,17 +4160,17 @@ class Vector3 {
 
 	applyQuaternion( q ) {
 
-		// Derived from https://raw.org/proof/vector-rotation-using-quaternions/
+		// quaternion q is assumed to have unit length
 
 		const vx = this.x, vy = this.y, vz = this.z;
 		const qx = q.x, qy = q.y, qz = q.z, qw = q.w;
 
-		// t = 2q x v
+		// t = 2 * cross( q.xyz, v );
 		const tx = 2 * ( qy * vz - qz * vy );
 		const ty = 2 * ( qz * vx - qx * vz );
 		const tz = 2 * ( qx * vy - qy * vx );
 
-		// v + w t + q x t
+		// v + q.w * t + cross( q.xyz, t );
 		this.x = vx + qw * tx + qy * tz - qz * ty;
 		this.y = vy + qw * ty + qz * tx - qx * tz;
 		this.z = vz + qw * tz + qx * ty - qy * tx;

+ 3 - 3
build/three.js

@@ -4165,17 +4165,17 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		applyQuaternion( q ) {
 
-			// Derived from https://raw.org/proof/vector-rotation-using-quaternions/
+			// quaternion q is assumed to have unit length
 
 			const vx = this.x, vy = this.y, vz = this.z;
 			const qx = q.x, qy = q.y, qz = q.z, qw = q.w;
 
-			// t = 2q x v
+			// t = 2 * cross( q.xyz, v );
 			const tx = 2 * ( qy * vz - qz * vy );
 			const ty = 2 * ( qz * vx - qx * vz );
 			const tz = 2 * ( qx * vy - qy * vx );
 
-			// v + w t + q x t
+			// v + q.w * t + cross( q.xyz, t );
 			this.x = vx + qw * tx + qy * tz - qz * ty;
 			this.y = vy + qw * ty + qz * tx - qx * tz;
 			this.z = vz + qw * tz + qx * ty - qy * tx;

+ 3 - 3
build/three.module.js

@@ -4158,17 +4158,17 @@ class Vector3 {
 
 	applyQuaternion( q ) {
 
-		// Derived from https://raw.org/proof/vector-rotation-using-quaternions/
+		// quaternion q is assumed to have unit length
 
 		const vx = this.x, vy = this.y, vz = this.z;
 		const qx = q.x, qy = q.y, qz = q.z, qw = q.w;
 
-		// t = 2q x v
+		// t = 2 * cross( q.xyz, v );
 		const tx = 2 * ( qy * vz - qz * vy );
 		const ty = 2 * ( qz * vx - qx * vz );
 		const tz = 2 * ( qx * vy - qy * vx );
 
-		// v + w t + q x t
+		// v + q.w * t + cross( q.xyz, t );
 		this.x = vx + qw * tx + qy * tz - qz * ty;
 		this.y = vy + qw * ty + qz * tx - qx * tz;
 		this.z = vz + qw * tz + qx * ty - qy * tx;