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 14:03:15 +02:00

15 lines
334 B
TypeScript

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);