Skip to content

Commit

Permalink
Fixed wrong overdraw usage in examples.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Feb 20, 2014
1 parent b51c5a9 commit 1516ec4
Show file tree
Hide file tree
Showing 18 changed files with 32 additions and 32 deletions.
4 changes: 2 additions & 2 deletions examples/canvas_geometry_earth.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

var geometry = new THREE.SphereGeometry( 200, 20, 20 );

var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: true } );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: 0.5 } );
var mesh = new THREE.Mesh( geometry, material );
group.add( mesh );

Expand Down Expand Up @@ -100,7 +100,7 @@
texture.needsUpdate = true;

var geometry = new THREE.PlaneGeometry( 300, 300, 3, 3 );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: true } );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: 0.5 } );

var mesh = new THREE.Mesh( geometry, material );
mesh.position.y = - 250;
Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_geometry_panorama.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
function loadTexture( path ) {

var texture = new THREE.Texture( texture_placeholder );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: true } );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: 0.5 } );

var image = new Image();
image.onload = function () {
Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_geometry_panorama_fisheye.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
function loadTexture( path ) {

var texture = new THREE.Texture( texture_placeholder );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: true } );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: 0.5 } );

var image = new Image();
image.onload = function () {
Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_geometry_shapes.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
// flat shape

var geometry = new THREE.ShapeGeometry( shape );
var material = new THREE.MeshBasicMaterial( { color: color, overdraw: true } );
var material = new THREE.MeshBasicMaterial( { color: color, overdraw: 0.5 } );

var mesh = new THREE.Mesh( geometry, material );
mesh.position.set( x, y, z );
Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_geometry_terrain.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
var texture = new THREE.Texture( generateTexture( data, 1024, 1024 ) );
texture.needsUpdate = true;

var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: true } );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: 0.5 } );

var quality = 16, step = 1024 / quality;

Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_geometry_text.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
text3d.computeBoundingBox();
var centerOffset = -0.5 * ( text3d.boundingBox.max.x - text3d.boundingBox.min.x );

var textMaterial = new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, overdraw: true } );
var textMaterial = new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, overdraw: 0.5 } );
text = new THREE.Mesh( text3d, textMaterial );

text.position.x = centerOffset;
Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_lights_pointlights.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
loader = new THREE.JSONLoader();
loader.load( 'obj/WaltHeadLo.js', function ( geometry ) {

mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: true } ) );
mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: 0.5 } ) );
scene.add( mesh );

} );
Expand Down
12 changes: 6 additions & 6 deletions examples/canvas_materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@

new THREE.MeshBasicMaterial( { color: 0x00ffff, wireframe: true, side: THREE.DoubleSide } ),
new THREE.MeshBasicMaterial( { color: 0xff0000, blending: THREE.AdditiveBlending } ),
new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: true } ),
new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.SmoothShading, overdraw: true } ),
new THREE.MeshDepthMaterial( { overdraw: true } ),
new THREE.MeshNormalMaterial( { overdraw: true } ),
new THREE.MeshNormalMaterial( { shading: THREE.SmoothShading, overdraw: true } ),
new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: 0.5 } ),
new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.SmoothShading, overdraw: 0.5 } ),
new THREE.MeshDepthMaterial( { overdraw: 0.5 } ),
new THREE.MeshNormalMaterial( { overdraw: 0.5 } ),
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/land_ocean_ice_cloud_2048.jpg' ) } ),
new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/envmap.png', new THREE.SphericalReflectionMapping() ) } )
new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/envmap.png', new THREE.SphericalReflectionMapping() ), overdraw: 0.5 } ),
new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/envmap.png', new THREE.SphericalRefractionMapping() ), overdraw: 0.5 } )

];

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

// Plane

var material = new THREE.MeshDepthMaterial( { side: THREE.DoubleSide, overdraw: true } );
var material = new THREE.MeshDepthMaterial( { side: THREE.DoubleSide, overdraw: 0.5 } );

plane = new THREE.Mesh( new THREE.PlaneGeometry( 1000, 1000, 10, 10 ), material );
plane.position.y = - 100;
Expand All @@ -71,7 +71,7 @@
// Cubes

geometry = new THREE.BoxGeometry( 100, 100, 100 );
material = new THREE.MeshDepthMaterial( { overdraw: true } );
material = new THREE.MeshDepthMaterial( { overdraw: 0.5 } );

