Basic p5, parcel, typescript setup

This commit is contained in:
Dennis Schoepf 2021-07-14 14:03:15 +02:00
parent a6616f5f21
commit d0e3e51a7d
11 changed files with 64 additions and 114045 deletions

13
src/Player.ts Normal file
View file

@ -0,0 +1,13 @@
export class Player {
x: number;
y: number;
sketch: any;
constructor(sketch: any, x: number, y: number) {
this.sketch = sketch;
this.x = x;
this.y = y;
}
draw() {}
}

View file

@ -1,4 +1,4 @@
export const colors = {
export const colors: { [key: string]: string } = {
greyLighter: '#EBEEF2',
greyLight: '#D0D5D9',
grey: '#B0B7BF',

2
src/constants.ts Normal file
View file

@ -0,0 +1,2 @@
export const SCREEN_WIDTH = document.body.clientWidth;
export const SCREEN_HEIGHT = document.body.clientHeight;