浏览代码

Updated builds.

Mugen87 1 年之前
父节点
当前提交
b6fd32c164
共有 5 个文件被更改,包括 57 次插入36 次删除
  1. 19 12
      build/three.cjs
  2. 19 12
      build/three.js
  3. 0 0
      build/three.min.js
  4. 19 12
      build/three.module.js
  5. 0 0
      build/three.module.min.js

+ 19 - 12
build/three.cjs

@@ -4154,21 +4154,20 @@ class Vector3 {
 
 	applyQuaternion( q ) {
 
-		const x = this.x, y = this.y, z = this.z;
-		const qx = q.x, qy = q.y, qz = q.z, qw = q.w;
-
-		// calculate quat * vector
+		// Derived from https://raw.org/proof/vector-rotation-using-quaternions/
 
-		const ix = qw * x + qy * z - qz * y;
-		const iy = qw * y + qz * x - qx * z;
-		const iz = qw * z + qx * y - qy * x;
-		const iw = - qx * x - qy * y - qz * z;
+		const vx = this.x, vy = this.y, vz = this.z;
+		const qx = q.x, qy = q.y, qz = q.z, qw = q.w;
 
-		// calculate result * inverse quat
+		// t = 2q x v
+		const tx = 2 * ( qy * vz - qz * vy );
+		const ty = 2 * ( qz * vx - qx * vz );
+		const tz = 2 * ( qx * vy - qy * vx );
 
-		this.x = ix * qw + iw * - qx + iy * - qz - iz * - qy;
-		this.y = iy * qw + iw * - qy + iz * - qx - ix * - qz;
-		this.z = iz * qw + iw * - qz + ix * - qy - iy * - qx;
+		// v + w t + q x 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;
 
 		return this;
 
@@ -29413,6 +29412,14 @@ class WebGLRenderer {
 
 		function renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ) {
 
+			const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;
+
+			if ( overrideMaterial !== null ) {
+
+				return;
+
+			}
+
 			const isWebGL2 = capabilities.isWebGL2;
 
 			if ( _transmissionRenderTarget === null ) {

+ 19 - 12
build/three.js

@@ -4159,21 +4159,20 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		applyQuaternion( q ) {
 
-			const x = this.x, y = this.y, z = this.z;
-			const qx = q.x, qy = q.y, qz = q.z, qw = q.w;
-
-			// calculate quat * vector
+			// Derived from https://raw.org/proof/vector-rotation-using-quaternions/
 
-			const ix = qw * x + qy * z - qz * y;
-			const iy = qw * y + qz * x - qx * z;
-			const iz = qw * z + qx * y - qy * x;
-			const iw = - qx * x - qy * y - qz * z;
+			const vx = this.x, vy = this.y, vz = this.z;
+			const qx = q.x, qy = q.y, qz = q.z, qw = q.w;
 
-			// calculate result * inverse quat
+			// t = 2q x v
+			const tx = 2 * ( qy * vz - qz * vy );
+			const ty = 2 * ( qz * vx - qx * vz );
+			const tz = 2 * ( qx * vy - qy * vx );
 
-			this.x = ix * qw + iw * - qx + iy * - qz - iz * - qy;
-			this.y = iy * qw + iw * - qy + iz * - qx - ix * - qz;
-			this.z = iz * qw + iw * - qz + ix * - qy - iy * - qx;
+			// v + w t + q x 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;
 
 			return this;
 
@@ -29418,6 +29417,14 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			function renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ) {
 
+				const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;
+
+				if ( overrideMaterial !== null ) {
+
+					return;
+
+				}
+
 				const isWebGL2 = capabilities.isWebGL2;
 
 				if ( _transmissionRenderTarget === null ) {

文件差异内容过多而无法显示
+ 0 - 0
build/three.min.js


+ 19 - 12
build/three.module.js

@@ -4152,21 +4152,20 @@ class Vector3 {
 
 	applyQuaternion( q ) {
 
-		const x = this.x, y = this.y, z = this.z;
-		const qx = q.x, qy = q.y, qz = q.z, qw = q.w;
-
-		// calculate quat * vector
+		// Derived from https://raw.org/proof/vector-rotation-using-quaternions/
 
-		const ix = qw * x + qy * z - qz * y;
-		const iy = qw * y + qz * x - qx * z;
-		const iz = qw * z + qx * y - qy * x;
-		const iw = - qx * x - qy * y - qz * z;
+		const vx = this.x, vy = this.y, vz = this.z;
+		const qx = q.x, qy = q.y, qz = q.z, qw = q.w;
 
-		// calculate result * inverse quat
+		// t = 2q x v
+		const tx = 2 * ( qy * vz - qz * vy );
+		const ty = 2 * ( qz * vx - qx * vz );
+		const tz = 2 * ( qx * vy - qy * vx );
 
-		this.x = ix * qw + iw * - qx + iy * - qz - iz * - qy;
-		this.y = iy * qw + iw * - qy + iz * - qx - ix * - qz;
-		this.z = iz * qw + iw * - qz + ix * - qy - iy * - qx;
+		// v + w t + q x 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;
 
 		return this;
 
@@ -29411,6 +29410,14 @@ class WebGLRenderer {
 
 		function renderTransmissionPass( opaqueObjects, transmissiveObjects, scene, camera ) {
 
+			const overrideMaterial = scene.isScene === true ? scene.overrideMaterial : null;
+
+			if ( overrideMaterial !== null ) {
+
+				return;
+
+			}
+
 			const isWebGL2 = capabilities.isWebGL2;
 
 			if ( _transmissionRenderTarget === null ) {

文件差异内容过多而无法显示
+ 0 - 0
build/three.module.min.js


部分文件因为文件数量过多而无法显示