Kaynağa Gözat

Cube: Swapped Top/Bottom with Front/Back.
Trying to get to the same order of alteredq's cubemap.

Mr.doob 15 yıl önce
ebeveyn
işleme
7b0039ec95

+ 7 - 7
examples/geometry_vr.html

@@ -5,7 +5,7 @@
 		<meta charset="utf-8">
 		<style type="text/css">
 			body {
-				background-color: #000000;
+				background-color: rgb(200,200,200);
 				margin: 0px;
 				overflow: hidden;
 			}
@@ -69,12 +69,12 @@
 				context.fillRect( 0, 0, texture_placeholder.width, texture_placeholder.height );
 
 				var materials = [];
-				materials.push( [ loadTexture( 'textures/skymap_right1024.jpg' ), wireframe ] );
-				materials.push( [ loadTexture( 'textures/skymap_left1024.jpg' ), wireframe ] );
-				materials.push( [ loadTexture( 'textures/skymap_back1024.jpg' ), wireframe ] );
-				materials.push( [ loadTexture( 'textures/skymap_front1024.jpg' ), wireframe ] );
-				materials.push( [ loadTexture( 'textures/skymap_top1024.jpg' ), wireframe ] );
-				materials.push( [ loadTexture( 'textures/skymap_bottom1024.jpg' ), wireframe ] );
+				materials.push( [ loadTexture( 'textures/skymap_px.jpg' ), wireframe ] );
+				materials.push( [ loadTexture( 'textures/skymap_nx.jpg' ), wireframe ] );
+				materials.push( [ loadTexture( 'textures/skymap_py.jpg' ), wireframe ] );
+				materials.push( [ loadTexture( 'textures/skymap_ny.jpg' ), wireframe ] );
+				materials.push( [ loadTexture( 'textures/skymap_pz.jpg' ), wireframe ] );
+				materials.push( [ loadTexture( 'textures/skymap_nz.jpg' ), wireframe ] );
 
 				mesh = new THREE.Mesh( new Cube( 100, 100, 100, 7, 7, materials, true ), new THREE.MeshFaceMaterial() );
 				mesh.overdraw = true;

+ 0 - 0
examples/textures/skymap_left1024.jpg → examples/textures/skymap_nx.jpg


+ 0 - 0
examples/textures/skymap_bottom1024.jpg → examples/textures/skymap_ny.jpg


+ 0 - 0
examples/textures/skymap_front1024.jpg → examples/textures/skymap_nz.jpg


+ 0 - 0
examples/textures/skymap_right1024.jpg → examples/textures/skymap_px.jpg


+ 0 - 0
examples/textures/skymap_top1024.jpg → examples/textures/skymap_py.jpg


+ 0 - 0
examples/textures/skymap_back1024.jpg → examples/textures/skymap_pz.jpg


+ 4 - 4
src/extras/primitives/Cube.js

@@ -39,10 +39,10 @@ var Cube = function ( width, height, depth, segments_width, segments_height, mat
 
 	buildPlane( 'z', 'y', - 1 * flip, - 1, depth, height, width_half, this.materials[ 0 ] ); // right
 	buildPlane( 'z', 'y',   1 * flip, - 1, depth, height, - width_half, this.materials[ 1 ] ); // left
-	buildPlane( 'x', 'y',   1 * flip, - 1, width, height, depth_half, this.materials[ 2 ] ); // front
-	buildPlane( 'x', 'y', - 1 * flip, - 1, width, height, - depth_half, this.materials[ 3 ] ); // back
-	buildPlane( 'x', 'z', - 1 * flip, - 1, width, depth, height_half, this.materials[ 4 ] ); // top
-	buildPlane( 'x', 'z', - 1 * flip,   1, width, depth, - height_half, this.materials[ 5 ] ); // bottom
+	buildPlane( 'x', 'z', - 1 * flip, - 1, width, depth, height_half, this.materials[ 2 ] ); // top
+	buildPlane( 'x', 'z', - 1 * flip,   1, width, depth, - height_half, this.materials[ 3 ] ); // bottom
+	buildPlane( 'x', 'y',   1 * flip, - 1, width, height, depth_half, this.materials[ 4 ] ); // front
+	buildPlane( 'x', 'y', - 1 * flip, - 1, width, height, - depth_half, this.materials[ 5 ] ); // back
 
 	function buildPlane( u, v, udir, vdir, width, height, depth, material ) {