Mr.doob 4 gadi atpakaļ
vecāks
revīzija
2f1c268cfc
3 mainītis faili ar 155 papildinājumiem un 147 dzēšanām
  1. 86 75
      build/three.js
  2. 0 0
      build/three.min.js
  3. 69 72
      build/three.module.js

+ 86 - 75
build/three.js

@@ -1904,6 +1904,9 @@
 			this.depth = source.depth;
 			this.depth = source.depth;
 			this.viewport.copy(source.viewport);
 			this.viewport.copy(source.viewport);
 			this.texture = source.texture.clone();
 			this.texture = source.texture.clone();
+			this.texture.image = { ...this.texture.image
+			}; // See #20328.
+
 			this.depthBuffer = source.depthBuffer;
 			this.depthBuffer = source.depthBuffer;
 			this.stencilBuffer = source.stencilBuffer;
 			this.stencilBuffer = source.stencilBuffer;
 			this.depthTexture = source.depthTexture;
 			this.depthTexture = source.depthTexture;
@@ -6077,69 +6080,71 @@
 
 
 	let materialId = 0;
 	let materialId = 0;
 
 
-	function Material() {
-		Object.defineProperty(this, 'id', {
-			value: materialId++
-		});
-		this.uuid = generateUUID();
-		this.name = '';
-		this.type = 'Material';
-		this.fog = true;
-		this.blending = NormalBlending;
-		this.side = FrontSide;
-		this.vertexColors = false;
-		this.opacity = 1;
-		this.transparent = false;
-		this.blendSrc = SrcAlphaFactor;
-		this.blendDst = OneMinusSrcAlphaFactor;
-		this.blendEquation = AddEquation;
-		this.blendSrcAlpha = null;
-		this.blendDstAlpha = null;
-		this.blendEquationAlpha = null;
-		this.depthFunc = LessEqualDepth;
-		this.depthTest = true;
-		this.depthWrite = true;
-		this.stencilWriteMask = 0xff;
-		this.stencilFunc = AlwaysStencilFunc;
-		this.stencilRef = 0;
-		this.stencilFuncMask = 0xff;
-		this.stencilFail = KeepStencilOp;
-		this.stencilZFail = KeepStencilOp;
-		this.stencilZPass = KeepStencilOp;
-		this.stencilWrite = false;
-		this.clippingPlanes = null;
-		this.clipIntersection = false;
-		this.clipShadows = false;
-		this.shadowSide = null;
-		this.colorWrite = true;
-		this.precision = null; // override the renderer's default precision for this material
-
-		this.polygonOffset = false;
-		this.polygonOffsetFactor = 0;
-		this.polygonOffsetUnits = 0;
-		this.dithering = false;
-		this.alphaTest = 0;
-		this.alphaToCoverage = false;
-		this.premultipliedAlpha = false;
-		this.visible = true;
-		this.toneMapped = true;
-		this.userData = {};
-		this.version = 0;
-	}
-
-	Material.prototype = Object.assign(Object.create(EventDispatcher.prototype), {
-		constructor: Material,
-		isMaterial: true,
-		onBuild: function ()
+	class Material extends EventDispatcher {
+		constructor() {
+			super();
+			Object.defineProperty(this, 'id', {
+				value: materialId++
+			});
+			this.uuid = generateUUID();
+			this.name = '';
+			this.type = 'Material';
+			this.fog = true;
+			this.blending = NormalBlending;
+			this.side = FrontSide;
+			this.vertexColors = false;
+			this.opacity = 1;
+			this.transparent = false;
+			this.blendSrc = SrcAlphaFactor;
+			this.blendDst = OneMinusSrcAlphaFactor;
+			this.blendEquation = AddEquation;
+			this.blendSrcAlpha = null;
+			this.blendDstAlpha = null;
+			this.blendEquationAlpha = null;
+			this.depthFunc = LessEqualDepth;
+			this.depthTest = true;
+			this.depthWrite = true;
+			this.stencilWriteMask = 0xff;
+			this.stencilFunc = AlwaysStencilFunc;
+			this.stencilRef = 0;
+			this.stencilFuncMask = 0xff;
+			this.stencilFail = KeepStencilOp;
+			this.stencilZFail = KeepStencilOp;
+			this.stencilZPass = KeepStencilOp;
+			this.stencilWrite = false;
+			this.clippingPlanes = null;
+			this.clipIntersection = false;
+			this.clipShadows = false;
+			this.shadowSide = null;
+			this.colorWrite = true;
+			this.precision = null; // override the renderer's default precision for this material
+
+			this.polygonOffset = false;
+			this.polygonOffsetFactor = 0;
+			this.polygonOffsetUnits = 0;
+			this.dithering = false;
+			this.alphaTest = 0;
+			this.alphaToCoverage = false;
+			this.premultipliedAlpha = false;
+			this.visible = true;
+			this.toneMapped = true;
+			this.userData = {};
+			this.version = 0;
+		}
+
+		onBuild()
 		/* shaderobject, renderer */
 		/* shaderobject, renderer */
-		{},
-		onBeforeCompile: function ()
+		{}
+
+		onBeforeCompile()
 		/* shaderobject, renderer */
 		/* shaderobject, renderer */
-		{},
-		customProgramCacheKey: function () {
+		{}
+
+		customProgramCacheKey() {
 			return this.onBeforeCompile.toString();
 			return this.onBeforeCompile.toString();
-		},
-		setValues: function (values) {
+		}
+
+		setValues(values) {
 			if (values === undefined) return;
 			if (values === undefined) return;
 
 
 			for (const key in values) {
 			for (const key in values) {
@@ -6172,8 +6177,9 @@
 					this[key] = newValue;
 					this[key] = newValue;
 				}
 				}
 			}
 			}
-		},
-		toJSON: function (meta) {
+		}
+
+		toJSON(meta) {
 			const isRoot = meta === undefined || typeof meta === 'string';
 			const isRoot = meta === undefined || typeof meta === 'string';
 
 
 			if (isRoot) {
 			if (isRoot) {
@@ -6331,11 +6337,13 @@
 			}
 			}
 
 
 			return data;
 			return data;
-		},
-		clone: function () {
+		}
+
+		clone() {
 			return new this.constructor().copy(this);
 			return new this.constructor().copy(this);
-		},
-		copy: function (source) {
+		}
+
+		copy(source) {
 			this.name = source.name;
 			this.name = source.name;
 			this.fog = source.fog;
 			this.fog = source.fog;
 			this.blending = source.blending;
 			this.blending = source.blending;
@@ -6389,18 +6397,21 @@
 			this.toneMapped = source.toneMapped;
 			this.toneMapped = source.toneMapped;
 			this.userData = JSON.parse(JSON.stringify(source.userData));
 			this.userData = JSON.parse(JSON.stringify(source.userData));
 			return this;
 			return this;
-		},
-		dispose: function () {
+		}
+
+		dispose() {
 			this.dispatchEvent({
 			this.dispatchEvent({
 				type: 'dispose'
 				type: 'dispose'
 			});
 			});
 		}
 		}
-	});
-	Object.defineProperty(Material.prototype, 'needsUpdate', {
-		set: function (value) {
+
+		set needsUpdate(value) {
 			if (value === true) this.version++;
 			if (value === true) this.version++;
 		}
 		}
-	});
+
+	}
+
+	Material.prototype.isMaterial = true;
 
 
 	const _colorKeywords = {
 	const _colorKeywords = {
 		'aliceblue': 0xF0F8FF,
 		'aliceblue': 0xF0F8FF,
@@ -10077,7 +10088,7 @@
 	const UniformsLib = {
 	const UniformsLib = {
 		common: {
 		common: {
 			diffuse: {
 			diffuse: {
-				value: new Color(0xeeeeee)
+				value: new Color(0xffffff)
 			},
 			},
 			opacity: {
 			opacity: {
 				value: 1.0
 				value: 1.0
@@ -10303,7 +10314,7 @@
 		},
 		},
 		points: {
 		points: {
 			diffuse: {
 			diffuse: {
-				value: new Color(0xeeeeee)
+				value: new Color(0xffffff)
 			},
 			},
 			opacity: {
 			opacity: {
 				value: 1.0
 				value: 1.0
@@ -10326,7 +10337,7 @@
 		},
 		},
 		sprite: {
 		sprite: {
 			diffuse: {
 			diffuse: {
-				value: new Color(0xeeeeee)
+				value: new Color(0xffffff)
 			},
 			},
 			opacity: {
 			opacity: {
 				value: 1.0
 				value: 1.0

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
build/three.min.js


+ 69 - 72
build/three.module.js

@@ -2514,6 +2514,7 @@ class WebGLRenderTarget extends EventDispatcher {
 		this.viewport.copy( source.viewport );
 		this.viewport.copy( source.viewport );
 
 
 		this.texture = source.texture.clone();
 		this.texture = source.texture.clone();
+		this.texture.image = { ...this.texture.image }; // See #20328.
 
 
 		this.depthBuffer = source.depthBuffer;
 		this.depthBuffer = source.depthBuffer;
 		this.stencilBuffer = source.stencilBuffer;
 		this.stencilBuffer = source.stencilBuffer;
@@ -7999,91 +8000,89 @@ class Triangle {
 
 
 let materialId = 0;
 let materialId = 0;
 
 
-function Material() {
+class Material extends EventDispatcher {
 
 
-	Object.defineProperty( this, 'id', { value: materialId ++ } );
-
-	this.uuid = generateUUID();
+	constructor() {
 
 
-	this.name = '';
-	this.type = 'Material';
+		super();
 
 
-	this.fog = true;
+		Object.defineProperty( this, 'id', { value: materialId ++ } );
 
 
-	this.blending = NormalBlending;
-	this.side = FrontSide;
-	this.vertexColors = false;
+		this.uuid = generateUUID();
 
 
-	this.opacity = 1;
-	this.transparent = false;
+		this.name = '';
+		this.type = 'Material';
 
 
-	this.blendSrc = SrcAlphaFactor;
-	this.blendDst = OneMinusSrcAlphaFactor;
-	this.blendEquation = AddEquation;
-	this.blendSrcAlpha = null;
-	this.blendDstAlpha = null;
-	this.blendEquationAlpha = null;
+		this.fog = true;
 
 
-	this.depthFunc = LessEqualDepth;
-	this.depthTest = true;
-	this.depthWrite = true;
+		this.blending = NormalBlending;
+		this.side = FrontSide;
+		this.vertexColors = false;
 
 
-	this.stencilWriteMask = 0xff;
-	this.stencilFunc = AlwaysStencilFunc;
-	this.stencilRef = 0;
-	this.stencilFuncMask = 0xff;
-	this.stencilFail = KeepStencilOp;
-	this.stencilZFail = KeepStencilOp;
-	this.stencilZPass = KeepStencilOp;
-	this.stencilWrite = false;
+		this.opacity = 1;
+		this.transparent = false;
 
 
-	this.clippingPlanes = null;
-	this.clipIntersection = false;
-	this.clipShadows = false;
+		this.blendSrc = SrcAlphaFactor;
+		this.blendDst = OneMinusSrcAlphaFactor;
+		this.blendEquation = AddEquation;
+		this.blendSrcAlpha = null;
+		this.blendDstAlpha = null;
+		this.blendEquationAlpha = null;
 
 
-	this.shadowSide = null;
+		this.depthFunc = LessEqualDepth;
+		this.depthTest = true;
+		this.depthWrite = true;
 
 
-	this.colorWrite = true;
+		this.stencilWriteMask = 0xff;
+		this.stencilFunc = AlwaysStencilFunc;
+		this.stencilRef = 0;
+		this.stencilFuncMask = 0xff;
+		this.stencilFail = KeepStencilOp;
+		this.stencilZFail = KeepStencilOp;
+		this.stencilZPass = KeepStencilOp;
+		this.stencilWrite = false;
 
 
-	this.precision = null; // override the renderer's default precision for this material
+		this.clippingPlanes = null;
+		this.clipIntersection = false;
+		this.clipShadows = false;
 
 
-	this.polygonOffset = false;
-	this.polygonOffsetFactor = 0;
-	this.polygonOffsetUnits = 0;
+		this.shadowSide = null;
 
 
-	this.dithering = false;
+		this.colorWrite = true;
 
 
-	this.alphaTest = 0;
-	this.alphaToCoverage = false;
-	this.premultipliedAlpha = false;
+		this.precision = null; // override the renderer's default precision for this material
 
 
-	this.visible = true;
+		this.polygonOffset = false;
+		this.polygonOffsetFactor = 0;
+		this.polygonOffsetUnits = 0;
 
 
-	this.toneMapped = true;
+		this.dithering = false;
 
 
-	this.userData = {};
+		this.alphaTest = 0;
+		this.alphaToCoverage = false;
+		this.premultipliedAlpha = false;
 
 
-	this.version = 0;
+		this.visible = true;
 
 
-}
+		this.toneMapped = true;
 
 
-Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ), {
+		this.userData = {};
 
 
-	constructor: Material,
+		this.version = 0;
 
 
-	isMaterial: true,
+	}
 
 
-	onBuild: function ( /* shaderobject, renderer */ ) {},
+	onBuild( /* shaderobject, renderer */ ) {}
 
 
-	onBeforeCompile: function ( /* shaderobject, renderer */ ) {},
+	onBeforeCompile( /* shaderobject, renderer */ ) {}
 
 
-	customProgramCacheKey: function () {
+	customProgramCacheKey() {
 
 
 		return this.onBeforeCompile.toString();
 		return this.onBeforeCompile.toString();
 
 
-	},
+	}
 
 
-	setValues: function ( values ) {
+	setValues( values ) {
 
 
 		if ( values === undefined ) return;
 		if ( values === undefined ) return;
 
 
@@ -8132,9 +8131,9 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 
 		}
 		}
 
 
-	},
+	}
 
 
-	toJSON: function ( meta ) {
+	toJSON( meta ) {
 
 
 		const isRoot = ( meta === undefined || typeof meta === 'string' );
 		const isRoot = ( meta === undefined || typeof meta === 'string' );
 
 
@@ -8348,15 +8347,15 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 
 		return data;
 		return data;
 
 
-	},
+	}
 
 
-	clone: function () {
+	clone() {
 
 
 		return new this.constructor().copy( this );
 		return new this.constructor().copy( this );
 
 
-	},
+	}
 
 
-	copy: function ( source ) {
+	copy( source ) {
 
 
 		this.name = source.name;
 		this.name = source.name;
 
 
@@ -8433,25 +8432,23 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 
 		return this;
 		return this;
 
 
-	},
+	}
 
 
-	dispose: function () {
+	dispose() {
 
 
 		this.dispatchEvent( { type: 'dispose' } );
 		this.dispatchEvent( { type: 'dispose' } );
 
 
 	}
 	}
 
 
-} );
-
-Object.defineProperty( Material.prototype, 'needsUpdate', {
-
-	set: function ( value ) {
+	set needsUpdate( value ) {
 
 
 		if ( value === true ) this.version ++;
 		if ( value === true ) this.version ++;
 
 
 	}
 	}
 
 
-} );
+}
+
+Material.prototype.isMaterial = true;
 
 
 const _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF,
 const _colorKeywords = { 'aliceblue': 0xF0F8FF, 'antiquewhite': 0xFAEBD7, 'aqua': 0x00FFFF, 'aquamarine': 0x7FFFD4, 'azure': 0xF0FFFF,
 	'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2,
 	'beige': 0xF5F5DC, 'bisque': 0xFFE4C4, 'black': 0x000000, 'blanchedalmond': 0xFFEBCD, 'blue': 0x0000FF, 'blueviolet': 0x8A2BE2,
@@ -13145,7 +13142,7 @@ const UniformsLib = {
 
 
 	common: {
 	common: {
 
 
-		diffuse: { value: new Color( 0xeeeeee ) },
+		diffuse: { value: new Color( 0xffffff ) },
 		opacity: { value: 1.0 },
 		opacity: { value: 1.0 },
 
 
 		map: { value: null },
 		map: { value: null },
@@ -13322,7 +13319,7 @@ const UniformsLib = {
 
 
 	points: {
 	points: {
 
 
-		diffuse: { value: new Color( 0xeeeeee ) },
+		diffuse: { value: new Color( 0xffffff ) },
 		opacity: { value: 1.0 },
 		opacity: { value: 1.0 },
 		size: { value: 1.0 },
 		size: { value: 1.0 },
 		scale: { value: 1.0 },
 		scale: { value: 1.0 },
@@ -13334,7 +13331,7 @@ const UniformsLib = {
 
 
 	sprite: {
 	sprite: {
 
 
-		diffuse: { value: new Color( 0xeeeeee ) },
+		diffuse: { value: new Color( 0xffffff ) },
 		opacity: { value: 1.0 },
 		opacity: { value: 1.0 },
 		center: { value: new Vector2( 0.5, 0.5 ) },
 		center: { value: new Vector2( 0.5, 0.5 ) },
 		rotation: { value: 0.0 },
 		rotation: { value: 0.0 },

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels