2
0
Эх сурвалжийг харах

Merge remote-tracking branch 'arcanin/dev' into dev

Mr.doob 14 жил өмнө
parent
commit
5b22bffdf8

+ 2 - 2
examples/webgl_geometry_minecraft.html

@@ -125,10 +125,10 @@
 
 						h = getY( x, z );
 
-						h2 = getY( x - 1, z );
+						h2 = getY( x + 1, z );
 						px = ( h2 != h && h2 != h + 1 ) || x == 0 ? 1 : 0;
 
-						h2 = getY( x + 1, z );
+						h2 = getY( x - 1, z );
 						nx = ( h2 != h && h2 != h + 1 ) || x == worldWidth - 1 ? 1 : 0;
 
 						h2 = getY( x, z + 1 );

+ 2 - 2
examples/webgl_geometry_minecraft_ao.html

@@ -363,8 +363,8 @@
 
 						px = nx = pz = nz = 0;
 
-						px = !nleft  || x == 0 ? 1 : 0;
-						nx = !nright || x == worldWidth - 1 ? 1 : 0;
+						px = !nright || x == 0 ? 1 : 0;
+						nx = !nleft  || x == worldWidth - 1 ? 1 : 0;
 
 						pz = !nback  || z == worldDepth - 1 ? 1 : 0;
 						nz = !nfront || z == 0 ? 1 : 0;

+ 2 - 2
src/extras/geometries/CubeGeometry.js

@@ -53,8 +53,8 @@ THREE.CubeGeometry = function ( width, height, depth, segmentsWidth, segmentsHei
 
 	}
 
-	this.sides.px && buildPlane( 'z', 'y',   1 * flip, - 1, depth, height, - width_half, this.materials[ 0 ] ); // px
-	this.sides.nx && buildPlane( 'z', 'y', - 1 * flip, - 1, depth, height, width_half, this.materials[ 1 ] );   // nx
+	this.sides.px && buildPlane( 'z', 'y', - 1 * flip, - 1, depth, height, width_half, this.materials[ 0 ] ); // px
+	this.sides.nx && buildPlane( 'z', 'y',   1 * flip, - 1, depth, height, - width_half, this.materials[ 1 ] );   // nx
 	this.sides.py && buildPlane( 'x', 'z',   1 * flip,   1, width, depth, height_half, this.materials[ 2 ] );   // py
 	this.sides.ny && buildPlane( 'x', 'z',   1 * flip, - 1, width, depth, - height_half, this.materials[ 3 ] ); // ny
 	this.sides.pz && buildPlane( 'x', 'y',   1 * flip, - 1, width, height, depth_half, this.materials[ 4 ] );   // pz