Mr.doob 8 years ago
parent
commit
f5b9e5a3b3
5 changed files with 437 additions and 357 deletions
  1. 46 6
      build/three.js
  2. 343 343
      build/three.min.js
  3. 46 6
      build/three.module.js
  4. 1 1
      package.json
  5. 1 1
      src/constants.js

+ 46 - 6
build/three.js

@@ -194,7 +194,7 @@
 
 
 	} );
 	} );
 
 
-	var REVISION = '85dev';
+	var REVISION = '85';
 	var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 	var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 	var CullFaceNone = 0;
 	var CullFaceNone = 0;
 	var CullFaceBack = 1;
 	var CullFaceBack = 1;
@@ -16267,7 +16267,7 @@
 
 
 			if ( list === undefined ) {
 			if ( list === undefined ) {
 
 
-				console.log( 'THREE.WebGLRenderLists:', hash );
+				// console.log( 'THREE.WebGLRenderLists:', hash );
 
 
 				list = new WebGLRenderList();
 				list = new WebGLRenderList();
 				lists[ hash ] = list;
 				lists[ hash ] = list;
@@ -20518,6 +20518,12 @@
 
 
 		};
 		};
 
 
+		function absNumericalSort( a, b ) {
+
+			return Math.abs( b[ 0 ] ) - Math.abs( a[ 0 ] );
+
+		}
+
 		this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) {
 		this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) {
 
 
 			state.setMaterial( material );
 			state.setMaterial( material );
@@ -20856,13 +20862,47 @@
 
 
 		}
 		}
 
 
-		// Sorting
+		// Compile
 
 
-		function absNumericalSort( a, b ) {
+		this.compile = function ( scene, camera ) {
 
 
-			return Math.abs( b[ 0 ] ) - Math.abs( a[ 0 ] );
+			lights = [];
 
 
-		}
+			scene.traverse( function ( object ) {
+
+				if ( object.isLight ) {
+
+					lights.push( object );
+
+				}
+
+			} );
+
+			setupLights( lights, camera );
+
+			scene.traverse( function ( object ) {
+
+				if ( object.material ) {
+
+					if ( Array.isArray( object.material ) ) {
+
+						for ( var i = 0; i < object.material.length; i ++ ) {
+
+							initMaterial( object.material[ i ], scene.fog, object );
+
+						}
+
+					} else {
+
+						initMaterial( object.material, scene.fog, object );
+
+					}
+
+				}
+
+			} );
+
+		};
 
 
 		// Rendering
 		// Rendering
 
 

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


+ 46 - 6
build/three.module.js

@@ -188,7 +188,7 @@ Object.assign( EventDispatcher.prototype, {
 
 
 } );
 } );
 
 
-var REVISION = '85dev';
+var REVISION = '85';
 var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 var CullFaceNone = 0;
 var CullFaceNone = 0;
 var CullFaceBack = 1;
 var CullFaceBack = 1;
@@ -16261,7 +16261,7 @@ function WebGLRenderLists() {
 
 
 		if ( list === undefined ) {
 		if ( list === undefined ) {
 
 
-			console.log( 'THREE.WebGLRenderLists:', hash );
+			// console.log( 'THREE.WebGLRenderLists:', hash );
 
 
 			list = new WebGLRenderList();
 			list = new WebGLRenderList();
 			lists[ hash ] = list;
 			lists[ hash ] = list;
@@ -20512,6 +20512,12 @@ function WebGLRenderer( parameters ) {
 
 
 	};
 	};
 
 
+	function absNumericalSort( a, b ) {
+
+		return Math.abs( b[ 0 ] ) - Math.abs( a[ 0 ] );
+
+	}
+
 	this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) {
 	this.renderBufferDirect = function ( camera, fog, geometry, material, object, group ) {
 
 
 		state.setMaterial( material );
 		state.setMaterial( material );
@@ -20850,13 +20856,47 @@ function WebGLRenderer( parameters ) {
 
 
 	}
 	}
 
 
-	// Sorting
+	// Compile
 
 
-	function absNumericalSort( a, b ) {
+	this.compile = function ( scene, camera ) {
 
 
-		return Math.abs( b[ 0 ] ) - Math.abs( a[ 0 ] );
+		lights = [];
 
 
-	}
+		scene.traverse( function ( object ) {
+
+			if ( object.isLight ) {
+
+				lights.push( object );
+
+			}
+
+		} );
+
+		setupLights( lights, camera );
+
+		scene.traverse( function ( object ) {
+
+			if ( object.material ) {
+
+				if ( Array.isArray( object.material ) ) {
+
+					for ( var i = 0; i < object.material.length; i ++ ) {
+
+						initMaterial( object.material[ i ], scene.fog, object );
+
+					}
+
+				} else {
+
+					initMaterial( object.material, scene.fog, object );
+
+				}
+
+			}
+
+		} );
+
+	};
 
 
 	// Rendering
 	// Rendering
 
 

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "three",
   "name": "three",
-  "version": "0.84.0",
+  "version": "0.85.0",
   "description": "JavaScript 3D library",
   "description": "JavaScript 3D library",
   "main": "build/three.js",
   "main": "build/three.js",
   "repository": "mrdoob/three.js",
   "repository": "mrdoob/three.js",

+ 1 - 1
src/constants.js

@@ -1,4 +1,4 @@
-export var REVISION = '85dev';
+export var REVISION = '85';
 export var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 export var MOUSE = { LEFT: 0, MIDDLE: 1, RIGHT: 2 };
 export var CullFaceNone = 0;
 export var CullFaceNone = 0;
 export var CullFaceBack = 1;
 export var CullFaceBack = 1;

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