You may have noticed this already from trying different things, but the HTML canvas uses a very different coordinate system to Scratch.
In Scratch, the point where x=0 and y=0 is the centre of the screen, and y-values increase as you go up the screen, and become negative as you go down the screen. Similarly with left and right. |
![]() |
![]() |
The HTML canvas can be whatever size we choose it to be (we've been using 300 x 300) The point where x=0 and y=0 is always the top-left corner, with values increasing down and to the right. There are no negative coordinates, or at least no visible ones. Later on, when you're writing games that run on your smartphone, you'll arrange for the canvas to be exactly the size of the device screen. |
|