Make moving Rect more smooth
问题 I want to make "animation" of my Rect more smooth. Currently it's really clunky. I know the reason for it. One of the coordinates becomes wanted value before the other. For example if I'm currently at (0,0) and I need to go to (150,75) and I increment each one equally every second , y-cord will come much sooner than x-cord. var canvas = document.getElementById('canvas'); var ctx = document.getElementById('canvas').getContext('2d'); var aniTimer; var x; var y; var tx = tx || 0; var ty = ty ||