From 14398c97a3b105880156d191a3e9839178493930 Mon Sep 17 00:00:00 2001 From: Isaac Bowen Date: Sat, 11 Oct 2025 15:14:25 -0500 Subject: [PATCH] update the readme --- README.md | 111 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 102 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 329989a..71ab5fe 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,111 @@ -# Lightward AURA +# Lightward Aura -Aura generative visual system for Lightward +A WebGL-powered generative visual library for creating beautiful, animated plasma clouds. ## Live Demo -[Hosted on github pages](https://lightward.github.io/aura/) -## To Build +[https://aura.lightward.io/](https://aura.lightward.io/) -This project uses [rollup.js](https://rollupjs.org/guide/en/) as a bundle system. +## Usage -There is no dev server included, you will need your own. I use [Live Server for VSCode](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer) but any dev server capable of serving static files should do. +### Quick Start -To build and watch for changes +```html + + +``` + +### Custom Colors + +```javascript +const aura = new LightwardAura(gl, { + ...LightwardAura.defaultParams, + width: window.innerWidth, + height: window.innerHeight, + colors: [ + [100, 150, 255], // RGB values 0-255 + [255, 100, 150], + ], +}); +``` + +### API + +#### `new LightwardAura(gl, params)` + +- `gl`: WebGL2 rendering context +- `params`: Configuration object (see below) + +#### Methods + +- `start(play = true)` - Start the render loop +- `play()` - Resume animation +- `pause()` - Pause animation +- `shutdown()` - Clean up resources + +#### Static Properties + +- `LightwardAura.defaultParams` - Default configuration object (excludes `width` and `height`) + +#### Configuration + +```typescript +{ + width: number; // Canvas width + height: number; // Canvas height + animTime: number; // Initial animation time + seed: number; // Random seed for reproducibility + colors: [r, g, b][]; // Array of RGB color tuples (0-255) + + globalParams: { + contrast: number; // Default: 1.37 + saturation: number; // Default: 1.69 + speed: number; // Default: 0.13 + noise: number; // Default: 0.5 + targetFps: number; // Default: 60 + // ... (see defaultParams for full list) + }; + // ... (see defaultParams for complete structure) +} +``` + +## Development + +### Build + +```bash +npm install +npm run build +``` + +### Watch Mode + +```bash +npm run watch +``` + +Use any static file server (like [Live Server for VSCode](https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer)) to view `index.html` during development. + +### Test + +```bash +npm test +``` + +## License + +[UNLICENSE](./UNLICENSE) - Public domain