Skip to content

hyperb1iss/lightscript-workshop

Folders and files

NameName
Last commit message
Last commit date
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 3, 2025
Apr 3, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 4, 2025
Apr 3, 2025

Repository files navigation

๐ŸŒ  LightScript Workshop for SignalRGB ๐Ÿ”ฎ

TypeScript Three.js WebGL Vite

Create stunning RGB lighting effects with modern tools

LightScript Workshop Screenshot

LightScript Workshop is a modern TypeScript framework for creating beautiful RGB lighting effects for SignalRGB. Transform the way you build Lightscripts with a type-safe, decorator-based approach featuring hot reloading, WebGL integration, and an efficient build system.

โšก Features

  • ๐Ÿ”ท Modern TypeScript - Full type safety prevents runtime errors
  • ๐Ÿ”ฎ Three.js Integration - Powerful WebGL rendering capabilities
  • ๐ŸŽจ Canvas 2D Support - Traditional drawing API for simpler effects
  • โšก Hot Reloading - Instant visual feedback while coding
  • ๐Ÿงฉ Decorator-Based Controls - Define UI elements with TypeScript decorators
  • โš™๏ธ Optimized Build Pipeline - Production-ready effects with Vite
  • ๐Ÿงช Testing Framework - Maintain quality with Vitest
  • ๐Ÿค– AI-Assisted Development - Create effects with AI assistance

๐ŸŒ Quick Start

# Clone the repository
git clone https://github.com/hyperb1iss/lightscript-workshop.git
cd lightscript-workshop

# Install dependencies
npm install

# Start development server
npm run dev

Then open your browser to http://localhost:3000 to see the default effect. Add ?effect=effect-name to the URL to view specific effects.

๐Ÿ“š Documentation

We've created comprehensive documentation to help you get the most out of LightScript Workshop:

๐ŸŒˆ Example Effects

The framework includes these demonstration effects:

๐ŸŒ€ Puff Stuff Tunnel

A ray-marched tunnel effect with dynamic colors and style options.

Key features:

  • Ray marching in fragment shader
  • Multiple color schemes
  • Dynamically adjustable parameters

๐ŸŒŠ Simple Wave

A wave-based RGB effect showcasing smooth animation and minimal resource usage.

Key features:

  • Sine wave generation
  • Multiple color modes
  • Optimized for performance

โœจ Glow Particles

A vibrant particle system with glowing effects using Canvas 2D rendering.

Key features:

  • Particle physics simulation
  • Glowing effects with shadows
  • Trail rendering with transparency
  • Multiple color schemes

๐Ÿ’ป Development Workflow

  1. Create a new effect directory in effects/your-effect-name/

    effects/your-effect-name/
    โ”œโ”€โ”€ fragment.glsl  # Shader code
    โ””โ”€โ”€ main.ts        # Effect implementation with decorators
    
  2. Register your effect in the effects registry

  3. Develop with live reloading

    npm run dev
  4. Build for SignalRGB

    EFFECT=your-effect-name npm run build
  5. Import the generated HTML file into SignalRGB

๐Ÿ”ฌ Creating a Custom Effect

Creating a new effect is easy with the LightScript framework:

  1. Create effect directory structure in effects/
  2. Define controls using TypeScript decorators in your effect class
  3. Create GLSL shader for visuals
  4. Implement TypeScript class extending BaseEffect with the @Effect decorator
  5. Register your effect

Check the Developer Guide for a complete walkthrough or try the AI-Assisted Development approach for faster results.

โš™๏ธ Building & Deployment

Building a Single Effect

EFFECT=effect-name npm run build

Building All Effects

npm run build

Debug Builds

For easier troubleshooting:

NO_MINIFY=true EFFECT=effect-name npm run build:debug

๐ŸŽฎ SignalRGB Integration

  1. Build your effect using the commands above
  2. Copy your HTML file(s) from the dist/ directory to:
    • Windows: ~/Documents/WhirlwindFX/Effects
  3. Restart SignalRGB or click the refresh button in the app
  4. Your custom effect will now appear in the "Lighting Effects" section

๐Ÿค Contributing

Contributions are welcome! Whether you're fixing bugs, improving documentation, or creating new effects, please feel free to jump in. Check out our existing issues or open a new one to discuss proposed changes.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Created by Stefanie Jane ๐ŸŒ 

If you love lightscript-workshop, star the repo and buy me a Monster Ultra Violet! โšก๏ธ