Skip to content

hyperb1iss/lightscript-workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LightScript Workshop

Mind-bending RGB effects for the chronically creative

TypeScript Three.js WebGL Vite SignalRGB

License GitHub Stars

๐Ÿ“š Documentation ยท ๐ŸŽฎ Playground ยท ๐ŸŒ€ Quick Start


๐Ÿ”ฎ What is LightScript Workshop?

LightScript Workshop is a TypeScript framework for creating custom lighting effects for SignalRGB โ€” the app that unifies control of your RGB keyboards, mice, headsets, and other PC peripherals.

Instead of being limited to SignalRGB's built-in effects, LightScript lets you write your own using WebGL shaders or Canvas 2D, with a modern development experience:

  • ๐ŸŽจ TypeScript decorators that automatically generate SignalRGB's control UI
  • ๐Ÿ”ฅ Hot reloading so you see changes instantly as you code
  • ๐ŸŽต Audio reactivity built-in โ€” sync your lights to music
  • ๐Ÿ’Ž GPU-accelerated rendering via Three.js and WebGL
  • ๐Ÿ“ฆ One command to build standalone HTML files that drop right into SignalRGB

Whether you want pulsing black holes, glitchy cyberpunk rain, or particle swarms that react to your music โ€” if you can imagine it, you can build it.


๐ŸŒ€ Quick Start

git clone https://github.com/hyperb1iss/lightscript-workshop.git
cd lightscript-workshop
pnpm install
pnpm dev

Open localhost:4096 โ€” you'll see a live preview with controls. Pick an effect from the sidebar, tweak the sliders, and watch your creation in real-time.


๐ŸŒŒ Effect Gallery

LightScript ships with a collection of effects to use, remix, or learn from:

Effect What It Does
๐Ÿ•ณ๏ธ Black Hole Gravitational lensing with an accretion disk and Hawking radiation
๐Ÿ’Ž Voronoi Flow Cellular patterns morphing with fluid dynamics
โš›๏ธ Quantum Foam Planck-scale virtual particles popping in and out of existence
๐ŸŒง๏ธ Cyber Descent Cyberpunk matrix rainfall with scanline artifacts
๐Ÿ”ฎ Kaleido Tunnel Raymarched kaleidoscopic infinity tunnel
๐Ÿ’œ Glow Particles Vibrant particle swarms with luminous trails
๐ŸŽต Audio Pulse Reactive rings that pulse to your music
๐Ÿ‘๏ธ Iris Geometric audio visualizer with dynamic tessellation
๐Ÿง  Neural Synapse Fire Synaptic networks firing in cascading patterns
๐ŸŽฏ ADHD Hyperfocus Tunnel vision with dopamine-seeking sparkles

๐Ÿ”ง How It Works

Effects are TypeScript classes paired with GLSL fragment shaders. Decorators define the controls that appear in SignalRGB:

import { Effect, NumberControl, WebGLEffect, initializeEffect } from '@lightscript/core'
import fragmentShader from './fragment.glsl'

@Effect({ name: 'Neon Dreams', author: 'You' })
export class NeonDreams extends WebGLEffect<{ speed: number }> {
  @NumberControl({ label: 'Speed', min: 1, max: 10, default: 5 })
  speed!: number

  constructor() {
    super({ id: 'neon-dreams', name: 'Neon Dreams', fragmentShader })
  }

  // ... control value mapping and uniform updates
}

initializeEffect(() => new NeonDreams().initialize())

The shader receives your control values as uniforms:

uniform float iTime;
uniform vec2 iResolution;
uniform float iSpeed;

void mainImage(out vec4 fragColor, vec2 fragCoord) {
    vec2 uv = fragCoord / iResolution.xy;
    float t = iTime * iSpeed;
    vec3 col = 0.5 + 0.5 * cos(t + uv.xyx + vec3(0, 2, 4));
    fragColor = vec4(col, 1.0);
}

void main() { mainImage(gl_FragColor, gl_FragCoord.xy); }

Drop these files in src/effects/neon-dreams/ โ€” the framework auto-discovers them. No registration needed.


๐Ÿ’Ž Features

Feature Description
๐ŸŽฎ WebGL + Canvas 2D GPU-accelerated shaders or traditional Canvas drawing โ€” your choice
๐ŸŽ›๏ธ Decorator Controls @NumberControl, @BooleanControl, @ComboboxControl โ€” type-safe UI generation
๐Ÿ”ฅ Hot Reloading Edit shader code, see it instantly. No refresh, no waiting.
๐ŸŽต Audio Reactive Built-in FFT analysis with bass/mid/treble helpers and spectrum textures
๐Ÿค– AI-Native Structured patterns that Claude, Cursor, and Copilot understand
๐Ÿ“ฆ Monorepo @lightscript/core for the API, @lightscript/dev for tooling

๐Ÿ—‚๏ธ Project Structure

lightscript-workshop/
โ”œโ”€โ”€ packages/
โ”‚   โ”œโ”€โ”€ core/              # @lightscript/core โ€” Framework API
โ”‚   โ””โ”€โ”€ dev/               # @lightscript/dev โ€” Dev server & build tools
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ effects/           # Your effects live here
โ”‚   โ””โ”€โ”€ shaders/           # Shared GLSL utilities (noise, colors, SDFs)
โ”œโ”€โ”€ docs/                  # VitePress documentation
โ””โ”€โ”€ dist/                  # Built effects ready for SignalRGB

โŒจ๏ธ Commands

Command What It Does
pnpm dev Start dev server with hot reload
pnpm build:effects Build all effects to dist/
pnpm docs Preview documentation locally
pnpm typecheck Run TypeScript type checking
pnpm test Run test suite
pnpm lint Lint with Biome

๐Ÿช Deploy to SignalRGB

Build your effect:

EFFECT=black-hole pnpm build:effects

Copy the generated HTML file to SignalRGB's effects folder:

  • Windows: ~/Documents/WhirlwindFX/Effects/
  • macOS: ~/Documents/SignalRGB/Effects/

Restart SignalRGB, find your effect under "Lighting Effects", and bask in the glow.


๐Ÿค– AI-Powered Development

LightScript's consistent patterns make it ideal for AI-assisted development. Try this prompt:

Create a WebGL effect called "aurora-waves" that simulates northern lights. Add controls for speed (1-10), intensity (0-200), and a color palette dropdown. Reference src/effects/black-hole/main.ts for the pattern.

See CLAUDE.md for complete AI agent documentation and the patterns that make generation reliable.


๐Ÿ“š Documentation

Full documentation at hyperb1iss.github.io/lightscript-workshop

  • ๐ŸŒŒ Getting Started โ€” Installation and your first effect
  • ๐Ÿ“– Reference โ€” Complete API documentation
  • ๐Ÿ’ก Examples โ€” Code patterns and snippets
  • ๐ŸŽฎ Playground โ€” Try effects in your browser

๐Ÿ’œ Contributing

Got a wild effect idea? Performance optimization? Bug fix? Contributions welcome.

pnpm install && pnpm dev   # Get running
# Make something awesome
pnpm test && pnpm lint     # Make sure it's solid

๐Ÿ“œ License

MIT License โ€” see LICENSE


Created by Stefanie Jane ๐ŸŒ 

If your RGB setup has transcended, buy me a Monster Ultra Violet! โšก๏ธ

About

Modern TypeScript framework for creating SignalRGB lightscripts

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Contributors 2

  •  
  •