Skip to content

Commit

Permalink
Examples: Clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Oct 31, 2018
1 parent 424ac9d commit e10845b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
19 changes: 14 additions & 5 deletions examples/webgl_buffergeometry_morphtargets.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
font-size: 13px;
margin: 0px;
overflow: hidden;
text-align: center;
Expand Down Expand Up @@ -46,21 +48,28 @@

}

scene = new THREE.Scene();
scene.background = new THREE.Color( 0x8FBCD4 );

scene.add( new THREE.AmbientLight( 0x8FBCD4, 0.4 ) );

container = document.getElementById( 'container' );
camera = new THREE.PerspectiveCamera( 45, window.innerWidth / window.innerHeight, 1, 20 );
camera.position.z = 10;
camera.position.z = 8;
scene.add( camera );

var controls = new THREE.OrbitControls( camera, container );

scene = new THREE.Scene();
scene.background = new THREE.Color( 0x8FBCD4 );
var pointLight = new THREE.PointLight( 0xffffff, 1 );
camera.add( pointLight );
scene.add( camera );

var geometry = createGeometry();

var material = new THREE.MeshPhongMaterial( { flatShading: true, color: 0xff0000, morphTargets: true } );
var material = new THREE.MeshPhongMaterial( {
color: 0xff0000,
flatShading: true,
morphTargets: true
} );

mesh = new THREE.Mesh( geometry, material );
scene.add( mesh );
Expand Down
3 changes: 1 addition & 2 deletions examples/webgl_camera.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@

#info {
position: absolute;
top: 0px; width: 100%;
padding: 5px;
top: 5px; width: 100%;
z-index: 100;
}

Expand Down

0 comments on commit e10845b

Please sign in to comment.