I
I
Ibishka2020-02-05 22:12:51
JavaScript
Ibishka, 2020-02-05 22:12:51

How to animate a picture?


It turns out a solid thing, well, you get the point. I want the bird to fall normally.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Sokolov, 2020-02-05
@Ibishka


Added physics. code pen

M
MagicMight, 2020-02-05
@MagicMight

add ctx.clearRect(0,0,w,h) to loopBird
--
Why is the picture recreated on each iteration of requestAnimationFrame?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question