JS: Animation Frame
Get to know how animation frames are set for games.
We'll cover the following
It’s better to set the animation frames of the game before creating or moving the character. Our character object will move and update its position, so we need to update frames constantly.
Model Object
Let’s first define a model object which will be containing some standard values like
gravity
.force
.groundforce
.ground
.
It will be accessed whenever those values would be needed.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy