Horizons uses a slightly modified version of p5.js. This repository contains the documentation for all of the parts of p5.js and JavaScript that you will need for Unit 0.
- [runp5 – running your game]
- [
game.goToNextFrame()
– the game loop] - [The game screen:
game.width
andgame.height
]
game.background()
game.fill()
game.stroke()
game.line()
game.rect()
game.ellipse()
game.textSize()
game.text()
- [numbers]
- [strings]
- [undefined]
- [true and false]
- [
while
loop] - [
for
loop]
- [
if
statements] - [true and false operators]
- [and and or]
- [Overview]
- [
.length
] - [
.push()
] - [
.pop()
] - [
.shift
] - [
.unshift
]
- [addition, multiplication, subtraction, division]
- [modulo % remainder]
Math.random()
Math.sqrt()
Math.pow()
Math.sin()
Math.cos()