Moving object from one (x,y) to another (x,y) with canvas + JS
What's the best "smooth" way to transition an element (in this case an image) from one point to another in开发者_运维技巧 JS? Should I be using trig or is there some magic function I'm missing; thanks!
There are already a lot of these questions asked that should be able to answer this for you. For instance:
An efficient algorithm to move ostrichs along a line at a constant speed
Moving a Point Along a Line in JavaScript Canvas
精彩评论