three.js - Changing easing parameters -


i have tweening function animate camera angle using "easing.elastic.out". how change period , amplitude of easing?

camera.lookat(scene);  var controls = new three.orbitcontrols(camera, renderer.domelement);    function camtweenleft (startangle){  		 var prevangle=startangle;  		 var tween = new tween.tween({angle:startangle})  	 	.to({angle:startangle - 40*math.pi/180},1000)  		.easing(tween.easing.elastic.out)  		.onupdate(function(){  			controls.rotateleft(this.angle-prevangle);  			prevangle=this.angle;  		})  		.start()  	 }

check tween js documentation library used three.js not part of it.

https://github.com/tweenjs/tween.js/blob/master/docs/user_guide.md

the graphs example shows easing functions can have @ https://github.com/tweenjs/tween.js/blob/master/examples/03_graphs.html

you can create own custom easing function.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -