Skip to content

Commit

Permalink
Merge remote-tracking branch 'alteredq/unflip' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Aug 3, 2012
2 parents 365ee52 + 7b7947d commit d5b863e
Show file tree
Hide file tree
Showing 34 changed files with 373 additions and 382 deletions.
143 changes: 72 additions & 71 deletions build/Three.js

Large diffs are not rendered by default.

226 changes: 113 additions & 113 deletions build/custom/ThreeCanvas.js

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions build/custom/ThreeExtras.js

Large diffs are not rendered by default.

208 changes: 104 additions & 104 deletions build/custom/ThreeWebGL.js

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions examples/misc_ubiquity_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,9 @@

// PLANE

mesh = new THREE.Mesh( new THREE.PlaneGeometry( 100, 100 ), new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } ) );
mesh = new THREE.Mesh( new THREE.PlaneGeometry( 100, 100 ), new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, doubleSided: true } ) );
mesh.position.y = -500;
mesh.scale.x = mesh.scale.y = mesh.scale.z = 2;
mesh.doubleSided = true;
scene.add( mesh );

// CYLINDER
Expand Down Expand Up @@ -111,7 +110,7 @@

var face = new THREE.Face3( geometry.vertices.push( v0 ) - 1, geometry.vertices.push( v1 ) - 1, geometry.vertices.push( v2 ) - 1, null, null, geometry.materials.length );

geometry.materials.push( new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff } ) );
geometry.materials.push( new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, doubleSided: true } ) );

geometry.faces.push( face );

Expand All @@ -125,12 +124,10 @@
scene.add( group );

mesh = new THREE.Mesh( geometry, new THREE.MeshFaceMaterial() );
mesh.doubleSided = true;
group.add( mesh );

/*
mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: 0xff0000, opacity: 0.5, transparent: true, wireframe: true, wireframeLinewidth: 10 } ) );
mesh.doubleSided = true;
mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { color: 0xff0000, opacity: 0.5, transparent: true, wireframe: true, wireframeLinewidth: 10, doubleSided: true } ) );
group.add( mesh );
*/

Expand Down
2 changes: 0 additions & 2 deletions examples/webgl_animation_skinning.html
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,6 @@

buffalo = new THREE.SkinnedMesh( geometry, material, false );

//buffalo.doubleSided = true;

buffalo.position.x = - ( gridx - 1 ) * sepx * 0.5 + x * sepx + Math.random() * 0.5 * sepx;
buffalo.position.z = - ( gridz - 1 ) * sepz * 0.5 + z * sepz + Math.random() * 0.5 * sepz - 500;

Expand Down
6 changes: 2 additions & 4 deletions examples/webgl_geometries.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
scene.add( light );

materials = [
new THREE.MeshLambertMaterial( { ambient: 0xbbbbbb, map: THREE.ImageUtils.loadTexture( 'textures/ash_uvgrid01.jpg' ) } ),
new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe: true, transparent: true, opacity: 0.1 } )
new THREE.MeshLambertMaterial( { ambient: 0xbbbbbb, map: THREE.ImageUtils.loadTexture( 'textures/ash_uvgrid01.jpg' ), doubleSided: true } ),
new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe: true, transparent: true, opacity: 0.1, doubleSided: true } )
];

object = THREE.SceneUtils.createMultiMaterialObject( new THREE.CubeGeometry( 100, 100, 100, 4, 4, 4 ), materials );
Expand All @@ -76,7 +76,6 @@
scene.add( object );

object = THREE.SceneUtils.createMultiMaterialObject( new THREE.PlaneGeometry( 100, 100, 4, 4 ), materials );
object.children[ 0 ].doubleSided = true;
object.position.set( -200, 0, 0 );
scene.add( object );

Expand All @@ -93,7 +92,6 @@
}

object = THREE.SceneUtils.createMultiMaterialObject( new THREE.LatheGeometry( points, 20 ), materials );
object.children[ 0 ].doubleSided = true;
object.position.set( 200, 0, 0 );
scene.add( object );

Expand Down
14 changes: 6 additions & 8 deletions examples/webgl_geometries2.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@
scene.add( light );

materials = [
new THREE.MeshLambertMaterial( { ambient: 0xbbbbbb, map: THREE.ImageUtils.loadTexture( 'textures/ash_uvgrid01.jpg' ) } ),
new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe: true, transparent: true, opacity: 0.1 } )
new THREE.MeshLambertMaterial( { ambient: 0xbbbbbb, map: THREE.ImageUtils.loadTexture( 'textures/ash_uvgrid01.jpg' ), doubleSided: true } ),
new THREE.MeshBasicMaterial( { color: 0xffffff, wireframe: true, transparent: true, opacity: 0.1, doubleSided: true } )
];


Expand Down Expand Up @@ -93,19 +93,19 @@
var geo;

// Klein Bottle

geo = new THREE.ParametricGeometry(THREE.ParametricGeometries.klein, 20, 20);
object = THREE.SceneUtils.createMultiMaterialObject( geo, materials );
object.children[ 0 ].doubleSided = true;
object.position.set( 0, 0, 0 );
object.scale.multiplyScalar(10);
object.scale.multiplyScalar( 10 );
scene.add( object );

// Mobius Strip

geo = new THREE.ParametricGeometry(THREE.ParametricGeometries.mobius, 20, 20);
object = THREE.SceneUtils.createMultiMaterialObject( geo, materials );
// object.children[ 0 ].doubleSided = true;
object.position.set( 10, 0, 0 );
object.scale.multiplyScalar(100);
object.scale.multiplyScalar( 100 );
scene.add( object );

var geo = new THREE.ParametricGeometry(THREE.ParametricGeometries.plane(200, 200), 10, 20);
Expand Down Expand Up @@ -144,12 +144,10 @@


// object = THREE.SceneUtils.createMultiMaterialObject( new THREE.PlaneGeometry( 400, 400, 4, 4 ), materials );
// // object.children[ 0 ].doubleSided = true;
// object.position.set( -200, 100, 0 );
// scene.add( object );

// object = THREE.SceneUtils.createMultiMaterialObject( new THREE.PlaneGeometry2( 400, 400, 4, 4 ), materials );
// object.children[ 0 ].doubleSided = true;
// object.position.set( -200, 100, 0 );
// scene.add( object );

Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_geometry_tessellation.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@
attributes: attributes,
vertexShader: document.getElementById( 'vertexshader' ).textContent,
fragmentShader: document.getElementById( 'fragmentshader' ).textContent,
shading: THREE.FlatShading
shading: THREE.FlatShading,
doubleSided: true

});

Expand Down Expand Up @@ -209,7 +210,6 @@

mesh = new THREE.Mesh( geometry, shaderMaterial );
mesh.rotation.set( 0.5, 0.5, 0 );
mesh.doubleSided = true;

scene.add( mesh );

Expand Down
8 changes: 4 additions & 4 deletions examples/webgl_loader_ctm_materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@
fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms,
depthWrite: false
depthWrite: false,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100, 100, 100 ), material );
mesh.flipSided = true;
sceneCube.add( mesh );

// LIGHTS
Expand Down Expand Up @@ -214,7 +214,6 @@
var mesh = new THREE.Mesh( geometries[ i ], materials[ i ] );
mesh.position = position;
mesh.scale = scale;
mesh.doubleSided = true;
scene.add( mesh );

}
Expand Down Expand Up @@ -282,6 +281,8 @@

}

materials[ i ].doubleSided = true;

}

}
Expand All @@ -300,7 +301,6 @@
mesh = new THREE.Mesh( geometry, material );
mesh.position.set( x, y, z );
mesh.scale.set( s, s, s );
mesh.doubleSided = true;
scene.add( mesh );

}
Expand Down
3 changes: 1 addition & 2 deletions examples/webgl_loader_vtk.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,14 @@
camera.add( dirLight );
camera.add( dirLight.target );

var material = new THREE.MeshLambertMaterial( { color:0xffffff} );
var material = new THREE.MeshLambertMaterial( { color:0xffffff, doubleSided: true } );

var loader = new THREE.VTKLoader();
loader.addEventListener( 'load', function ( event ) {

var geometry = event.content;

var mesh = new THREE.Mesh( geometry, material );
mesh.doubleSided = true;
mesh.position.setY( - 0.09 );
scene.add( mesh );

Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_materials_cars.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,12 @@
fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms,
depthWrite: false
depthWrite: false,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100, 100, 100 ), material );
mesh.flipSided = true;
sceneCube.add( mesh );

//
Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_materials_cars_anaglyph.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@

fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms
uniforms: shader.uniforms,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000 ), material );
mesh.flipSided = true;
scene.add( mesh );

//
Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_materials_cars_parallaxbarrier.html
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@

fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms
uniforms: shader.uniforms,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000 ), material );
mesh.flipSided = true;
scene.add( mesh );

//
Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_materials_cubemap.html
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@
fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms,
depthWrite: false
depthWrite: false,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100, 100, 100 ), material );
mesh.flipSided = true;
sceneCube.add( mesh );

//
Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_materials_cubemap_balls_reflection.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@
fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms,
depthWrite: false
depthWrite: false,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100, 100, 100 ), material );
mesh.flipSided = true;
sceneCube.add( mesh );

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@

fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms
uniforms: shader.uniforms,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000 ), material );
mesh.flipSided = true;
scene.add( mesh );

//
Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_materials_cubemap_balls_refraction.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@
fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms,
depthWrite: false
depthWrite: false,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100, 100, 100 ), material );
mesh.flipSided = true;
sceneCube.add( mesh );

//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,12 @@

fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms
uniforms: shader.uniforms,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000 ), material );
mesh.flipSided = true;
scene.add( mesh );

//
Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_materials_cubemap_escher.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@

fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms
uniforms: shader.uniforms,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 6000, 6000, 6000 ), material );
mesh.flipSided = true;
scene.add( mesh );

//
Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_materials_cubemap_refraction.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@

fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms
uniforms: shader.uniforms,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000 ), material );
mesh.flipSided = true;
sceneCube.add( mesh );

//
Expand Down
4 changes: 2 additions & 2 deletions examples/webgl_materials_shaders_fresnel.html
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@

fragmentShader: shader.fragmentShader,
vertexShader: shader.vertexShader,
uniforms: shader.uniforms
uniforms: shader.uniforms,
flipSided: true

} ),

mesh = new THREE.Mesh( new THREE.CubeGeometry( 100000, 100000, 100000 ), material );
mesh.flipSided = true;
sceneCube.add( mesh );

//
Expand Down
3 changes: 1 addition & 2 deletions examples/webgl_materials_skin.html
Original file line number Diff line number Diff line change
Expand Up @@ -278,15 +278,14 @@
mesh = new THREE.Mesh( geometry, material );
mesh.position.y = - 50;
mesh.scale.set( scale, scale, scale );
mesh.doubleSided = true;

scene.add( mesh );

loader.statusDomElement.style.display = "none";

}

function onDocumentMouseMove(event) {
function onDocumentMouseMove( event ) {

mouseX = ( event.clientX - windowHalfX );
mouseY = ( event.clientY - windowHalfY );
Expand Down
Loading

0 comments on commit d5b863e

Please sign in to comment.