We will create a background movement that moves in a different speed than the runway. This is also known as parallax scrolling, and creates an illusion of depth.
Make sure the following image is ready in the project inside the
Let's adjust the movement of the background with the following steps:
runway.jsfile, we append the following code before the end of the
game.view.floor.style.backgroundPositionY = round * game.BACKGROUND_MOVEMENT_SPEED + 'px';