Star 历史趋势
数据来源: GitHub API · 生成自 Stargazers.cn
README.md

Radiant

Radiant

Open source shaders and visual effects for the web.
Drop-in canvas animations — zero dependencies, zero build step.

94 shaders MIT License Live Gallery

Radiant Gallery


Quick Start

Every shader is a self-contained HTML file — <style> + <canvas> + <script>. No framework, no bundler, no runtime. Use them anywhere.

1. Pick a shader

Browse the gallery or download the shader pack. You can also grab individual files from the static/ directory in this repo.

2. Embed it

<iframe
  src="https://stargazers.cn/raw/pbakaus/radiant/main/event-horizon.html"
  style="position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: -1;"
></iframe>

That's it — a full-screen animated background in one tag.

3. Control it at runtime

Shaders accept live parameter updates through postMessage:

const iframe = document.querySelector('iframe');

// Adjust any parameter on the fly
iframe.contentWindow.postMessage(
  { type: 'param', name: 'ROTATION_SPEED', value: 0.6 },
  '*'
);

Each shader's parameters (name, range, default) are listed in src/lib/shaders.ts.

Use Cases

  • Website backgrounds — full-viewport ambient animation behind your content
  • Hero sections — eye-catching landing page visuals
  • Presentations — animated slides and speaker backdrops
  • Digital signage — lobby screens, event displays
  • Creative coding — remix, fork, and learn from real Canvas 2D and WebGL techniques

What's Inside

94 shaders across Canvas 2D and WebGL, organized by visual style:

TagDescription
fillFull-canvas effects (backgrounds, textures)
objectStandalone centered elements
particlesParticle systems and swarms
physicsPhysics simulations (springs, waves, gravity)
noisePerlin/simplex noise-driven visuals
organicFluid, biological, and natural forms
geometricHard-edged patterns and tessellations

Every shader includes:

  • Mouse/touch interaction
  • Tunable parameters via postMessage
  • Visibility-based pause (saves battery)
  • DPR-aware rendering (capped at 2x)
  • 60fps targeting on standard hardware

Color Schemes

The gallery supports 6 color schemes applied via CSS filter on the iframe — no shader modification needed:

SchemeFilter
Amber (default)none
Monograyscale(1)
Bluehue-rotate(175deg)
Rosehue-rotate(300deg) saturate(1.1)
Emeraldhue-rotate(90deg) saturate(1.2)
Arctichue-rotate(180deg) saturate(0.5) brightness(1.1)

Development

npm install
npm run dev       # Start dev server
npm run build     # Production build
npm run check     # TypeScript + Svelte checks

The gallery frontend is SvelteKit 2 + Svelte 5. Shaders themselves require no build step.

Contributing

See CONTRIBUTORS.md for local development setup, conventions, and how to add new shaders.

License

MIT — Copyright (c) 2025 Paul Bakaus

Use these shaders in personal projects, commercial products, client work — whatever you want. Attribution is appreciated but not required.

关于 About

A curated collection of generative shader art

语言 Languages

HTML81.6%
Svelte10.6%
TypeScript4.4%
JavaScript3.5%

提交活跃度 Commit Activity

代码提交热力图
过去 52 周的开发活跃度
283
Total Commits
峰值: 214次/周
Less
More

核心贡献者 Contributors