Files
yawn/docs/index.md
T
Ampandheaust 9768765d74 Replace addons with conventional handles
Provide the single-loadout Scene API, SAB-backed meshes, cameras, materials, lights, workers, post effects, and tutorial playgrounds. Batch matching row growth so active GPU loadouts refresh once.

Amp-Thread-ID: https://ampcode.com/threads/T-01a01380-b478-77d0-84a0-102880a5c5ae
Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
2026-08-20 06:39:30 +00:00

1.7 KiB

layout, hero, features
layout hero features
home
name text tagline actions
Yawn Render graphs over shared data. A small Rust/WASM core with optional conventional TypeScript handles.
theme text link
brand Start the tutorial /guide/getting-started
theme text link
alt Open playground /playground
title details
Hot state stays shared Transform, material, light, and camera changes are direct SharedArrayBuffer writes from any thread.
title details
Graph-authored GPU work WGSL, pipelines, compute, HDR, and post effects live in one externally supplied DAG loadout.
title details
Conventional when wanted The handles addon supplies Scene, Mesh, materials, lights, glTF import, and BVH picking without adding core semantics.

The shortest useful scene

import { Mesh, PBRMaterial, Scene } from "@yawn/handles";

const scene = new Scene(document.querySelector("canvas"), { hdr: true });
await scene.ready;

const material = new PBRMaterial(scene, { baseColor: [0.2, 0.7, 1, 1] });
await material.ready;
const mesh = new Mesh(scene, {
  material,
  vertexData: {
    positions: [-0.7, -0.6, 0, 0.7, -0.6, 0, 0, 0.7, 0],
    indices: [0, 1, 2],
  },
});
await mesh.ready;

mesh.position[0] = 0.25; // direct SAB mutation

Scene installs one HDR clustered-forward loadout. Adding compute, custom shaders, textures, or post effects rebuilds that same loadout; changing values already present in shared rows does not send a message.

handles ──▶ graph AST ──▶ S-expression ──▶ core worker ──▶ Rust/WebGPU
any JS thread ─────────────── direct SAB row writes ────────────────┘