Browse Source

Updated builds.

Mr.doob 2 years ago
parent
commit
29e9f905ff
4 changed files with 513 additions and 120 deletions
  1. 171 40
      build/three.cjs
  2. 171 40
      build/three.js
  3. 0 0
      build/three.min.js
  4. 171 40
      build/three.module.js

+ 171 - 40
build/three.cjs

@@ -2865,43 +2865,28 @@ function LinearToSRGB( c ) {
 
 
 /**
- * Matrices for sRGB and Display P3, based on the W3C specifications
- * for sRGB and Display P3, and the ICC specification for the D50
- * connection space.
+ * Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping
+ * or clipping. Based on W3C specifications for sRGB and Display P3,
+ * and ICC specifications for the D50 connection space. Values in/out
+ * are _linear_ sRGB and _linear_ Display P3.
+ *
+ * Note that both sRGB and Display P3 use the sRGB transfer functions.
  *
  * Reference:
  * - http://www.russellcottrell.com/photo/matrixCalculator.htm
  */
 
-const SRGB_TO_DISPLAY_P3 = new Matrix3().multiplyMatrices(
-	// XYZ to Display P3
-	new Matrix3().set(
-		2.4039840, - 0.9899069, - 0.3976415,
-		- 0.8422229, 1.7988437, 0.0160354,
-		0.0482059, - 0.0974068, 1.2740049,
-	),
-	// sRGB to XYZ
-	new Matrix3().set(
-		0.4360413, 0.3851129, 0.1430458,
-		0.2224845, 0.7169051, 0.0606104,
-		0.0139202, 0.0970672, 0.7139126,
-	),
-);
+const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = new Matrix3().fromArray( [
+	0.8224621, 0.0331941, 0.0170827,
+	0.1775380, 0.9668058, 0.0723974,
+	- 0.0000001, 0.0000001, 0.9105199
+] );
 
-const DISPLAY_P3_TO_SRGB = new Matrix3().multiplyMatrices(
-	// XYZ to sRGB
-	new Matrix3().set(
-		3.1341864, - 1.6172090, - 0.4906941,
-		- 0.9787485, 1.9161301, 0.0334334,
-		0.0719639, - 0.2289939, 1.4057537,
-	),
-	// Display P3 to XYZ
-	new Matrix3().set(
-		0.5151187, 0.2919778, 0.1571035,
-		0.2411892, 0.6922441, 0.0665668,
-		- 0.0010505, 0.0418791, 0.7840713,
-	),
-);
+const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = new Matrix3().fromArray( [
+	1.2249401, - 0.0420569, - 0.0196376,
+	- 0.2249404, 1.0420571, - 0.0786361,
+	0.0000001, 0.0000000, 1.0982735
+] );
 
 const _vector$c = new Vector3();
 
@@ -2909,7 +2894,7 @@ function DisplayP3ToLinearSRGB( color ) {
 
 	color.convertSRGBToLinear();
 
-	_vector$c.set( color.r, color.g, color.b ).applyMatrix3( DISPLAY_P3_TO_SRGB );
+	_vector$c.set( color.r, color.g, color.b ).applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB );
 
 	return color.setRGB( _vector$c.x, _vector$c.y, _vector$c.z );
 
@@ -2917,7 +2902,7 @@ function DisplayP3ToLinearSRGB( color ) {
 
 function LinearSRGBToDisplayP3( color ) {
 
-	_vector$c.set( color.r, color.g, color.b ).applyMatrix3( SRGB_TO_DISPLAY_P3 );
+	_vector$c.set( color.r, color.g, color.b ).applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 );
 
 	return color.setRGB( _vector$c.x, _vector$c.y, _vector$c.z ).convertLinearToSRGB();
 
@@ -3316,7 +3301,7 @@ class Texture extends EventDispatcher {
 
 	}
 
-	set image( value ) {
+	set image( value = null ) {
 
 		this.source.data = value;
 
@@ -5466,8 +5451,8 @@ class Ray {
 		// t1 = second intersect point - exit point on back of sphere
 		const t1 = tca + thc;
 
-		// test to see if both t0 and t1 are behind the ray - if so, return null
-		if ( t0 < 0 && t1 < 0 ) return null;
+		// test to see if t1 is behind the ray - if so, return null
+		if ( t1 < 0 ) return null;
 
 		// test to see if t0 is behind the ray:
 		// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,
@@ -10905,10 +10890,6 @@ class BufferGeometry extends EventDispatcher {
 
 		this.userData = source.userData;
 
-		// geometry generator parameters
-
-		if ( source.parameters !== undefined ) this.parameters = Object.assign( {}, source.parameters );
-
 		return this;
 
 	}
@@ -11466,6 +11447,16 @@ class BoxGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments );
@@ -12983,6 +12974,16 @@ class PlaneGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments );
@@ -33654,6 +33655,16 @@ class LatheGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength );
@@ -33767,6 +33778,16 @@ class CircleGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength );
@@ -34036,6 +34057,16 @@ class CylinderGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );
@@ -34367,6 +34398,16 @@ class PolyhedronGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details );
@@ -34570,6 +34611,16 @@ class EdgesGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 }
 
 class Shape extends Path {
@@ -36217,6 +36268,16 @@ class ExtrudeGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	toJSON() {
 
 		const data = super.toJSON();
@@ -36515,6 +36576,16 @@ class RingGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength );
@@ -36649,6 +36720,16 @@ class ShapeGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	toJSON() {
 
 		const data = super.toJSON();
@@ -36815,6 +36896,16 @@ class SphereGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength );
@@ -36951,6 +37042,16 @@ class TorusGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc );
@@ -37103,6 +37204,16 @@ class TorusKnotGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q );
@@ -37270,6 +37381,16 @@ class TubeGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	toJSON() {
 
 		const data = super.toJSON();
@@ -37406,6 +37527,16 @@ class WireframeGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 }
 
 function isUniqueEdge( start, end, edges ) {

+ 171 - 40
build/three.js

@@ -2870,43 +2870,28 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 
 	/**
-	 * Matrices for sRGB and Display P3, based on the W3C specifications
-	 * for sRGB and Display P3, and the ICC specification for the D50
-	 * connection space.
+	 * Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping
+	 * or clipping. Based on W3C specifications for sRGB and Display P3,
+	 * and ICC specifications for the D50 connection space. Values in/out
+	 * are _linear_ sRGB and _linear_ Display P3.
+	 *
+	 * Note that both sRGB and Display P3 use the sRGB transfer functions.
 	 *
 	 * Reference:
 	 * - http://www.russellcottrell.com/photo/matrixCalculator.htm
 	 */
 
-	const SRGB_TO_DISPLAY_P3 = new Matrix3().multiplyMatrices(
-		// XYZ to Display P3
-		new Matrix3().set(
-			2.4039840, - 0.9899069, - 0.3976415,
-			- 0.8422229, 1.7988437, 0.0160354,
-			0.0482059, - 0.0974068, 1.2740049,
-		),
-		// sRGB to XYZ
-		new Matrix3().set(
-			0.4360413, 0.3851129, 0.1430458,
-			0.2224845, 0.7169051, 0.0606104,
-			0.0139202, 0.0970672, 0.7139126,
-		),
-	);
+	const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = new Matrix3().fromArray( [
+		0.8224621, 0.0331941, 0.0170827,
+		0.1775380, 0.9668058, 0.0723974,
+		- 0.0000001, 0.0000001, 0.9105199
+	] );
 
-	const DISPLAY_P3_TO_SRGB = new Matrix3().multiplyMatrices(
-		// XYZ to sRGB
-		new Matrix3().set(
-			3.1341864, - 1.6172090, - 0.4906941,
-			- 0.9787485, 1.9161301, 0.0334334,
-			0.0719639, - 0.2289939, 1.4057537,
-		),
-		// Display P3 to XYZ
-		new Matrix3().set(
-			0.5151187, 0.2919778, 0.1571035,
-			0.2411892, 0.6922441, 0.0665668,
-			- 0.0010505, 0.0418791, 0.7840713,
-		),
-	);
+	const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = new Matrix3().fromArray( [
+		1.2249401, - 0.0420569, - 0.0196376,
+		- 0.2249404, 1.0420571, - 0.0786361,
+		0.0000001, 0.0000000, 1.0982735
+	] );
 
 	const _vector$c = new Vector3();
 
@@ -2914,7 +2899,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		color.convertSRGBToLinear();
 
-		_vector$c.set( color.r, color.g, color.b ).applyMatrix3( DISPLAY_P3_TO_SRGB );
+		_vector$c.set( color.r, color.g, color.b ).applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB );
 
 		return color.setRGB( _vector$c.x, _vector$c.y, _vector$c.z );
 
