Skip to content

RadianceLightweight, reactive WebGL library

A toolkit for building shader-driven experiences.

✨ Simple API

Radiance takes care of the WebGL boilerplate, so you can focus on your shader.

import "./styles.css";

document.getElementById("app").innerHTML = `
<h1>Hello world</h1>
`;

🪶 Lightweight

The lightest way to render a simple shader, after vanilla WebGL.

vanilla WebGL
0.81 kB
68 sloc
@radiancejs/gl0.11.0
5.1 kB
5 sloc
twgl.js7.0.0
6.39 kB
36 sloc
ogl1.0.11
12.84 kB
29 sloc
three0.183.2
119.92 kB
39 sloc

weight = gzip sizesloc = source lines of code (JS) to render the shader

Updated Jun 18, 2026. See the benchmark.

↺ Reactive

Radiance automatically re-renders the canvas when uniforms are updated, or when the canvas is resized.

import "./styles.css";

document.getElementById("app").innerHTML = `
<h1>Hello world</h1>
`;

🛠️ Fully typed

Radiance provides type-safety for everything, including uniforms.

ts
const { uniforms } = glCanvas({
  canvas,
  fragment,
  uniforms: {
    uPointer: [0, 0], 
  },
});

uniforms.uPointer = 42; // Type 'number' is not assignable to type 'number[]'.

Released under the MIT License.