Quick start
The documentation is a work in progress, and the API of Radiance is still subject to changes. For now, you can browse the examples to get an idea of how the library works.
A proper documentation will come soon !
Installation
sh
$ npm add -D @radiancejs/glsh
$ pnpm add -D @radiancejs/glsh
$ yarn add -D @radiancejs/glsh
$ bun add -D @radiancejs/glUsage
ts
import { glCanvas } from "@radiancejs/gl";
glCanvas({
canvas: "#glCanvas",
fragment: /* glsl */ `
varying vec2 vUv; // automatically provided
uniform float uTime; // automatically provided and updated
void main() {
gl_FragColor = vec4(vUv, sin(uTime) / 2. + .5, 1.);
}
`,
});