Bird falling with rotation

Let’s add rotation to the bird:

Add below command in the file [File: update-game.js] if (bird.angle < 50) { bird.angle += 1; }


If is a conditional block where we are checking the angle of the bird and if it’s less than 50 we are executing the condition. -bird.angle+=1;

Working Together

In the window below, we started the code with the line bird.angle +=1;.

alt text

In your console you should see a Jsappy bird rotating with an angle after you press run:

alt text