javascript - three.js dat.GUI, automated control (.listen) does not transfer to morph target -


i want control morpt targets of json character automatically. control of sliders works, face not move. when use mouse, face moves well. why not work if without mouse? can me?

var shape = {						      mouth_open: 0.0, //anfangsposition 0.0																		  };  								  var gui = new dat.gui({    autoplace: false,     width: 250,    height: 9 * 32 - 1  });																				    var folder = gui.addfolder( 'morph targets' );			    folder.add( shape, 'mouth_open', 0, 1 ).step( 0.01 ).name('mouth_open').listen().onchange( function( ) { mesh.morphtargetinfluences[ 40 ] = a;})		    folder.open();  			  var update = function() {    requestanimationframe(update);    shape.mouth_open = 0.50   };  			  update();			    	  function animate() {    render();    requestanimationframe( animate );  }    function render() {		    renderer.clear();    controls.update();    renderer.render( scene, camera );  }  	  animate();


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -