Mr.doob преди 5 години
родител
ревизия
4bf5eb9097
променени са 3 файла, в които са добавени 315 реда и са изтрити 331 реда
  1. 44 56
      build/three.js
  2. 227 228
      build/three.min.js
  3. 44 47
      build/three.module.js

+ 44 - 56
build/three.js

@@ -26462,38 +26462,34 @@
 
 	} );
 
-	function FogExp2( color, density ) {
+	var FogExp2 = function FogExp2( color, density ) {
 
 		this.name = '';
 
 		this.color = new Color( color );
 		this.density = ( density !== undefined ) ? density : 0.00025;
 
-	}
-
-	Object.assign( FogExp2.prototype, {
-
-		isFogExp2: true,
+	};
 
-		clone: function () {
+	FogExp2.prototype.clone = function clone () {
 
-			return new FogExp2( this.color, this.density );
+		return new FogExp2( this.color, this.density );
 
-		},
+	};
 
-		toJSON: function ( /* meta */ ) {
+	FogExp2.prototype.toJSON = function toJSON ( /* meta */ ) {
 
-			return {
-				type: 'FogExp2',
-				color: this.color.getHex(),
-				density: this.density
-			};
+		return {
+			type: 'FogExp2',
+			color: this.color.getHex(),
+			density: this.density
+		};
 
-		}
+	};
 
-	} );
+	FogExp2.prototype.isFogExp2 = true;
 
-	function Fog( color, near, far ) {
+	var Fog = function Fog( color, near, far ) {
 
 		this.name = '';
 
@@ -26502,60 +26498,52 @@
 		this.near = ( near !== undefined ) ? near : 1;
 		this.far = ( far !== undefined ) ? far : 1000;
 
-	}
-
-	Object.assign( Fog.prototype, {
-
-		isFog: true,
+	};
 
-		clone: function () {
+	Fog.prototype.clone = function clone () {
 
-			return new Fog( this.color, this.near, this.far );
+		return new Fog( this.color, this.near, this.far );
 
-		},
+	};
 
-		toJSON: function ( /* meta */ ) {
+	Fog.prototype.toJSON = function toJSON ( /* meta */ ) {
 
-			return {
-				type: 'Fog',
-				color: this.color.getHex(),
-				near: this.near,
-				far: this.far
-			};
+		return {
+			type: 'Fog',
+			color: this.color.getHex(),
+			near: this.near,
+			far: this.far
+		};
 
-		}
+	};
 
-	} );
+	Fog.prototype.isFog = true;
 
 	function Scene() {
 
-		Object3D.call( this );
+			Object3D.call(this);
+			this.type = 'Scene';
 
-		this.type = 'Scene';
+			this.background = null;
+			this.environment = null;
+			this.fog = null;
 
-		this.background = null;
-		this.environment = null;
-		this.fog = null;
+			this.overrideMaterial = null;
 
-		this.overrideMaterial = null;
+			this.autoUpdate = true; // checked by the renderer
 
-		this.autoUpdate = true; // checked by the renderer
+			if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
 
-		if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
+				__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef
 
-			__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef
+			}
 
 		}
 
-	}
-
-	Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
-
-		constructor: Scene,
+		Scene.prototype = Object.create( Object3D.prototype );
+		Scene.prototype.constructor = Scene;
 
-		isScene: true,
-
-		copy: function ( source, recursive ) {
+		Scene.prototype.copy = function copy ( source, recursive ) {
 
 			Object3D.prototype.copy.call( this, source, recursive );
 
@@ -26570,9 +26558,9 @@
 
 			return this;
 
-		},
+		};
 
-		toJSON: function ( meta ) {
+		Scene.prototype.toJSON = function toJSON ( meta ) {
 
 			var data = Object3D.prototype.toJSON.call( this, meta );
 
@@ -26582,9 +26570,9 @@
 
 			return data;
 
-		}
+		};
 
