Basic p5, parcel, typescript setup
This commit is contained in:
parent
a6616f5f21
commit
d0e3e51a7d
11 changed files with 64 additions and 114045 deletions
13
src/Player.ts
Normal file
13
src/Player.ts
Normal 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() {}
|
||||
}
|
||||
|
|
@ -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
2
src/constants.ts
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
export const SCREEN_WIDTH = document.body.clientWidth;
|
||||
export const SCREEN_HEIGHT = document.body.clientHeight;
|
||||
Reference in a new issue