@@ -2922,7 +2907,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 	function LinearSRGBToDisplayP3( color ) {
 
-		_vector$c.set( color.r, color.g, color.b ).applyMatrix3( SRGB_TO_DISPLAY_P3 );
+		_vector$c.set( color.r, color.g, color.b ).applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 );
 
 		return color.setRGB( _vector$c.x, _vector$c.y, _vector$c.z ).convertLinearToSRGB();
 
@@ -3321,7 +3306,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
-		set image( value ) {
+		set image( value = null ) {
 
 			this.source.data = value;
 
@@ -5471,8 +5456,8 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 			// t1 = second intersect point - exit point on back of sphere
 			const t1 = tca + thc;
 
-			// test to see if both t0 and t1 are behind the ray - if so, return null
-			if ( t0 < 0 && t1 < 0 ) return null;
+			// test to see if t1 is behind the ray - if so, return null
+			if ( t1 < 0 ) return null;
 
 			// test to see if t0 is behind the ray:
 			// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,
@@ -10910,10 +10895,6 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			this.userData = source.userData;
 
-			// geometry generator parameters
-
-			if ( source.parameters !== undefined ) this.parameters = Object.assign( {}, source.parameters );
-
 			return this;
 
 		}
@@ -11471,6 +11452,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments );
@@ -12988,6 +12979,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments );
@@ -33659,6 +33660,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength );
@@ -33772,6 +33783,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength );
@@ -34041,6 +34062,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );
@@ -34372,6 +34403,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details );
@@ -34575,6 +34616,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 	}
 
 	class Shape extends Path {
@@ -36222,6 +36273,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		toJSON() {
 
 			const data = super.toJSON();
@@ -36520,6 +36581,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength );
@@ -36654,6 +36725,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		toJSON() {
 
 			const data = super.toJSON();
@@ -36820,6 +36901,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength );
@@ -36956,6 +37047,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc );
@@ -37108,6 +37209,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		static fromJSON( data ) {
 
 			return new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q );
