فهرست منبع

Geometry: Renamed .sortFacesByMaterial() to .sortFacesByMaterialIndex(). See 9ca9003e16d8cc07117eda454aa484e66e9e3729.

Mr.doob 9 سال پیش
والد
کامیت
156f6b74df
4فایلهای تغییر یافته به همراه6 افزوده شده و 6 حذف شده
  1. 1 1
      examples/webgl_effects_parallaxbarrier.html
  2. 1 1
      examples/webgl_materials.html
  3. 1 1
      examples/webgl_materials_cars.html
  4. 3 3
      src/core/Geometry.js

+ 1 - 1
examples/webgl_effects_parallaxbarrier.html

@@ -560,7 +560,7 @@
 
 			function createScene( geometry, car ) {
 
-				geometry.sortFacesByMaterial();
+				geometry.sortFacesByMaterialIndex();
 
 				var m = new THREE.MeshFaceMaterial(),
 					s = CARS[ car ].scale * 1,

+ 1 - 1
examples/webgl_materials.html

@@ -98,7 +98,7 @@
 
 				}
 
-				geometry.sortFacesByMaterial();
+				geometry.sortFacesByMaterialIndex();
 
 				objects = [];
 

+ 1 - 1
examples/webgl_materials_cars.html

@@ -568,7 +568,7 @@
 
 			function createScene( geometry, car ) {
 
-				geometry.sortFacesByMaterial();
+				geometry.sortFacesByMaterialIndex();
 
 				var m = new THREE.MeshFaceMaterial(),
 					s = CARS[ car ].scale * 1,

+ 3 - 3
src/core/Geometry.js

@@ -863,15 +863,15 @@ THREE.Geometry.prototype = {
 
 	},
 
-	sortFacesByMaterial: function () {
+	sortFacesByMaterialIndex: function () {
 
-		function materialSort( a, b ) {
+		function materialIndexSort( a, b ) {
 
 			return a.materialIndex - b.materialIndex;
 
 		}
 
-		this.faces.sort( materialSort );
+		this.faces.sort( materialIndexSort );
 
 	},