Cube: Swapped Top/Bottom with Front/Back.
Trying to get to the same order of alteredq's cubemap.
@@ -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;
|
||||
|
||||
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
|
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
|
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 19 KiB |
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
@@ -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 ) {
|
||||
|
||||
|
||||