Skip to content

Commit

Permalink
Docs: Fix default geometry
Browse files Browse the repository at this point in the history
  • Loading branch information
Mugen87 committed Jun 8, 2018
1 parent e6ddc5d commit 0040c52
Showing 1 changed file with 11 additions and 27 deletions.
38 changes: 11 additions & 27 deletions docs/scenes/geometry-browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,36 +72,20 @@
scene.add( lights[ 1 ] );
scene.add( lights[ 2 ] );

var mesh = new THREE.Object3D();
var group = new THREE.Group();

mesh.add( new THREE.LineSegments(
var geometry = new THREE.BufferGeometry();
geometry.addAttribute( 'position', new THREE.Float32BufferAttribute( [], 3 ) );

new THREE.Geometry(),
var lineMaterial = new THREE.LineBasicMaterial( { color: 0xffffff, transparent: true, opacity: 0.5 } );
var meshMaterial = new THREE.MeshPhongMaterial( { color: 0x156289, emissive: 0x072534, side: THREE.DoubleSide, flatShading: true } );

new THREE.LineBasicMaterial( {
color: 0xffffff,
transparent: true,
opacity: 0.5
} )
group.add( new THREE.LineSegments( geometry, lineMaterial ) );
group.add( new THREE.Mesh( geometry, meshMaterial ) );

) );
var options = chooseFromHash( group );

mesh.add( new THREE.Mesh(

new THREE.Geometry(),

new THREE.MeshPhongMaterial( {
color: 0x156289,
emissive: 0x072534,
side: THREE.DoubleSide,
flatShading: true
} )

) );

var options = chooseFromHash( mesh );

scene.add( mesh );
scene.add( group );

var prevFog = false;

Expand All @@ -111,8 +95,8 @@

if ( ! options.fixed ) {

mesh.rotation.x += 0.005;
mesh.rotation.y += 0.005;
group.rotation.x += 0.005;
group.rotation.y += 0.005;

}

Expand Down

0 comments on commit 0040c52

Please sign in to comment.