Skip to content
This repository has been archived by the owner on Jan 18, 2019. It is now read-only.

Update step01_en.md #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/content/platformer/step01_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ download: /assets/platformer/steps/step01.js

### Initialise Phaser and the canvas

1. HTML5 games need a `<canvas>` element to draw graphics. Phaser can create one automatically when we initialise the game. We need to supply the ID of the element that will wrap the canvas –in our case, it will be a `<div id="game">` that we have in our `index.file`. We will also be providing the canvas' dimensions (960✕600).
1. HTML5 games need a `<canvas>` element to draw graphics. Phaser can create one automatically when we initialise the game. We need to supply the ID of the element that will wrap the canvas –in our case, it will be a `<div id="game">` that we have in our `index.html`. We will also be providing the canvas' dimensions (960✕600).

To do that, open `js/main.js` in your text editor and edit the `window.onload` function to initialise Phaser:

Expand Down