Browse Source

Clean up.

Mr.doob 9 years ago
parent
commit
d16903842a
2 changed files with 11 additions and 5 deletions
  1. 10 4
      examples/canvas_morphtargets_horse.html
  2. 1 1
      examples/webgl_lights_hemisphere.html

+ 10 - 4
examples/canvas_morphtargets_horse.html

@@ -54,25 +54,31 @@
 
 
 				//
 				//
 
 
-				var light = new THREE.DirectionalLight( 0xefefff, 2 );
+				var light = new THREE.DirectionalLight( 0xefefff, 1.5 );
 				light.position.set( 1, 1, 1 ).normalize();
 				light.position.set( 1, 1, 1 ).normalize();
 				scene.add( light );
 				scene.add( light );
 
 
-				var light = new THREE.DirectionalLight( 0xffefef, 2 );
+				var light = new THREE.DirectionalLight( 0xffefef, 1.5 );
 				light.position.set( -1, -1, -1 ).normalize();
 				light.position.set( -1, -1, -1 ).normalize();
 				scene.add( light );
 				scene.add( light );
 
 
 				var loader = new THREE.JSONLoader();
 				var loader = new THREE.JSONLoader();
 				loader.load( "models/animated/horse.js", function ( geometry ) {
 				loader.load( "models/animated/horse.js", function ( geometry ) {
 
 
-					mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( { color: 0x606060, morphTargets: true, overdraw: 0.5 } ) );
+					var material = new THREE.MeshLambertMaterial( {
+						vertexColors: THREE.FaceColors,
+						morphTargets: true,
+						overdraw: 0.5
+					} );
+
+					mesh = new THREE.Mesh( geometry, material );
 					mesh.scale.set( 1.5, 1.5, 1.5 );
 					mesh.scale.set( 1.5, 1.5, 1.5 );
 					scene.add( mesh );
 					scene.add( mesh );
 
 
 					mixer = new THREE.AnimationMixer( mesh );
 					mixer = new THREE.AnimationMixer( mesh );
 
 
 					var clip = THREE.AnimationClip.CreateFromMorphTargetSequence( 'gallop', geometry.morphTargets, 30 );
 					var clip = THREE.AnimationClip.CreateFromMorphTargetSequence( 'gallop', geometry.morphTargets, 30 );
-					mixer.addAction( new THREE.AnimationAction( clip ).warpToDuration( 1.5 ) );
+					mixer.addAction( new THREE.AnimationAction( clip ).warpToDuration( 1 ) );
 
 
 				} );
 				} );
 
 

+ 1 - 1
examples/webgl_lights_hemisphere.html

@@ -215,7 +215,7 @@
 					scene.add( mesh );
 					scene.add( mesh );
 
 
 					var mixer = new THREE.AnimationMixer( mesh );
 					var mixer = new THREE.AnimationMixer( mesh );
-					mixer.addAction( new THREE.AnimationAction( geometry.animations[0] ).warpToDuration( 5 ) );
+					mixer.addAction( new THREE.AnimationAction( geometry.animations[ 0 ] ).warpToDuration( 1 ) );
 					mixers.push( mixer );
 					mixers.push( mixer );
 
 
 				} );
 				} );