A quick-start template to spin up a p5js server, with vercel support and a few other goodies.
This project is a web-based generative art application that creates unique artworks based on random seeds. It utilizes p5.js for rendering and includes features such as regeneration and exporting.
- Randomly generated seed
- Regeneration of artwork with new seeds
- Export functionality (low and high resolution)
- Customizable color palettes using randomColor.js
- Toast notifications for user feedback
- Clone the repository
- Navigate to the project directory
- Install dependencies (if any)
To run the project locally:
-
For development:
node dev.js -
For production:
node server.js -
Open your browser and navigate to
http://localhost:3000(or the port specified in your config.js)
-
Desktop:
- 'r' key: Regenerate artwork
- 's' key: Export low-resolution image
- '2' key: Export 2x resolution image
- '4' key: Export 4x resolution image
-
Mobile:
- "Re-generate" button: Create new artwork
- "Export" button: Save current artwork
The project uses a config.js file for central configuration. You can modify the following parameters:
projectName: The name of your projectprojectSlug: A URL-friendly version of your project nameport: The port number for the server (default: 3000)
The project structure includes:
public/: Contains all client-side filesserver.js: Express server for productiondev.js: Development server with live reloading
To start the development server:
node dev.js
To start the production server:
node server.js
[Include your license information here]
- p5.js library
- randomColor.js by David Merfield
