Basic p5, parcel, typescript setup
This commit is contained in:
parent
a6616f5f21
commit
d0e3e51a7d
11 changed files with 64 additions and 114045 deletions
15
main.ts
Normal file
15
main.ts
Normal 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);
|
||||
Reference in a new issue