@@ -37275,6 +37386,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 		toJSON() {
 
 			const data = super.toJSON();
@@ -37411,6 +37532,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 		}
 
+		copy( source ) {
+
+			super.copy( source );
+
+			this.parameters = Object.assign( {}, source.parameters );
+
+			return this;
+
+		}
+
 	}
 
 	function isUniqueEdge( start, end, edges ) {

File diff suppressed because it is too large
+ 0 - 0
build/three.min.js


+ 171 - 40
build/three.module.js

@@ -2863,43 +2863,28 @@ function LinearToSRGB( c ) {
 
 
 /**
- * Matrices for sRGB and Display P3, based on the W3C specifications
- * for sRGB and Display P3, and the ICC specification for the D50
- * connection space.
+ * Matrices converting P3 <-> Rec. 709 primaries, without gamut mapping
+ * or clipping. Based on W3C specifications for sRGB and Display P3,
+ * and ICC specifications for the D50 connection space. Values in/out
+ * are _linear_ sRGB and _linear_ Display P3.
+ *
+ * Note that both sRGB and Display P3 use the sRGB transfer functions.
  *
  * Reference:
  * - http://www.russellcottrell.com/photo/matrixCalculator.htm
  */
 
-const SRGB_TO_DISPLAY_P3 = new Matrix3().multiplyMatrices(
-	// XYZ to Display P3
-	new Matrix3().set(
-		2.4039840, - 0.9899069, - 0.3976415,
-		- 0.8422229, 1.7988437, 0.0160354,
-		0.0482059, - 0.0974068, 1.2740049,
-	),
-	// sRGB to XYZ
-	new Matrix3().set(
-		0.4360413, 0.3851129, 0.1430458,
-		0.2224845, 0.7169051, 0.0606104,
-		0.0139202, 0.0970672, 0.7139126,
-	),
-);
+const LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = new Matrix3().fromArray( [
+	0.8224621, 0.0331941, 0.0170827,
+	0.1775380, 0.9668058, 0.0723974,
+	- 0.0000001, 0.0000001, 0.9105199
+] );
 
-const DISPLAY_P3_TO_SRGB = new Matrix3().multiplyMatrices(
-	// XYZ to sRGB
-	new Matrix3().set(
-		3.1341864, - 1.6172090, - 0.4906941,
-		- 0.9787485, 1.9161301, 0.0334334,
-		0.0719639, - 0.2289939, 1.4057537,
-	),
-	// Display P3 to XYZ
-	new Matrix3().set(
-		0.5151187, 0.2919778, 0.1571035,
-		0.2411892, 0.6922441, 0.0665668,
-		- 0.0010505, 0.0418791, 0.7840713,
-	),
-);
+const LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = new Matrix3().fromArray( [
+	1.2249401, - 0.0420569, - 0.0196376,
+	- 0.2249404, 1.0420571, - 0.0786361,
+	0.0000001, 0.0000000, 1.0982735
+] );
 
 const _vector$c = new Vector3();
 
@@ -2907,7 +2892,7 @@ function DisplayP3ToLinearSRGB( color ) {
 
 	color.convertSRGBToLinear();
 
-	_vector$c.set( color.r, color.g, color.b ).applyMatrix3( DISPLAY_P3_TO_SRGB );
+	_vector$c.set( color.r, color.g, color.b ).applyMatrix3( LINEAR_DISPLAY_P3_TO_LINEAR_SRGB );
 
 	return color.setRGB( _vector$c.x, _vector$c.y, _vector$c.z );
 
@@ -2915,7 +2900,7 @@ function DisplayP3ToLinearSRGB( color ) {
 
 function LinearSRGBToDisplayP3( color ) {
 
-	_vector$c.set( color.r, color.g, color.b ).applyMatrix3( SRGB_TO_DISPLAY_P3 );
+	_vector$c.set( color.r, color.g, color.b ).applyMatrix3( LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 );
 
 	return color.setRGB( _vector$c.x, _vector$c.y, _vector$c.z ).convertLinearToSRGB();
 
@@ -3314,7 +3299,7 @@ class Texture extends EventDispatcher {
 
 	}
 
-	set image( value ) {
+	set image( value = null ) {
 
 		this.source.data = value;
 
@@ -5464,8 +5449,8 @@ class Ray {
 		// t1 = second intersect point - exit point on back of sphere
 		const t1 = tca + thc;
 
-		// test to see if both t0 and t1 are behind the ray - if so, return null
-		if ( t0 < 0 && t1 < 0 ) return null;
+		// test to see if t1 is behind the ray - if so, return null
+		if ( t1 < 0 ) return null;
 
 		// test to see if t0 is behind the ray:
 		// if it is, the ray is inside the sphere, so return the second exit point scaled by t1,
@@ -10903,10 +10888,6 @@ class BufferGeometry extends EventDispatcher {
 
 		this.userData = source.userData;
 
-		// geometry generator parameters
-
-		if ( source.parameters !== undefined ) this.parameters = Object.assign( {}, source.parameters );
-
 		return this;
 
 	}
@@ -11464,6 +11445,16 @@ class BoxGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new BoxGeometry( data.width, data.height, data.depth, data.widthSegments, data.heightSegments, data.depthSegments );
@@ -12981,6 +12972,16 @@ class PlaneGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new PlaneGeometry( data.width, data.height, data.widthSegments, data.heightSegments );
@@ -33652,6 +33653,16 @@ class LatheGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new LatheGeometry( data.points, data.segments, data.phiStart, data.phiLength );
@@ -33765,6 +33776,16 @@ class CircleGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new CircleGeometry( data.radius, data.segments, data.thetaStart, data.thetaLength );
@@ -34034,6 +34055,16 @@ class CylinderGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new CylinderGeometry( data.radiusTop, data.radiusBottom, data.height, data.radialSegments, data.heightSegments, data.openEnded, data.thetaStart, data.thetaLength );
@@ -34365,6 +34396,16 @@ class PolyhedronGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new PolyhedronGeometry( data.vertices, data.indices, data.radius, data.details );
@@ -34568,6 +34609,16 @@ class EdgesGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 }
 
 class Shape extends Path {
@@ -36215,6 +36266,16 @@ class ExtrudeGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	toJSON() {
 
 		const data = super.toJSON();
@@ -36513,6 +36574,16 @@ class RingGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new RingGeometry( data.innerRadius, data.outerRadius, data.thetaSegments, data.phiSegments, data.thetaStart, data.thetaLength );
@@ -36647,6 +36718,16 @@ class ShapeGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	toJSON() {
 
 		const data = super.toJSON();
@@ -36813,6 +36894,16 @@ class SphereGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new SphereGeometry( data.radius, data.widthSegments, data.heightSegments, data.phiStart, data.phiLength, data.thetaStart, data.thetaLength );
@@ -36949,6 +37040,16 @@ class TorusGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new TorusGeometry( data.radius, data.tube, data.radialSegments, data.tubularSegments, data.arc );
@@ -37101,6 +37202,16 @@ class TorusKnotGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	static fromJSON( data ) {
 
 		return new TorusKnotGeometry( data.radius, data.tube, data.tubularSegments, data.radialSegments, data.p, data.q );
@@ -37268,6 +37379,16 @@ class TubeGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 	toJSON() {
 
 		const data = super.toJSON();
@@ -37404,6 +37525,16 @@ class WireframeGeometry extends BufferGeometry {
 
 	}
 
+	copy( source ) {
+
+		super.copy( source );
+
+		this.parameters = Object.assign( {}, source.parameters );
+
+		return this;
+
+	}
+
 }
 
 function isUniqueEdge( start, end, edges ) {

Some files were not shown because too many files changed in this diff