0

Why my animation is smoothly not change position? ||help

I draw a box,, which changing position in everyone second. But, position smoothly slide not changing ... My code: https://code.sololearn.com/WwYNX3ykg4Cp/?ref=app

27th Jan 2021, 4:25 AM
Sajid Ali
Sajid Ali - avatar
3 Answers
+ 1
Because transition property does not work on objects inside the canvas. You can use Javascript to animate the object inside the canvas.
27th Jan 2021, 6:11 AM
Prajyot
Prajyot - avatar
0
I guess because you are changing the boxes and not updating their position
27th Jan 2021, 4:47 AM
Krish
Krish - avatar
0
Prajyot can you edit my code for animation with canvas
27th Jan 2021, 7:26 AM
Sajid Ali
Sajid Ali - avatar