Your selectors
Classes, ids, :last-child and the cascade pick the
objects, like the elements of a page.
@scene { cube.key * 4; }
.key:last-child { color: #ff5a36; }
If you can write CSS, you can write GSS. Your 3D scene is a style sheet, and the GPU draws it.
Classes, ids, :last-child and the cascade pick the
objects, like the elements of a page.
@scene { cube.key * 4; }
.key:last-child { color: #ff5a36; }
:hover, transition and
@keyframes move the scene the way they move a page.
.key { transition: 0.2s ease-out; }
.key:hover { translate: 0 0.2 0; }
var(), calc(), @media and
light-dark() fit the scene to the page around it.
scene { --accent: #ff5a36; }
cube { color: var(--accent); }
Compile and render GSS in your application, with TypeScript types included.
npm install gss-lang@0.0.8
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.8/lib/embed.js"></script>
CDN setup →
Want to be on this list? Read the contributing guide, then open a pull request.