Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
KilledByAPixel authored Nov 22, 2024
1 parent a3ca182 commit 15d3142
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/breakoutTutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ for(let y=0; y<=levelSize.y; y+=1)
## Move the Camera

Let’s move the camera to the center of our level by setting the cameraPos variable to half the level size.
You can also change the camera zoom by using camaraScale which controls the number of pixels for each world space unit.
For this example the camera will just remain stationary, but in other types of games it is very useful!

```javascript
setCameraPos(levelSize.scale(.5)); // center camera in level
Expand Down

0 comments on commit 15d3142

Please sign in to comment.