RadianceLightweight, reactive WebGL library
A toolkit for building shader-driven experiences.
A toolkit for building shader-driven experiences.
Radiance takes care of the WebGL boilerplate, so you can focus on your shader.
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
Radiance automatically re-renders the canvas when uniforms are updated, or when the canvas is resized.
Radiance provides type-safety for everything, including uniforms.
const { uniforms } = glCanvas({
canvas,
fragment,
uniforms: {
uPointer: [0, 0],
},
});
uniforms.uPointer = 42; // Type 'number' is not assignable to type 'number[]'.