-	} );
+	Scene.prototype.isScene = true;
 
 	function InterleavedBuffer( array, stride ) {
 

Файловите разлики са ограничени, защото са твърде много
+ 227 - 228
build/three.min.js


+ 44 - 47
build/three.module.js

@@ -26520,26 +26520,24 @@ WebGL1Renderer.prototype = Object.assign( Object.create( WebGLRenderer.prototype
 
 } );
 
-function FogExp2( color, density ) {
+class FogExp2 {
 
-	this.name = '';
-
-	this.color = new Color( color );
-	this.density = ( density !== undefined ) ? density : 0.00025;
+	constructor( color, density ) {
 
-}
+		this.name = '';
 
-Object.assign( FogExp2.prototype, {
+		this.color = new Color( color );
+		this.density = ( density !== undefined ) ? density : 0.00025;
 
-	isFogExp2: true,
+	}
 
-	clone: function () {
+	clone() {
 
 		return new FogExp2( this.color, this.density );
 
-	},
+	}
 
-	toJSON: function ( /* meta */ ) {
+	toJSON( /* meta */ ) {
 
 		return {
 			type: 'FogExp2',
@@ -26549,30 +26547,30 @@ Object.assign( FogExp2.prototype, {
 
 	}
 
-} );
+}
 
-function Fog( color, near, far ) {
+FogExp2.prototype.isFogExp2 = true;
 
-	this.name = '';
+class Fog {
 
-	this.color = new Color( color );
+	constructor( color, near, far ) {
 
-	this.near = ( near !== undefined ) ? near : 1;
-	this.far = ( far !== undefined ) ? far : 1000;
+		this.name = '';
 
-}
+		this.color = new Color( color );
 
-Object.assign( Fog.prototype, {
+		this.near = ( near !== undefined ) ? near : 1;
+		this.far = ( far !== undefined ) ? far : 1000;
 
-	isFog: true,
+	}
 
-	clone: function () {
+	clone() {
 
 		return new Fog( this.color, this.near, this.far );
 
-	},
+	}
 
-	toJSON: function ( /* meta */ ) {
+	toJSON( /* meta */ ) {
 
 		return {
 			type: 'Fog',
@@ -26583,39 +26581,36 @@ Object.assign( Fog.prototype, {
 
 	}
 
-} );
-
-function Scene() {
-
-	Object3D.call( this );
+}
 
-	this.type = 'Scene';
+Fog.prototype.isFog = true;
 
-	this.background = null;
-	this.environment = null;
-	this.fog = null;
+class Scene extends Object3D {
 
-	this.overrideMaterial = null;
+	constructor() {
 
-	this.autoUpdate = true; // checked by the renderer
+		super();
+		this.type = 'Scene';
 
-	if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
+		this.background = null;
+		this.environment = null;
+		this.fog = null;
 
-		__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef
+		this.overrideMaterial = null;
 
-	}
+		this.autoUpdate = true; // checked by the renderer
 
-}
+		if ( typeof __THREE_DEVTOOLS__ !== 'undefined' ) {
 
-Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
+			__THREE_DEVTOOLS__.dispatchEvent( new CustomEvent( 'observe', { detail: this } ) ); // eslint-disable-line no-undef
 
-	constructor: Scene,
+		}
 
-	isScene: true,
+	}
 
-	copy: function ( source, recursive ) {
+	copy( source, recursive ) {
 
-		Object3D.prototype.copy.call( this, source, recursive );
+		super.copy( source, recursive );
 
 		if ( source.background !== null ) this.background = source.background.clone();
 		if ( source.environment !== null ) this.environment = source.environment.clone();
@@ -26628,11 +26623,11 @@ Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 		return this;
 
-	},
+	}
 
-	toJSON: function ( meta ) {
+	toJSON( meta ) {
 
-		const data = Object3D.prototype.toJSON.call( this, meta );
+		const data = super.toJSON( meta );
 
 		if ( this.background !== null ) data.object.background = this.background.toJSON( meta );
 		if ( this.environment !== null ) data.object.environment = this.environment.toJSON( meta );
@@ -26642,7 +26637,9 @@ Scene.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 	}
 
-} );
+}
+
+Scene.prototype.isScene = true;
 
 function InterleavedBuffer( array, stride ) {
 

Някои файлове не бяха показани, защото твърде много файлове са промени