|
@@ -51,25 +51,28 @@
|
|
|
|
|
|
//
|
|
|
|
|
|
- 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 } ) );
|
|
|
+ mesh = new THREE.Mesh( geometry, new THREE.MeshLambertMaterial( {
|
|
|
+ vertexColors: THREE.FaceColors,
|
|
|
+ morphTargets: true
|
|
|
+ } ) );
|
|
|
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 ) );
|
|
|
|
|
|
} );
|
|
|
|