This repository has been archived on 2026-03-12. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
codewanderer/main.ts
2021-07-14 17:27:11 +02:00

23 lines
472 B
TypeScript

import p5 from 'p5';
import { colors } from './src/constants/colors';
import { SCREEN_WIDTH, SCREEN_HEIGHT } from './src/constants/screen';
import { Player } from './src/Player';
const sketch = (s) => {
let player;
s.setup = () => {
s.createCanvas(SCREEN_WIDTH, SCREEN_HEIGHT);
s.noCursor();
player = new Player();
};
s.draw = () => {
s.background(s.color(colors.greyLighter));
player.follow();
};
};
export const mp5 = new p5(sketch);