Rules, not loops
Style a thousand objects with one selector. The cascade decides, like on a web page.
@scene { cube.corner * 4; }
.corner { color: #ff5a36; }
Selectors, the cascade and @keyframes, compiled into
a single raymarching shader. No Three.js. No meshes. Just CSS you
already know.
Style a thousand objects with one selector. The cascade decides, like on a web page.
@scene { cube.corner * 4; }
.corner { color: #ff5a36; }
The compiler writes the GLSL: the whole scene becomes one fragment shader, raymarched on the GPU.
// GSS → AST → cascade → GLSL
vec2 map(vec3 p) { … }
Every model knows CSS by heart. It writes the style sheet; the compiler writes the shader.
#dot {
material: jelly(0.6);
}
Compile and render GSS in your application, with TypeScript types included.
npm install gss-lang@0.0.5
package setup →
Included in gss-lang. Import .gss files and ship the runtime with the compiled scene.
import gss from "gss-lang/vite";
Vite setup →
Load the versioned browser module, then add a <gss-scene> to your page.
<script type="module" src="https://cdn.jsdelivr.net/npm/gss-lang@0.0.5/lib/embed.js"></script>
CDN setup →