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

15
main.ts Normal file
View file

@ -0,0 +1,15 @@
import p5 from 'p5';
import { SCREEN_WIDTH, SCREEN_HEIGHT } from './src/constants';
const sketch = (s) => {
s.setup = () => {
s.createCanvas(SCREEN_WIDTH, SCREEN_HEIGHT);
};
s.draw = () => {
s.background(220);
s.rect(200, 200, 200, 200);
s.print(s.mouseX, s.mouseY);
};
};
const p5Instance = new p5(sketch);