for ( var i = 0; i < 20; i ++ ) {

Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_materials_normal.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
loader = new THREE.JSONLoader();
loader.load( 'obj/WaltHeadLo.js', function ( geometry ) {

mesh = new THREE.Mesh( geometry, new THREE.MeshNormalMaterial( { overdraw: true } ) );
mesh = new THREE.Mesh( geometry, new THREE.MeshNormalMaterial( { overdraw: 0.5 } ) );
scene.add( mesh );

} );
Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_materials_reflection.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

geometry.computeVertexNormals();

mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ), overdraw: true } ) );
mesh = new THREE.Mesh( geometry, new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ), overdraw: 0.5 } ) );
scene.add( mesh );

} );
Expand Down
4 changes: 2 additions & 2 deletions examples/canvas_materials_video.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
texture.minFilter = THREE.LinearFilter;
texture.magFilter = THREE.LinearFilter;

var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: true } );
var material = new THREE.MeshBasicMaterial( { map: texture, overdraw: 0.5 } );

imageReflection = document.createElement( 'canvas' );
imageReflection.width = 480;
Expand All @@ -99,7 +99,7 @@
textureReflection.minFilter = THREE.LinearFilter;
textureReflection.magFilter = THREE.LinearFilter;

var materialReflection = new THREE.MeshBasicMaterial( { map: textureReflection, side: THREE.BackSide, overdraw: true } );
var materialReflection = new THREE.MeshBasicMaterial( { map: textureReflection, side: THREE.BackSide, overdraw: 0.5 } );

//

Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_particles_shapes.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
text3d.computeBoundingBox();
var centerOffset = -0.5 * ( text3d.boundingBox.max.x - text3d.boundingBox.min.x );

var textMaterial = new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, overdraw: true } );
var textMaterial = new THREE.MeshBasicMaterial( { color: Math.random() * 0xffffff, overdraw: 0.5 } );

text = new THREE.Mesh( text3d, textMaterial );

Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_performance.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
// Spheres

geometry = new THREE.SphereGeometry( 100, 26, 18 );
material = new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: true } );
material = new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: 0.5 } );

for ( var i = 0; i < 20; i ++ ) {

Expand Down
2 changes: 1 addition & 1 deletion examples/canvas_sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

geometry = new THREE.IcosahedronGeometry( 100, 1 );

material = new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ), overdraw: true } );
material = new THREE.MeshBasicMaterial( { envMap: THREE.ImageUtils.loadTexture( 'textures/metal.jpg', new THREE.SphericalReflectionMapping() ), overdraw: 0.5 } );

for ( var i = 0; i < 10; i ++ ) {

Expand Down
4 changes: 2 additions & 2 deletions examples/misc_lights_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ <h1>lights test</h1>
// Spheres

var geometry = new THREE.SphereGeometry( 100, 16, 8 );
materialSpheres = new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: true } );
materialSpheres = new THREE.MeshLambertMaterial( { color: 0xffffff, shading: THREE.FlatShading, overdraw: 0.5 } );

for ( var i = 0; i < 30; i ++ ) {

Expand All @@ -106,7 +106,7 @@ <h1>lights test</h1>

// Torus

materialTorus = new THREE.MeshLambertMaterial( { color: 0xffffff, overdraw: true } );
materialTorus = new THREE.MeshLambertMaterial( { color: 0xffffff, overdraw: 0.5 } );
mesh = new THREE.Mesh( new THREE.TorusGeometry( 100, 25, 15, 30 ), materialTorus );
scene.add( mesh );

Expand Down
2 changes: 1 addition & 1 deletion examples/webgl_multiple_views.html
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@
group3.rotation.x = 0;
scene.add( group3 );

renderer = new THREE.WebGLRenderer( { antialias: true } );
renderer = new THREE.CanvasRenderer( { antialias: true } );
renderer.setSize( window.innerWidth, window.innerHeight );

container.appendChild( renderer.domElement );
Expand Down
12 changes: 6 additions & 6 deletions examples/webgl_nearestneighbour.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@

var materials = [

new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/px.jpg' ), overdraw: true } ), // right
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/nx.jpg' ), overdraw: true } ), // left
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/py.jpg' ), overdraw: true } ), // top
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/ny.jpg' ), overdraw: true } ), // bottom
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/pz.jpg' ), overdraw: true } ), // back
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/nz.jpg' ), overdraw: true } ) // front
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/px.jpg' ) } ), // right
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/nx.jpg' ) } ), // left
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/py.jpg' ) } ), // top
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/ny.jpg' ) } ), // bottom
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/pz.jpg' ) } ), // back
new THREE.MeshBasicMaterial( { map: THREE.ImageUtils.loadTexture( 'textures/cube/skybox/nz.jpg' ) } ) // front

];

Expand Down

0 comments on commit 1516ec4

Please sign in to comment.