Skip to content

v1.2.0 — "Materials"

Latest

Choose a tag to compare

@Edwson Edwson released this 07 Aug 03:18
b330088

Six more shaders (51 → 57), taking Shaders & Light from 6 to 12. The set is now a materials library: every entry is a different optical family rather than another noise field. Still zero runtime dependencies — raw WebGL2 and hand-written GLSL ES 3.00.

Added — Shaders & Light (6 → 12)

Component What makes it physical
refracted-glass separate index of refraction per RGB channel (Cauchy-ordered, blue bent hardest) → real chromatic dispersion in the bevel, with a Schlick Fresnel rim and a Beer–Lambert body tint
brushed-metal anisotropic GGX with Smith-correlated shadowing over a brush-direction field, so the highlight stretches perpendicular to the grain. pattern: "linear" | "radial"
moire-weave the beat of two rigid lattices is the actual difference frequency; every cosine is box-filtered by sinc(fwidth(φ)), so it dissolves into its own mean at a two-pixel period instead of boiling
velvet-sheen an Ashikhmin velvet lobe gated by an inverted Fresnel — brightest at grazing angles, dark facing the viewer
translucent-wax the interior light path is marched for thickness, then attenuated by Beer–Lambert with wrapped diffuse and a forward-scatter lobe
diffraction-grating the grating equation solved for wavelength per order (d·sinθ = mλ) rather than integrated over sampled wavelengths, which keeps the spectral lines continuous instead of beading

Added — /how-to-use

A complete install and deployment guide on the playground, MCP first: server config for Claude Desktop, Claude Code and Cursor, the three tools and their arguments, then the CLI, shadcn and by-hand paths, where the files land, and a troubleshooting table.

{ "mcpServers": { "reactomega": { "command": "npx", "args": ["-y", "github:Edwson/ReactOmega", "reactomega-mcp"] } } }

Install

npx -y github:Edwson/ReactOmega add refracted-glass
npx shadcn@latest add https://cdn.jsdelivr.net/gh/Edwson/ReactOmega@v1.2.0/public/r/refracted-glass.json

Verified

  • test:registry and test:mcp green on Node 18, 20 and 22
  • reduced-motion compliance enforced in CI transitively, so a shader inherits it from the primitive
  • every shader rendered headless and inspected — no blank, blown-out or frozen output
  • no component force-loses its WebGL context, locked by a regression test (that bug shipped in 1.1.0 and broke every shader under React StrictMode)

57 components — text 10 · interaction 6 · components 8 · physics 12 · shader 12 · cursor 5 · scroll 4