HTML5 / js - how to animate straight line between two coordinates?

前端 未结 5 2257
你的背包
你的背包 2021-02-07 23:37

Simple enough question (could be wrong)

im looking to animate between two points in a straight line, using HTML5 and/or Jquery.

ctx.beginPath();
ctx.mov         


        
5条回答
  •  死守一世寂寞
    2021-02-08 00:02

    Thanks valli-R and Zevan,

    I've coded an amalgam of your two answers which uses lerp with requestAnimFrame

    http://jsbin.com/enobes/6

提交回复
热议问题