From d16903842a5e9b76437fee62750703b0ebd839cd Mon Sep 17 00:00:00 2001 From: "Mr.doob" Date: Sat, 10 Oct 2015 17:51:07 -0400 Subject: [PATCH] Clean up. --- examples/canvas_morphtargets_horse.html | 14 ++++++++++---- examples/webgl_lights_hemisphere.html | 2 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/canvas_morphtargets_horse.html b/examples/canvas_morphtargets_horse.html index b90efb26c2..c9a30a9cb4 100644 --- a/examples/canvas_morphtargets_horse.html +++ b/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(); 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(); scene.add( light ); var loader = new THREE.JSONLoader(); 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 ); scene.add( mesh ); mixer = new THREE.AnimationMixer( mesh ); 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 ) ); } ); diff --git a/examples/webgl_lights_hemisphere.html b/examples/webgl_lights_hemisphere.html index df544b97bf..2136e7d856 100644 --- a/examples/webgl_lights_hemisphere.html +++ b/examples/webgl_lights_hemisphere.html @@ -215,7 +215,7 @@ scene.add( 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 ); } ); -- GitLab