Browse Source

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

Mr.doob 9 years ago
parent
commit
156f6b74df

+ 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 );
 
 	},