简体   繁体   中英

KineticJS HTML5 Canvas Harmonic Oscillator

I want to make similar thing using KineticS. But got only such thing - http://codepen.io/anon/pen/CptLd . Can you help me, please?

var anim = new Kinetic.Animation(function(frame) {
  var scale = Math.abs(0.5 * (Math.sin(2* Math.PI * frame.time / 3000) + 1.5));
  weight.setY(200 * scale + 40);
  spline.scale({y:scale});
}, layer);

http://codepen.io/anon/pen/nraLo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM