Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.

p5.js Starter

Minimal p5.js starter example

View demo

How it works

The http.tsx file returns an HTML response with the client.ts file as a module script that is loaded on the client. The client.ts file imports p5 from esm.sh and contains the p5 code.

See also: https://www.val.town/v/saolsen/p5