Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.
JavaScript 3d3d-assets3d-modelingagent-skillsagent-toolsai-agentsasset-pipelinecligame-assetsglbgltfmcpmcp-servermodel-context-protocolprocedural-generationprocedural-modelingtext-to-3dthreejstypescript
feat(site): a specimen gallery built by running the programs
Matt Kissinger64d41218588d
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.ymlnew file mode 100644index 00000000..18473541--- /dev/null+++ b/.github/workflows/pages.yml@@ -0,0 +1,78 @@+name: Gallery++# The gallery is built, not published from a folder of exported meshes: every GLB+# it serves comes out of running `examples/*.kiln.js` through the engine on the+# runner. That is the point of it -- a program and the model the page shows cannot+# drift apart -- and it also means a program that stops building fails here.+on:+ push:+ branches: [main]+ paths:+ - 'examples/**'+ - 'site/**'+ - 'src/**'+ - 'scripts/authorship.ts'+ - 'README.md'+ - '.github/workflows/pages.yml'+ workflow_dispatch:++concurrency:+ group: pages+ cancel-in-progress: true++permissions:+ contents: read+ pages: write+ id-token: write++env:+ KILN_RENDER: cpu++jobs:+ build:+ name: build the gallery+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4++ - name: Setup Bun+ uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2+ with:+ bun-version: 1.3.14++ - name: Install the engine+ run: bun install --frozen-lockfile++ - name: Install the site+ run: bun install --frozen-lockfile+ working-directory: site++ - name: Typecheck the site+ run: bunx tsc --noEmit+ working-directory: site++ # Fifty programs through the evaluator, writing GLBs, thumbnails and the+ # index the page reads. Roughly a minute of CPU.+ - name: Build the assets+ run: bun scripts/build-assets.mjs+ working-directory: site++ - name: Build the site+ run: bunx vite build+ working-directory: site++ - uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0+ - uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0+ with:+ path: site/dist++ deploy:+ name: deploy to Pages+ needs: build+ runs-on: ubuntu-latest+ environment:+ name: github-pages+ url: ${{ steps.deployment.outputs.page_url }}+ steps:+ - id: deployment+ uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346 # v5.0.1diff --git a/site/README.md b/site/README.mdnew file mode 100644index 00000000..842ba8ef--- /dev/null+++ b/site/README.md@@ -0,0 +1,29 @@+# The gallery++A viewer for every program in [`examples/`](../examples), deployed to GitHub Pages by+[`.github/workflows/pages.yml`](../.github/workflows/pages.yml).++The important thing about it is that it holds no assets of its own. `scripts/build-assets.mjs` runs+each `*.kiln.js` through the same evaluator the test suite uses and keeps what comes back: the GLB,+and the triangle count, draw calls, material count and bounds off the engine's integration manifest.+Edit a program, rebuild, and the mesh on the page is the new one. There is no exported copy sitting+in the repository waiting to disagree with the file beside it, which is also why the built payload is+gitignored rather than committed.++Attribution on each card is read from the program's own header by+[`scripts/authorship.ts`](../scripts/authorship.ts), the same parser the README's authorship test+uses, so the two can never tell different stories about who wrote what.++```bash+bun install # from this directory+bun run assets # ~1 minute: fifty programs through the engine+bun run dev+```++`bun run assets` needs the engine's own dependencies, so run `bun install` in the repository root+first. React and three live here and nowhere else; the engine has no browser dependency and this+directory exists partly to keep it that way.++The viewer is a viewer. Nothing in the authoring loop needs a browser — the models that wrote these+programs looked at rendered contact sheets, not at a canvas — and this page is for the person+reading the repository, not for the agent writing to it.diff --git a/site/bun.lock b/site/bun.locknew file mode 100644index 00000000..ffc814d0--- /dev/null+++ b/site/bun.lock@@ -0,0 +1,283 @@+{+ "lockfileVersion": 1,+ "configVersion": 1,+ "workspaces": {+ "": {+ "name": "kiln-site",+ "dependencies": {+ "@react-three/drei": "^10.7.8",+ "@react-three/fiber": "^9.7.0",+ "react": "^19.2.8",+ "react-dom": "^19.2.8",+ "three": "0.185.1",+ },+ "devDependencies": {+ "@types/react": "^19.2.18",+ "@types/react-dom": "^19.2.7",+ "@types/three": "^0.185.4",+ "@vitejs/plugin-react": "^6.1.1",+ "typescript": "^7.0.2",+ "vite": "^8.2.2",+ },+ },+ },+ "packages": {+ "@babel/runtime": ["@babel/[email protected]", "", {}, "sha512-Nq8OhGWiZIZGV6hLHoyAKLLcJihP/xFeBMGJoUrxTX2psI8dCifzLhZISFb+VWS3wFMRDmCGw5R+dOySCqPLhw=="],++ "@dimforge/rapier3d-compat": ["@dimforge/[email protected]", "", {}, "sha512-uekIGetywIgopfD97oDL5PfeezkFpNhwlzlaEYNOA0N6ghdsOvh/HYjSMek5Q2O1PYvRSDFcqFVJl4r4ZBwOow=="],++ "@mediapipe/tasks-vision": ["@mediapipe/[email protected]", "", {}, "sha512-CZWV/q6TTe8ta61cZXjfnnHsfWIdFhms03M9T7Cnd5y2mdpylJM0rF1qRq+wsQVRMLz1OYPVEBU9ph2Bx8cxrg=="],++ "@monogrid/gainmap-js": ["@monogrid/[email protected]", "", { "dependencies": { "promise-worker-transferable": "^1.0.4" }, "peerDependencies": { "three": ">= 0.159.0" } }, "sha512-2Z0FATFHaoYJ8b+Y4y4Hgfn3FRFwuU5zRrk+9dFWp4uGAdHGqVEdP7HP+gLA3X469KXHmfupJaUbKo1b/aDKIg=="],++ "@oxc-project/types": ["@oxc-project/[email protected]", "", {}, "sha512-Nm4s/jB+4FpFsPhWGEC4h7rzksesmtnMXomo6rCMcg/b8zLQuOziRgkCS1fxDCXOlJB/6Q8oABOZ/OP6RIPj9A=="],++ "@react-three/drei": ["@react-three/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.26.0", "@mediapipe/tasks-vision": "0.10.17", "@monogrid/gainmap-js": "^3.0.6", "@use-gesture/react": "^10.3.1", "camera-controls": "^3.1.0", "cross-env": "^7.0.3", "detect-gpu": "^5.0.56", "glsl-noise": "^0.0.0", "hls.js": "^1.5.17", "maath": "^0.10.8", "meshline": "^3.3.1", "stats-gl": "^2.2.8", "stats.js": "^0.17.0", "suspend-react": "^0.1.3", "three-mesh-bvh": "^0.8.3", "three-stdlib": "^2.35.6", "troika-three-text": "^0.52.4", "tunnel-rat": "^0.1.2", "use-sync-external-store": "^1.4.0", "utility-types": "^3.11.0", "zustand": "^5.0.1" }, "peerDependencies": { "@react-three/fiber": "^9.0.0", "react": "^19", "react-dom": "^19", "three": ">=0.159" }, "optionalPeers": ["react-dom"] }, "sha512-rJXyuzLm2Xq0kafHuR47ajDGbOe/pEhzIr4m8E8zwzQs0iNjloFDqBwRhrXmP/w+onLeYyN3EYPFW/cwWK/4yA=="],++ "@react-three/fiber": ["@react-three/[email protected]", "", { "dependencies": { "@babel/runtime": "^7.17.8", "@types/webxr": "*", "base64-js": "^1.5.1", "buffer": "^6.0.3", "its-fine": "^2.0.0", "react-use-measure": "^2.1.7", "scheduler": "^0.27.0", "suspend-react": "^0.1.3", "use-sync-external-store": "^1.4.0", "zustand": "^5.0.3" }, "peerDependencies": { "expo": ">=43.0", "expo-asset": ">=8.4", "expo-file-system": ">=11.0", "expo-gl": ">=11.0", "react": ">=19 <19.3", "react-dom": ">=19 <19.3", "react-native": ">=0.78", "three": ">=0.156" }, "optionalPeers": ["expo", "expo-asset", "expo-file-system", "expo-gl", "react-dom", "react-native"] }, "sha512-EWm9FwcaOZQu/ExFW5rggoCMM1NJet5YbxVxKaOE+KSncrjU0Wx7017qSyGFvupviK89nMYGCWU3BIK4dI1clw=="],++ "@rolldown/binding-android-arm-eabi": ["@rolldown/[email protected]", "", { "os": "android", "cpu": "arm" }, "sha512-EypzgnYCwyVY4NDHKzGmNJT5b+XaQEBniHxsMdeIQLB/tcCzZnhqrzHpZFbX9iaxx+5RiB8caATBtfvZP7zVxQ=="],++ "@rolldown/binding-android-arm64": ["@rolldown/[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-l17HE9EweWaqJZhuUuNBN/FzM62xw+DECVnJyvMsxn8vJFAGLy5QfLDoYAcronkAN8VxKZHezDpulHDPx95vFw=="],++ "@rolldown/binding-darwin-arm64": ["@rolldown/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-8ED8ELFvHXc6OCETIn4gXObPiaR6bckM/ipXtbzlPVDRMBfEGjCKgO90F9YtfdpDatVx/ZQw7aZ1vUMf/+T3Mw=="],++ "@rolldown/binding-darwin-x64": ["@rolldown/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-/WPripjtiAIZ2tWY7ddijORT0Ujg87wxWW/qcoFVCKAWVDPhtY0xr7Dj0M3GyNGz60jGwTElhro/mkF9dT7dDQ=="],++ "@rolldown/binding-freebsd-x64": ["@rolldown/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-14DI4NcqpvbICxSnGLx3PmtDaWqRP/KGSGb6C+JLLVPeZRl6dKdHba3pGsqT3vpdTqhEYIPG0MMQ8c0xYqoJxA=="],++ "@rolldown/binding-linux-arm-gnueabihf": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-bxrWIRvHWQvbJwi+VIie/kDJmQxcNE6xxWwZdqF/ExVAigtHkv54WTLQPb+QsZdnFy18fg7JPfWGL0RH6vwIlQ=="],++ "@rolldown/binding-linux-arm64-gnu": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-toOY2BChBZyuxU7OYX6Tn389di4IzAqPTycVcci0O7FSfBqzRB3RZn+K5Is6ANf4tmgRd/K1yZTsNTXbkXsnLg=="],++ "@rolldown/binding-linux-arm64-musl": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-lAIXTH/aiLRLxsTgQvfhjo4K1ydWIp00+V0voOr9beb/9ZmkUFrSIb03dXNFRgMNvkE6oGsF10ioQ6UsI+vS5Q=="],++ "@rolldown/binding-linux-ppc64-gnu": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-kdnwS28Pkenp/mZMRwjXXXwxQ7pIsm+bF919LUK93BOyhcLsrVKdP2p9fxpiPNPAbNuch8ypQt0pm2P2LYCAGg=="],++ "@rolldown/binding-linux-s390x-gnu": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-516OdsyLdr5E65paF3yBF55t8mfm9+gmtCsK3xI7XKXIT7EfRlHhxL8K/NR6Hu8BWSgF5+1w74lTL0+nxcc8Qw=="],++ "@rolldown/binding-linux-x64-gnu": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-r8/z8n7GFaYRln3xmP1Cxy0HH/HLM0uBUPkEuSVEfKGDA89M0FsZRZJRSwe/tJjRx+fpH/gjorfhB8tmEbSFLA=="],++ "@rolldown/binding-linux-x64-musl": ["@rolldown/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-pAsE8iiDxUg1xBqdhrTfg45AVDVpirjz00sblEYClGNNcMnDb+e8beQgqIAw6LvauX/APvgxUnwrgun/YYGBhw=="],++ "@rolldown/binding-openharmony-arm64": ["@rolldown/[email protected]", "", { "os": "none", "cpu": "arm64" }, "sha512-lTcIYmmnQQA8Or/2DatS6oSqcdLHvendjS+zLu+FwgToynWMRSmQdpM65fTANJgIS4mjbMOo5KT2lnT9SAb96w=="],++ "@rolldown/binding-win32-arm64-msvc": ["@rolldown/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-e3Gu3WxbNk/UqQhxqU7YIYO+9ZBvWNz3U+h/qRFosscMFzdRPbXYSaSWgSnklv2fz1TgzBTcti2z35c/7irsHw=="],++ "@rolldown/binding-win32-x64-msvc": ["@rolldown/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-W/jg5qoRSqjsEv0+dZi4e687mcHqmVuU0P4fK6qS/xjetW2Gmc1W8j//z5nAeNcC8Ttm0hV46IjcYeuVwYhuiw=="],++ "@rolldown/pluginutils": ["@rolldown/[email protected]", "", {}, "sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw=="],++ "@tweenjs/tween.js": ["@tweenjs/[email protected]", "", {}, "sha512-vJmvvwFxYuGnF2axRtPYocag6Clbb5YS7kLL+SO/TeVFzHqDIWrNKYtcsPMibjDx9O+bu+psAy9NKfWklassUA=="],++ "@types/draco3d": ["@types/[email protected]", "", {}, "sha512-AX22jp8Y7wwaBgAixaSvkoG4M/+PlAcm3Qs4OW8yT9DM4xUpWKeFhLueTAyZF39pviAdcDdeJoACapiAceqNcw=="],++ "@types/offscreencanvas": ["@types/[email protected]", "", {}, "sha512-ieXiYmgSRXUDeOntE1InxjWyvEelZGP63M+cGuquuRLuIKKT1osnkXjxev9B7d1nXSug5vpunx+gNlbVxMlC9A=="],++ "@types/react": ["@types/[email protected]", "", { "dependencies": { "csstype": "^3.2.2" } }, "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w=="],++ "@types/react-dom": ["@types/[email protected]", "", { "peerDependencies": { "@types/react": "^19.2.0" } }, "sha512-I8bPpDLcHBv1qiIiXDCy71Rt8eQDKJP0sMSWJphDdAcdqiJ1sGpZamavoEIRZmYzjia9LuEb2HlYdDpmoENpvQ=="],++ "@types/react-reconciler": ["@types/[email protected]", "", { "peerDependencies": { "@types/react": "*" } }, "sha512-HHM3nxyUZ3zAylX8ZEyrDNd2XZOnQ0D5XfunJF5FLQnZbHHYq4UWvW1QfelQNXv1ICNkwYhfxjwfnqivYB6bFg=="],++ "@types/stats.js": ["@types/[email protected]", "", {}, "sha512-jIBvWWShCvlBqBNIZt0KAshWpvSjhkwkEu4ZUcASoAvhmrgAUI2t1dXrjSL4xXVLB4FznPrIsX3nKXFl/Dt4vA=="],++ "@types/three": ["@types/[email protected]", "", { "dependencies": { "@dimforge/rapier3d-compat": "~0.12.0", "@tweenjs/tween.js": "~23.1.3", "@types/stats.js": "*", "@types/webxr": ">=0.5.17", "fflate": "~0.8.2", "meshoptimizer": "~1.1.1" } }, "sha512-gAsBIC07NIFrxjbf7tH2t71c38uulFfk/RFoC7FNBSjMRAQ8J1x/RBvusX0N5PJouaYFJawXQqfCQ0RKUx/1nA=="],++ "@types/webxr": ["@types/[email protected]", "", {}, "sha512-h8fgEd/DpoS9CBrjEQXR+dIDraopAEfu4wYVNY2tEPwk60stPWhvZMf4Foo5FakuQ7HFZoa8WceaWFervK2Ovg=="],++ "@typescript/typescript-aix-ppc64": ["@typescript/[email protected]", "", { "os": "aix", "cpu": "ppc64" }, "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ=="],++ "@typescript/typescript-darwin-arm64": ["@typescript/[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA=="],++ "@typescript/typescript-darwin-x64": ["@typescript/[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA=="],++ "@typescript/typescript-freebsd-arm64": ["@typescript/[email protected]", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ=="],++ "@typescript/typescript-freebsd-x64": ["@typescript/[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw=="],++ "@typescript/typescript-linux-arm": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ=="],++ "@typescript/typescript-linux-arm64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ=="],++ "@typescript/typescript-linux-loong64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ=="],++ "@typescript/typescript-linux-mips64el": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA=="],++ "@typescript/typescript-linux-ppc64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "ppc64" }, "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA=="],++ "@typescript/typescript-linux-riscv64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "none" }, "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ=="],++ "@typescript/typescript-linux-s390x": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "s390x" }, "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw=="],++ "@typescript/typescript-linux-x64": ["@typescript/[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A=="],++ "@typescript/typescript-netbsd-arm64": ["@typescript/[email protected]", "", { "os": "none", "cpu": "arm64" }, "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA=="],++ "@typescript/typescript-netbsd-x64": ["@typescript/[email protected]", "", { "os": "none", "cpu": "x64" }, "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA=="],++ "@typescript/typescript-openbsd-arm64": ["@typescript/[email protected]", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ=="],++ "@typescript/typescript-openbsd-x64": ["@typescript/[email protected]", "", { "os": "openbsd", "cpu": "x64" }, "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg=="],++ "@typescript/typescript-sunos-x64": ["@typescript/[email protected]", "", { "os": "sunos", "cpu": "x64" }, "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g=="],++ "@typescript/typescript-win32-arm64": ["@typescript/[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ=="],++ "@typescript/typescript-win32-x64": ["@typescript/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g=="],++ "@use-gesture/core": ["@use-gesture/[email protected]", "", {}, "sha512-WcINiDt8WjqBdUXye25anHiNxPc0VOrlT8F6LLkU6cycrOGUDyY/yyFmsg3k8i5OLvv25llc0QC45GhR/C8llw=="],++ "@use-gesture/react": ["@use-gesture/[email protected]", "", { "dependencies": { "@use-gesture/core": "10.3.1" }, "peerDependencies": { "react": ">= 16.8.0" } }, "sha512-Yy19y6O2GJq8f7CHf7L0nxL8bf4PZCPaVOCgJrusOeFHY1LvHgYXnmnXg6N5iwAnbgbZCDjo60SiM6IPJi9C5g=="],++ "@vitejs/plugin-react": ["@vitejs/[email protected]", "", { "dependencies": { "@rolldown/pluginutils": "^1.0.1" }, "peerDependencies": { "@rolldown/plugin-babel": "^0.1.7 || ^0.2.0", "babel-plugin-react-compiler": "^1.0.0", "oxc-transform-react": "^0.145.0", "vite": "^8.0.0" }, "optionalPeers": ["@rolldown/plugin-babel", "babel-plugin-react-compiler", "oxc-transform-react"] }, "sha512-yxLaQV9gkhS8ezJqCM6+ndU7mDY6gqAg75NQ+0IjwEI8IYOmQCgkRwHKVSfWXW076DsqMo0Dk+0FK1U+M5RgFw=="],++ "base64-js": ["[email protected]", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],++ "bidi-js": ["[email protected]", "", { "dependencies": { "require-from-string": "^2.0.2" } }, "sha512-RKshQI1R3YQ+n9YJz2QQ147P66ELpa1FQEg20Dk8oW9t2KgLbpDLLp9aGZ7y8WHSshDknG0bknqGw5/tyCs5tw=="],++ "buffer": ["[email protected]", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.2.1" } }, "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA=="],++ "camera-controls": ["[email protected]", "", { "peerDependencies": { "three": ">=0.126.1" } }, "sha512-xkxfpG2ECZ6Ww5/9+kf4mfg1VEYAoe9aDSY+IwF0UEs7qEzwy0aVRfs2grImIECs/PoBtWFrh7RXsQkwG922JA=="],++ "cross-env": ["[email protected]", "", { "dependencies": { "cross-spawn": "^7.0.1" }, "bin": { "cross-env": "src/bin/cross-env.js", "cross-env-shell": "src/bin/cross-env-shell.js" } }, "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw=="],++ "cross-spawn": ["[email protected]", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],++ "csstype": ["[email protected]", "", {}, "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ=="],++ "detect-gpu": ["[email protected]", "", { "dependencies": { "webgl-constants": "^1.1.1" } }, "sha512-bqerEP1Ese6nt3rFkwPnGbsUF9a4q+gMmpTVVOEzoCyeCc+y7/RvJnQZJx1JwhgQI5Ntg0Kgat8Uu7XpBqnz1w=="],++ "detect-libc": ["[email protected]", "", {}, "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ=="],++ "draco3d": ["[email protected]", "", {}, "sha512-m6WCKt/erDXcw+70IJXnG7M3awwQPAsZvJGX5zY7beBqpELw6RDGkYVU0W43AFxye4pDZ5i2Lbyc/NNGqwjUVQ=="],++ "fdir": ["[email protected]", "", { "peerDependencies": { "picomatch": "^3 || ^4" }, "optionalPeers": ["picomatch"] }, "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg=="],++ "fflate": ["[email protected]", "", {}, "sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA=="],++ "fsevents": ["[email protected]", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],++ "glsl-noise": ["[email protected]", "", {}, "sha512-b/ZCF6amfAUb7dJM/MxRs7AetQEahYzJ8PtgfrmEdtw6uyGOr+ZSGtgjFm6mfsBkxJ4d2W7kg+Nlqzqvn3Bc0w=="],++ "hls.js": ["[email protected]", "", {}, "sha512-CW/pPvSOFIRsosbwxrYaE9ERmpTo5fbTqL7wCvuCFlqW1Bmb1K5fXsY7yiH95rmlr4rVuA7UXHbM/cIXQ6AXwg=="],++ "ieee754": ["[email protected]", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="],++ "immediate": ["[email protected]", "", {}, "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ=="],++ "is-promise": ["[email protected]", "", {}, "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ=="],++ "isexe": ["[email protected]", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],++ "its-fine": ["[email protected]", "", { "dependencies": { "@types/react-reconciler": "^0.28.9" }, "peerDependencies": { "react": "^19.0.0" } }, "sha512-KLViCmWx94zOvpLwSlsx6yOCeMhZYaxrJV87Po5k/FoZzcPSahvK5qJ7fYhS61sZi5ikmh2S3Hz55A2l3U69ng=="],++ "lie": ["[email protected]", "", { "dependencies": { "immediate": "~3.0.5" } }, "sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ=="],++ "lightningcss": ["[email protected]", "", { "dependencies": { "detect-libc": "^2.0.3" }, "optionalDependencies": { "lightningcss-android-arm64": "1.33.0", "lightningcss-darwin-arm64": "1.33.0", "lightningcss-darwin-x64": "1.33.0", "lightningcss-freebsd-x64": "1.33.0", "lightningcss-linux-arm-gnueabihf": "1.33.0", "lightningcss-linux-arm64-gnu": "1.33.0", "lightningcss-linux-arm64-musl": "1.33.0", "lightningcss-linux-x64-gnu": "1.33.0", "lightningcss-linux-x64-musl": "1.33.0", "lightningcss-win32-arm64-msvc": "1.33.0", "lightningcss-win32-x64-msvc": "1.33.0" } }, "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA=="],++ "lightningcss-android-arm64": ["[email protected]", "", { "os": "android", "cpu": "arm64" }, "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg=="],++ "lightningcss-darwin-arm64": ["[email protected]", "", { "os": "darwin", "cpu": "arm64" }, "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg=="],++ "lightningcss-darwin-x64": ["[email protected]", "", { "os": "darwin", "cpu": "x64" }, "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ=="],++ "lightningcss-freebsd-x64": ["[email protected]", "", { "os": "freebsd", "cpu": "x64" }, "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg=="],++ "lightningcss-linux-arm-gnueabihf": ["[email protected]", "", { "os": "linux", "cpu": "arm" }, "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ=="],++ "lightningcss-linux-arm64-gnu": ["[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg=="],++ "lightningcss-linux-arm64-musl": ["[email protected]", "", { "os": "linux", "cpu": "arm64" }, "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ=="],++ "lightningcss-linux-x64-gnu": ["[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg=="],++ "lightningcss-linux-x64-musl": ["[email protected]", "", { "os": "linux", "cpu": "x64" }, "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw=="],++ "lightningcss-win32-arm64-msvc": ["[email protected]", "", { "os": "win32", "cpu": "arm64" }, "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA=="],++ "lightningcss-win32-x64-msvc": ["[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA=="],++ "maath": ["[email protected]", "", { "peerDependencies": { "@types/three": ">=0.134.0", "three": ">=0.134.0" } }, "sha512-tRvbDF0Pgqz+9XUa4jjfgAQ8/aPKmQdWXilFu2tMy4GWj4NOsx99HlULO4IeREfbO3a0sA145DZYyvXPkybm0g=="],++ "meshline": ["[email protected]", "", { "peerDependencies": { "three": ">=0.137" } }, "sha512-/TQj+JdZkeSUOl5Mk2J7eLcYTLiQm2IDzmlSvYm7ov15anEcDJ92GHqqazxTSreeNgfnYu24kiEvvv0WlbCdFQ=="],++ "meshoptimizer": ["[email protected]", "", {}, "sha512-oRFNWJRDA/WTrVj7NWvqa5HqE1t9MYDj2VaWirQCzCCrAd2GHrqR/sQezCxiWATPNlKTcRaPRHPJwIRoPBAp5g=="],++ "nanoid": ["[email protected]", "", { "bin": { "nanoid": "bin/nanoid.cjs" } }, "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w=="],++ "path-key": ["[email protected]", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],++ "picocolors": ["[email protected]", "", {}, "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA=="],++ "picomatch": ["[email protected]", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="],++ "postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.18", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-RRuzqDtt5Y9h3quz5hWhK+TPnsmVs6WwSU6LkJMeY4HstUEDuYTG8UJSdawMRzmzAtV+KEoG8N3Qg2qLy5vM/A=="],++ "potpack": ["[email protected]", "", {}, "sha512-choctRBIV9EMT9WGAZHn3V7t0Z2pMQyl0EZE6pFc/6ml3ssw7Dlf/oAOvFwjm1HVsqfQN8GfeFyJ+d8tRzqueQ=="],++ "promise-worker-transferable": ["[email protected]", "", { "dependencies": { "is-promise": "^2.1.0", "lie": "^3.0.2" } }, "sha512-bN+0ehEnrXfxV2ZQvU2PetO0n4gqBD4ulq3MI1WOPLgr7/Mg9yRQkX5+0v1vagr74ZTsl7XtzlaYDo2EuCeYJw=="],++ "react": ["[email protected]", "", {}, "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw=="],++ "react-dom": ["[email protected]", "", { "dependencies": { "scheduler": "^0.27.0" }, "peerDependencies": { "react": "^19.2.8" } }, "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ=="],++ "react-use-measure": ["[email protected]", "", { "peerDependencies": { "react": ">=16.13", "react-dom": ">=16.13" }, "optionalPeers": ["react-dom"] }, "sha512-KrvcAo13I/60HpwGO5jpW7E9DfusKyLPLvuHlUyP5zqnmAPhNc6qTRjUQrdTADl0lpPpDVU2/Gg51UlOGHXbdg=="],++ "require-from-string": ["[email protected]", "", {}, "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw=="],++ "rolldown": ["[email protected]", "", { "dependencies": { "@oxc-project/types": "=0.148.0", "@rolldown/pluginutils": "^1.0.0" }, "optionalDependencies": { "@rolldown/binding-android-arm-eabi": "1.2.7", "@rolldown/binding-android-arm64": "1.2.7", "@rolldown/binding-darwin-arm64": "1.2.7", "@rolldown/binding-darwin-x64": "1.2.7", "@rolldown/binding-freebsd-x64": "1.2.7", "@rolldown/binding-linux-arm-gnueabihf": "1.2.7", "@rolldown/binding-linux-arm64-gnu": "1.2.7", "@rolldown/binding-linux-arm64-musl": "1.2.7", "@rolldown/binding-linux-ppc64-gnu": "1.2.7", "@rolldown/binding-linux-s390x-gnu": "1.2.7", "@rolldown/binding-linux-x64-gnu": "1.2.7", "@rolldown/binding-linux-x64-musl": "1.2.7", "@rolldown/binding-openharmony-arm64": "1.2.7", "@rolldown/binding-win32-arm64-msvc": "1.2.7", "@rolldown/binding-win32-x64-msvc": "1.2.7" }, "bin": { "rolldown": "./bin/cli.mjs" } }, "sha512-g0EtLvBjTUB7jhyV0S/TCup3v/XSVl45vUIGbOGU4QPiyjTenCe4mKuFvW9fEgYmS2Fo42AUssRmNuMziXdrig=="],++ "scheduler": ["[email protected]", "", {}, "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q=="],++ "shebang-command": ["[email protected]", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],++ "shebang-regex": ["[email protected]", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],++ "source-map-js": ["[email protected]", "", {}, "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA=="],++ "stats-gl": ["[email protected]", "", { "dependencies": { "@types/three": "*", "three": "^0.170.0" } }, "sha512-g5O9B0hm9CvnM36+v7SFl39T7hmAlv541tU81ME8YeSb3i1CIP5/QdDeSB3A0la0bKNHpxpwxOVRo2wFTYEosQ=="],++ "stats.js": ["[email protected]", "", {}, "sha512-hNKz8phvYLPEcRkeG1rsGmV5ChMjKDAWU7/OJJdDErPBNChQXxCo3WZurGpnWc6gZhAzEPFad1aVgyOANH1sMw=="],++ "suspend-react": ["[email protected]", "", { "peerDependencies": { "react": ">=17.0" } }, "sha512-aqldKgX9aZqpoDp3e8/BZ8Dm7x1pJl+qI3ZKxDN0i/IQTWUwBx/ManmlVJ3wowqbno6c2bmiIfs+Um6LbsjJyQ=="],++ "three": ["[email protected]", "", {}, "sha512-5aojFCXKwnjBRZvUnt3WFfEcvUJgkN5LlijRFN95hMy8WVkG4I0QNcJE+OuWvuJ0bOdStrbfXn0pkd6/QyiAlg=="],++ "three-mesh-bvh": ["[email protected]", "", { "peerDependencies": { "three": ">= 0.159.0" } }, "sha512-4G5lBaF+g2auKX3P0yqx+MJC6oVt6sB5k+CchS6Ob0qvH0YIhuUk1eYr7ktsIpY+albCqE80/FVQGV190PmiAg=="],++ "three-stdlib": ["[email protected]", "", { "dependencies": { "@types/draco3d": "^1.4.0", "@types/offscreencanvas": "^2019.6.4", "@types/webxr": "^0.5.2", "draco3d": "^1.4.1", "fflate": "^0.6.9", "potpack": "^1.0.1" }, "peerDependencies": { "three": ">=0.128.0" } }, "sha512-XyGQrFmNQ5O/IoKm556ftwKsBg11TIb301MB5dWNicziQBEs2g3gtOYIf7pFiLa0zI2gUwhtCjv9fmjnxKZ1Cg=="],++ "tinyglobby": ["[email protected]", "", { "dependencies": { "fdir": "^6.5.0", "picomatch": "^4.0.4" } }, "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g=="],++ "troika-three-text": ["[email protected]", "", { "dependencies": { "bidi-js": "^1.0.2", "troika-three-utils": "^0.52.5", "troika-worker-utils": "^0.52.0", "webgl-sdf-generator": "1.1.1" }, "peerDependencies": { "three": ">=0.125.0" } }, "sha512-Ry3jRhic9pzcY4JduSvRRyDmVOSqEW19gT4vtK+aCiPNVcDlmkxvGG0YbFd36RTDq1wExOupXnvNF/j1oiHHDA=="],++ "troika-three-utils": ["[email protected]", "", { "peerDependencies": { "three": ">=0.125.0" } }, "sha512-WsePbcX8RtfidRfsxK1eCZCjF81ZDzAKHH/evLs0hdV2wpoCb0vArGZHdzdOJrSS3k4zfdtbKDaBh8+phkrYnw=="],++ "troika-worker-utils": ["[email protected]", "", {}, "sha512-W1CpvTHykaPH5brv5VHLfQo9D1OYuo0cSBEUQFFT/nBUzM8iD6Lq2/tgG/f1OelbAS1WtaTPQzE5uM49egnngw=="],++ "tunnel-rat": ["[email protected]", "", { "dependencies": { "zustand": "^4.3.2" } }, "sha512-lR5VHmkPhzdhrM092lI2nACsLO4QubF0/yoOhzX7c+wIpbN1GjHNzCc91QlpxBi+cnx8vVJ+Ur6vL5cEoQPFpQ=="],++ "typescript": ["[email protected]", "", { "optionalDependencies": { "@typescript/typescript-aix-ppc64": "7.0.2", "@typescript/typescript-darwin-arm64": "7.0.2", "@typescript/typescript-darwin-x64": "7.0.2", "@typescript/typescript-freebsd-arm64": "7.0.2", "@typescript/typescript-freebsd-x64": "7.0.2", "@typescript/typescript-linux-arm": "7.0.2", "@typescript/typescript-linux-arm64": "7.0.2", "@typescript/typescript-linux-loong64": "7.0.2", "@typescript/typescript-linux-mips64el": "7.0.2", "@typescript/typescript-linux-ppc64": "7.0.2", "@typescript/typescript-linux-riscv64": "7.0.2", "@typescript/typescript-linux-s390x": "7.0.2", "@typescript/typescript-linux-x64": "7.0.2", "@typescript/typescript-netbsd-arm64": "7.0.2", "@typescript/typescript-netbsd-x64": "7.0.2", "@typescript/typescript-openbsd-arm64": "7.0.2", "@typescript/typescript-openbsd-x64": "7.0.2", "@typescript/typescript-sunos-x64": "7.0.2", "@typescript/typescript-win32-arm64": "7.0.2", "@typescript/typescript-win32-x64": "7.0.2" }, "bin": { "tsc": "bin/tsc" } }, "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA=="],++ "use-sync-external-store": ["[email protected]", "", { "peerDependencies": { "react": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0" } }, "sha512-Pp6GSwGP/NrPIrxVFAIkOQeyw8lFenOHijQWkUTrDvrF4ALqylP2C/KCkeS9dpUM3KvYRQhna5vt7IL95+ZQ9w=="],++ "utility-types": ["[email protected]", "", {}, "sha512-6Z7Ma2aVEWisaL6TvBCy7P8rm2LQoPv6dJ7ecIaIixHcwfbJ0x7mWdbcwlIM5IGQxPZSFYeqRCqlOOeKoJYMkw=="],++ "vite": ["[email protected]", "", { "dependencies": { "lightningcss": "^1.33.0", "picomatch": "^4.0.5", "postcss": "^8.5.26", "rolldown": "~1.2.4", "tinyglobby": "^0.2.17" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "peerDependencies": { "@types/node": "^20.19.0 || >=22.12.0", "@vitejs/devtools": "^0.4.0 || ^0.5.0", "esbuild": "^0.27.0 || ^0.28.0", "jiti": ">=1.21.0", "less": "^4.0.0", "sass": "^1.70.0", "sass-embedded": "^1.70.0", "stylus": ">=0.54.8", "sugarss": "^5.0.0", "terser": "^5.16.0", "tsx": "^4.8.1", "yaml": "^2.4.2" }, "optionalPeers": ["@types/node", "@vitejs/devtools", "esbuild", "jiti", "less", "sass", "sass-embedded", "stylus", "sugarss", "terser", "tsx", "yaml"], "bin": { "vite": "bin/vite.js" } }, "sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q=="],++ "webgl-constants": ["[email protected]", "", {}, "sha512-LkBXKjU5r9vAW7Gcu3T5u+5cvSvh5WwINdr0C+9jpzVB41cjQAP5ePArDtk/WHYdVj0GefCgM73BA7FlIiNtdg=="],++ "webgl-sdf-generator": ["[email protected]", "", {}, "sha512-9Z0JcMTFxeE+b2x1LJTdnaT8rT8aEp7MVxkNwoycNmJWwPdzoXzMh0BjJSh/AEFP+KPYZUli814h8bJZFIZ2jA=="],++ "which": ["[email protected]", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],++ "zustand": ["[email protected]", "", { "peerDependencies": { "@types/react": ">=18.0.0", "immer": ">=9.0.6", "react": ">=18.0.0", "use-sync-external-store": ">=1.2.0" }, "optionalPeers": ["@types/react", "immer", "react", "use-sync-external-store"] }, "sha512-MpSEjRiBkA9crSYeOUH32rJC7SVqAbm0Fqcqge/bUi2PPoLcBWKOsG+C8mevmpr8TwXHBVkChbbJiyvkE+i/3A=="],++ "stats-gl/three": ["[email protected]", "", {}, "sha512-FQK+LEpYc0fBD+J8g6oSEyyNzjp+Q7Ks1C568WWaoMRLW+TkNNWmenWeGgJjV105Gd+p/2ql1ZcjYvNiPZBhuQ=="],++ "three-stdlib/fflate": ["[email protected]", "", {}, "sha512-3JyEFWGjFn7zHmoa9+zG1BmW7X2okcmAB+0Cnu9UFbVs/jCBnl2A8o065ZlXiw145K3eBM3uLuzrYXC0RK7eDg=="],++ "tunnel-rat/zustand": ["[email protected]", "", { "dependencies": { "use-sync-external-store": "^1.2.2" }, "peerDependencies": { "@types/react": ">=16.8", "immer": ">=9.0.6", "react": ">=16.8" }, "optionalPeers": ["@types/react", "immer", "react"] }, "sha512-CHOUy7mu3lbD6o6LJLfllpjkzhHXSBlX8B9+qPddUsIfeF5S/UZ5q0kmCsnRqT1UHFQZchNFDDzMbQsuesHWlw=="],+ }+}diff --git a/site/index.html b/site/index.htmlnew file mode 100644index 00000000..b8544117--- /dev/null+++ b/site/index.html@@ -0,0 +1,30 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="utf-8" />+ <meta name="viewport" content="width=device-width, initial-scale=1" />+ <title>Kiln Specimen Gallery</title>+ <meta+ name="description"+ content="Fifty 3D assets, each one a JavaScript program written by a language model. Every mesh here is built live in the browser from the program that made it."+ />+ <meta name="color-scheme" content="dark" />+ <link rel="icon" href="./favicon.svg" type="image/svg+xml" />+ <meta property="og:title" content="Kiln Specimen Gallery" />+ <meta+ property="og:description"+ content="Fifty 3D assets, each one a JavaScript program written by a language model."+ />+ <meta property="og:type" content="website" />+ <link rel="preconnect" href="https://fonts.googleapis.com" />+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />+ <link+ rel="stylesheet"+ href="https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap"+ />+ </head>+ <body>+ <div id="root"></div>+ <script type="module" src="/src/main.tsx"></script>+ </body>+</html>diff --git a/site/package.json b/site/package.jsonnew file mode 100644index 00000000..4ea8af07--- /dev/null+++ b/site/package.json@@ -0,0 +1,27 @@+{+ "name": "kiln-site",+ "private": true,+ "type": "module",+ "description": "The Kiln gallery: every checked-in program, built and shown as the GLB it produces.",+ "scripts": {+ "assets": "bun scripts/build-assets.mjs",+ "dev": "vite",+ "build": "vite build",+ "preview": "vite preview"+ },+ "dependencies": {+ "@react-three/drei": "^10.7.8",+ "@react-three/fiber": "^9.7.0",+ "react": "^19.2.8",+ "react-dom": "^19.2.8",+ "three": "0.185.1"+ },+ "devDependencies": {+ "@types/react": "^19.2.18",+ "@types/react-dom": "^19.2.7",+ "@types/three": "^0.185.4",+ "@vitejs/plugin-react": "^6.1.1",+ "typescript": "^7.0.2",+ "vite": "^8.2.2"+ }+}diff --git a/site/public/favicon.svg b/site/public/favicon.svgnew file mode 100644index 00000000..4b6bd6c4--- /dev/null+++ b/site/public/favicon.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">+ <rect width="32" height="32" rx="5" fill="#13110f"/>+ <path d="M16 5 27 11v10L16 27 5 21V11z" fill="none" stroke="#e8823c" stroke-width="2" stroke-linejoin="round"/>+ <path d="M16 5v22M5 11l11 6 11-6" fill="none" stroke="#e8823c" stroke-width="1.4" stroke-linejoin="round" opacity="0.55"/>+</svg>diff --git a/site/scripts/build-assets.mjs b/site/scripts/build-assets.mjsnew file mode 100644index 00000000..bd3dea36--- /dev/null+++ b/site/scripts/build-assets.mjs@@ -0,0 +1,111 @@+// Build the gallery's payload by running every checked-in program.+//+// The site does not ship a folder of GLBs somebody exported once. It runs+// `examples/*.kiln.js` through the same evaluator the test suite uses and keeps+// what comes out, so a program and the thing the page shows cannot drift apart:+// change the program, rebuild, and the model on the page is the new one. It is+// the same argument the README makes about the renders, applied to geometry.+//+// bun scripts/build-assets.mjs # from site/+//+// Everything on the card -- triangles, bounds, draw calls, material and texture+// counts -- is read off the engine's own integration manifest rather than+// counted again here, because a second implementation of a number is a second+// chance to disagree with the first.+import { mkdir, readFile, readdir, rm, writeFile } from 'node:fs/promises';+import { basename, dirname, join, resolve } from 'node:path';+import { fileURLToPath } from 'node:url';++import sharp from 'sharp';++import { readAuthorship, readCategory } from '../../scripts/authorship';+import { resolveEvaluatorPortV1 } from '../../src/evaluator/protocol';++const SITE = resolve(dirname(fileURLToPath(import.meta.url)), '..');+const REPO = resolve(SITE, '..');+const EXAMPLES = join(REPO, 'examples');+const RENDERS = join(EXAMPLES, 'renders');+const OUT = join(SITE, 'public', 'assets');+const THUMBS = join(SITE, 'public', 'thumbs');++// The two teaching examples are deliberately plain -- they exist to be read, not+// looked at -- and putting them in a gallery misrepresents both them and it.+const TEACHING = new Set(['crate', 'well']);++/** The one-line caption the README gives each asset, so both read alike. */+function captions(readme) {+ const out = new Map();+ const cell =+ /<a href="examples\/renders\/([a-z0-9-]+)\.png">.*?<br><sub>([^<]*)<\/sub>/gs;+ for (const m of readme.matchAll(cell)) if (!out.has(m[1])) out.set(m[1], m[2].trim());+ return out;+}++const readme = await readFile(join(REPO, 'README.md'), 'utf8');+const caption = captions(readme);++const names = (await readdir(EXAMPLES))+ .filter((f) => f.endsWith('.kiln.js'))+ .map((f) => basename(f, '.kiln.js'))+ .filter((n) => !TEACHING.has(n))+ .sort();++await rm(OUT, { recursive: true, force: true });+await rm(THUMBS, { recursive: true, force: true });+await mkdir(OUT, { recursive: true });+await mkdir(THUMBS, { recursive: true });++const evaluator = resolveEvaluatorPortV1(undefined, 'trusted-local');+const manifest = [];+let bytes = 0;++for (const name of names) {+ const src = await readFile(join(EXAMPLES, `${name}.kiln.js`), 'utf8');+ const author = readAuthorship(src);+ const r = await evaluator.render(src);+ await writeFile(join(OUT, `${name}.glb`), r.glb);+ bytes += r.glb.byteLength;++ const im = r.integrationManifest;+ manifest.push({+ name,+ file: `assets/${name}.glb`,+ thumb: `thumbs/${name}.webp`,+ bytes: r.glb.byteLength,+ // The category the program declares, not the one on the render result: that+ // field carries whatever the request asked for, and nothing asked here.+ category: readCategory(src),+ caption: caption.get(name) ?? '',+ model: author.display ?? author.model,+ harness: author.harness,+ cleanRoom: author.cleanRoom,+ tris: im.renderMetrics.triangles,+ drawCalls: im.renderMetrics.drawCalls,+ materials: im.renderMetrics.uniqueMaterials,+ textures: im.renderMetrics.textureCount,+ size: im.bounds.size.map((v) => Number(v.toFixed(2))),+ grounded: im.ground.grounded,+ // Loud rather than quiet: a program that starts warning is one the gallery+ // should stop flattering, and the number is on the card.+ warnings: r.warnings.length,+ });++ // The index shows the checked-in hero render and the stage shows the live+ // GLB, so the grid stays cheap: fifty 1000px PNGs is 3.6 MB of first paint,+ // and the same fifty at 560px of webp is a fifth of that.+ await sharp(join(RENDERS, `${name}.png`))+ .resize(560, 560, { fit: 'inside' })+ .webp({ quality: 82 })+ .toFile(join(THUMBS, `${name}.webp`));++ const w = r.warnings.length ? ` ${r.warnings.length} warnings` : '';+ console.log(` ${name.padEnd(24)} ${String(im.renderMetrics.triangles).padStart(7)} tris${w}`);+}++await writeFile(join(OUT, 'index.json'), `${JSON.stringify(manifest, null, 2)}\n`);++const total = manifest.reduce((a, m) => a + m.tris, 0);+console.log(+ `\n${manifest.length} assets, ${total.toLocaleString('en-US')} triangles, ` ++ `${(bytes / 1024 / 1024).toFixed(1)} MB of GLB`,+);diff --git a/site/src/App.tsx b/site/src/App.tsxnew file mode 100644index 00000000..c55b832f--- /dev/null+++ b/site/src/App.tsx@@ -0,0 +1,72 @@+import { Suspense, lazy, useEffect, useState } from 'react';++import { Gallery } from './Gallery';+import type { Specimen } from './types';++/**+ * Split, because three and drei are a megabyte and the gallery does not need a+ * byte of either. The landing page is a grid of fifty webp thumbnails and should+ * paint like one; the renderer arrives when somebody actually asks for a mesh.+ */+const Viewer = lazy(() => import('./Viewer').then((m) => ({ default: m.Viewer })));++export const REPO = 'https://github.com/matthew-kissinger/kiln';++/**+ * Relative to the document, not to the origin. The build sets a relative base so+ * one artifact serves correctly both from a custom domain at the root and from a+ * project page under a path, and the fetches have to follow the same rule or the+ * second case quietly 404s every GLB.+ */+export const asset = (path: string) => new URL(path, document.baseURI).href;++/** Outside the component, so the listener effect has nothing to depend on. */+const readRoute = () => decodeURIComponent(location.hash.replace(/^#\/?/, ''));++/**+ * Hash routing, because this deploys to static hosting with no server to rewrite+ * paths, and a deep link that 404s on refresh is worse than an ugly URL.+ */+function useRoute() {+ const [route, setRoute] = useState(readRoute);+ useEffect(() => {+ const on = () => setRoute(readRoute());+ addEventListener('hashchange', on);+ return () => removeEventListener('hashchange', on);+ }, []);+ return route;+}++export function App() {+ const [specimens, setSpecimens] = useState<Specimen[] | null>(null);+ const [failed, setFailed] = useState(false);+ const route = useRoute();++ useEffect(() => {+ fetch(asset('assets/index.json'))+ .then((r) => (r.ok ? r.json() : Promise.reject(new Error(String(r.status)))))+ .then(setSpecimens)+ .catch(() => setFailed(true));+ }, []);++ // The whole page is driven by one fetch, so it is worth saying what happened+ // rather than leaving an empty grid that looks like a design decision.+ if (failed) {+ return (+ <div className="loading" style={{ position: 'static', height: '100%' }}>+ the gallery index did not load+ </div>+ );+ }+ if (!specimens) return null;++ const current = specimens.find((s) => s.name === route);+ if (current) {+ return (+ <Suspense fallback={<div className="loading">loading the renderer</div>}>+ <Viewer all={specimens} current={current} />+ </Suspense>+ );+ }+ return <Gallery specimens={specimens} />;+}diff --git a/site/src/Gallery.tsx b/site/src/Gallery.tsxnew file mode 100644index 00000000..51969a45--- /dev/null+++ b/site/src/Gallery.tsx@@ -0,0 +1,174 @@+import { useMemo, useState } from 'react';++import { REPO, asset } from './App';+import type { Specimen } from './types';++const num = (n: number) => n.toLocaleString('en-US');++const title = (name: string) =>+ name+ .split('-')+ .map((w) => w[0]!.toUpperCase() + w.slice(1))+ .join(' ');++/** Facet values in descending frequency, which is also the order worth reading. */+function tally(rows: Specimen[], key: 'category' | 'harness') {+ const counts = new Map<string, number>();+ for (const r of rows) counts.set(r[key], (counts.get(r[key]) ?? 0) + 1);+ return [...counts].sort((a, b) => b[1] - a[1]);+}++function Facet({+ label,+ options,+ value,+ onChange,+}: {+ label: string;+ options: [string, number][];+ value: string | null;+ onChange: (v: string | null) => void;+}) {+ return (+ <div className="facet">+ <small>{label}</small>+ <button+ type="button"+ className="chip"+ aria-pressed={value === null}+ onClick={() => onChange(null)}+ >+ all+ </button>+ {options.map(([opt, n]) => (+ <button+ key={opt}+ type="button"+ className="chip"+ aria-pressed={value === opt}+ onClick={() => onChange(value === opt ? null : opt)}+ >+ {opt} <em>{n}</em>+ </button>+ ))}+ </div>+ );+}++export function Gallery({ specimens }: { specimens: Specimen[] }) {+ const [category, setCategory] = useState<string | null>(null);+ const [harness, setHarness] = useState<string | null>(null);+ const [cleanRoom, setCleanRoom] = useState(false);+ const [heaviest, setHeaviest] = useState(false);++ const categories = useMemo(() => tally(specimens, 'category'), [specimens]);+ const harnesses = useMemo(() => tally(specimens, 'harness'), [specimens]);+ const models = useMemo(() => new Set(specimens.map((s) => s.model)).size, [specimens]);+ const triangles = useMemo(() => specimens.reduce((a, s) => a + s.tris, 0), [specimens]);+ const cleanRoomCount = useMemo(() => specimens.filter((s) => s.cleanRoom).length, [specimens]);++ const shown = useMemo(() => {+ const rows = specimens.filter(+ (s) =>+ (category === null || s.category === category) &&+ (harness === null || s.harness === harness) &&+ (!cleanRoom || s.cleanRoom),+ );+ return heaviest ? [...rows].sort((a, b) => b.tris - a.tris) : rows;+ }, [specimens, category, harness, cleanRoom, heaviest]);++ return (+ <>+ <header className="masthead">+ <h1 className="wordmark">+ Kiln <span>specimen gallery</span>+ </h1>+ <p>+ Every object here is a JavaScript program that a language model wrote, and the mesh you+ orbit is built from that program in your browser rather than exported from it. Nothing was+ sculpted by hand and nothing came out of an asset library. The engine, the tools the+ models used and all fifty programs are <a href={REPO}>on GitHub</a>.+ </p>+ <div className="tally">+ <div>+ <b>{specimens.length}</b>+ <small>specimens</small>+ </div>+ <div>+ <b>{num(triangles)}</b>+ <small>triangles</small>+ </div>+ <div>+ <b>{models}</b>+ <small>models</small>+ </div>+ <div>+ <b>{harnesses.length}</b>+ <small>harnesses</small>+ </div>+ </div>+ </header>++ <nav className="filters" aria-label="Filter the gallery">+ <Facet label="Category" options={categories} value={category} onChange={setCategory} />+ <Facet label="Written in" options={harnesses} value={harness} onChange={setHarness} />+ <div className="facet">+ {/* The strongest claim any of these programs makes, so it gets its own+ control: the model had a brief and the Kiln skills, and nothing+ else -- no repository to read, no finished example to copy. */}+ <button+ type="button"+ className="chip"+ aria-pressed={cleanRoom}+ onClick={() => setCleanRoom(!cleanRoom)}+ title="Written in a directory holding only a brief and the Kiln skills"+ >+ clean room <em>{cleanRoomCount}</em>+ </button>+ <button+ type="button"+ className="chip"+ aria-pressed={heaviest}+ onClick={() => setHeaviest(!heaviest)}+ >+ heaviest first+ </button>+ </div>+ <span className="count">+ {shown.length === specimens.length+ ? `${specimens.length} shown`+ : `${shown.length} of ${specimens.length}`}+ </span>+ </nav>++ <div className="grid">+ {shown.map((s) => (+ <a className="card" key={s.name} href={`#/${s.name}`}>+ <div className="shot">+ <img src={asset(s.thumb)} alt={s.caption || title(s.name)} loading="lazy" />+ <b>{num(s.tris)}</b>+ </div>+ <div className="meta">+ <h3>{title(s.name)}</h3>+ <p>{s.caption}</p>+ <div className="by">+ <i>{s.model}</i> · {s.harness}+ </div>+ </div>+ </a>+ ))}+ </div>++ <footer className="foot">+ <span>+ Built by running <code>examples/*.kiln.js</code> through the engine at deploy time, so a+ program and the model on this page cannot disagree.+ </span>+ <a href={REPO}>Repository</a>+ <a href={`${REPO}/tree/main/examples`}>The programs</a>+ <a href={`${REPO}/blob/main/docs/install.md`}>Install the plugin</a>+ <a href={`${REPO}/blob/main/LICENSE`}>MIT</a>+ </footer>+ </>+ );+}diff --git a/site/src/Viewer.tsx b/site/src/Viewer.tsxnew file mode 100644index 00000000..9c2503c3--- /dev/null+++ b/site/src/Viewer.tsx@@ -0,0 +1,497 @@+import { Canvas, useThree } from '@react-three/fiber';+import { ContactShadows, Grid, OrbitControls, useGLTF, useProgress } from '@react-three/drei';+import { Suspense, useEffect, useMemo, useState } from 'react';+import * as THREE from 'three';+import { RoomEnvironment } from 'three/examples/jsm/environments/RoomEnvironment.js';++import { REPO, asset } from './App';+import type { Specimen } from './types';++const num = (n: number) => n.toLocaleString('en-US');++const title = (name: string) =>+ name+ .split('-')+ .map((w) => w[0]!.toUpperCase() + w.slice(1))+ .join(' ');++interface OrbitLike {+ target: THREE.Vector3;+ minDistance: number;+ maxDistance: number;+ update: () => void;+}++const UP = new THREE.Vector3(0, 1, 0);++/** A three-quarter view from a little above, which suits all fifty of them. */+const ELEVATION = 0.315; // radians, about 18 degrees+const AZIMUTH = 0.733; // radians, about 42 degrees++const orbitDirection = (azimuth: number) =>+ new THREE.Vector3(+ Math.cos(azimuth) * Math.cos(ELEVATION),+ Math.sin(ELEVATION),+ Math.sin(azimuth) * Math.cos(ELEVATION),+ );++/**+ * Points on the actual surface, in world space, thinned to a fixed budget.+ *+ * The camera has to be placed from the silhouette, and the bounding box is a bad+ * proxy for it: the airship is a slender ellipsoid, so six of its box's eight+ * corners are empty air, and framing to them pushed the camera back far enough+ * that the asset sat in the middle of a lot of nothing. Vertices are what is+ * actually on screen.+ *+ * A stride rather than every vertex, because the fit runs over a full turntable+ * and the answer does not improve past a few thousand samples. Instanced meshes+ * fall back to their bounds -- their per-instance transforms are not in the+ * position attribute -- though nothing the engine emits today is instanced.+ */+function surfacePoints(root: THREE.Object3D, budget = 4000): THREE.Vector3[] {+ root.updateWorldMatrix(true, true);+ const meshes: THREE.Mesh[] = [];+ root.traverse((o) => {+ if ((o as THREE.Mesh).isMesh) meshes.push(o as THREE.Mesh);+ });++ let total = 0;+ for (const m of meshes) total += m.geometry.getAttribute('position')?.count ?? 0;+ const stride = Math.max(1, Math.ceil(total / budget));++ const points: THREE.Vector3[] = [];+ const v = new THREE.Vector3();+ for (const mesh of meshes) {+ if ((mesh as THREE.InstancedMesh).isInstancedMesh) {+ const box = new THREE.Box3().setFromObject(mesh);+ for (const x of [box.min.x, box.max.x])+ for (const y of [box.min.y, box.max.y])+ for (const z of [box.min.z, box.max.z]) points.push(new THREE.Vector3(x, y, z));+ continue;+ }+ const pos = mesh.geometry.getAttribute('position');+ if (!pos) continue;+ for (let i = 0; i < pos.count; i += stride) {+ points.push(v.fromBufferAttribute(pos, i).applyMatrix4(mesh.matrixWorld).clone());+ }+ }+ return points;+}++const AZIMUTH_SAMPLES = 16;++/**+ * Every sampled point resolved into camera axes, once per azimuth on the+ * turntable.+ *+ * The whole turntable and not just the opening angle, because the view rotates:+ * framing for the angle it happens to start at walks the tail of a fifty-metre+ * airship off the edge four seconds later. Flat typed arrays because the search+ * below sweeps these tens of times and allocating a vector per point per pass+ * turns ten milliseconds into a second.+ */+function project(points: readonly THREE.Vector3[], origin: THREE.Vector3) {+ const n = points.length;+ const depth = new Float64Array(AZIMUTH_SAMPLES * n);+ const across = new Float64Array(AZIMUTH_SAMPLES * n);+ const above = new Float64Array(AZIMUTH_SAMPLES * n);+ const p = new THREE.Vector3();++ for (let a = 0; a < AZIMUTH_SAMPLES; a++) {+ const forward = orbitDirection((a / AZIMUTH_SAMPLES) * Math.PI * 2);+ const right = new THREE.Vector3().crossVectors(UP, forward).normalize();+ const up = new THREE.Vector3().crossVectors(forward, right);+ for (let i = 0; i < n; i++) {+ p.copy(points[i]!).sub(origin);+ const at = a * n + i;+ depth[at] = p.dot(forward);+ across[at] = p.dot(right);+ above[at] = p.dot(up);+ }+ }+ return { n, depth, across, above };+}++type Projection = ReturnType<typeof project>;++/**+ * How far back the camera has to sit for everything to stay in frame, with the+ * orbit target raised by `lift` from where the projection was taken.+ *+ * A point is on screen when |across| <= (distance - depth) * tanH, and likewise+ * vertically, so each point names a distance and the largest one wins. Raising+ * the target moves each point down by `lift` in world space, which is a shift of+ * `lift * cos(elevation)` in the camera's vertical axis and `lift *+ * sin(elevation)` in depth; nothing moves horizontally, because the horizontal+ * axis of an orbiting camera is always level.+ */+function distanceFor(proj: Projection, lift: number, tanH: number, tanV: number) {+ const dz = lift * Math.sin(ELEVATION);+ const dy = lift * Math.cos(ELEVATION);+ let needed = 0;+ for (let i = 0; i < proj.depth.length; i++) {+ const depth = proj.depth[i]! - dz;+ const h = depth + Math.abs(proj.across[i]!) / tanH;+ const v = depth + Math.abs(proj.above[i]! - dy) / tanV;+ if (h > needed) needed = h;+ if (v > needed) needed = v;+ }+ return needed;+}++/**+ * Where to point the camera and how far back to put it.+ *+ * Aiming at the centre of the bounding box is the obvious choice and it wastes a+ * lot of screen. The camera looks down from eighteen degrees, so the near-bottom+ * of a wide asset projects much further below the centre than its far-top+ * projects above: the cathedral came out sitting low in a frame padded to fit the+ * corner of its own base slab, at about forty per cent of the width it could+ * have had. Raising the aim point re-centres the silhouette and the padding goes+ * away with it.+ *+ * The distance needed is convex in that height, so a ternary search finds the+ * best one in a few dozen evaluations of arithmetic over flat arrays.+ */+function frameAsset(+ points: readonly THREE.Vector3[],+ center: THREE.Vector3,+ extent: number,+ fov: number,+ aspect: number,+) {+ const tanV = Math.tan((fov * Math.PI) / 360);+ const tanH = tanV * aspect;+ const proj = project(points, center);++ let low = -extent;+ let high = extent;+ for (let i = 0; i < 22; i++) {+ const a = low + (high - low) / 3;+ const b = high - (high - low) / 3;+ if (distanceFor(proj, a, tanH, tanV) < distanceFor(proj, b, tanH, tanV)) high = b;+ else low = a;+ }+ const lift = (low + high) / 2;+ return {+ target: new THREE.Vector3(center.x, center.y + lift, center.z),+ distance: distanceFor(proj, lift, tanH, tanV),+ };+}++/**+ * Image-based lighting from three's own room scene, rather than an HDR fetched+ * from a CDN. Half of these assets are painted metal and every one of them is+ * lit only by what the environment gives it, so a scene with no environment map+ * shows brushed steel as flat grey and makes the engine look worse than it is.+ * Generating the map in the browser costs a few milliseconds once and nothing+ * after that, and it removes a network dependency from the one thing on the page+ * that has to work.+ */+function Ibl() {+ const gl = useThree((s) => s.gl);+ const scene = useThree((s) => s.scene);+ useEffect(() => {+ const pmrem = new THREE.PMREMGenerator(gl);+ const room = new RoomEnvironment();+ const target = pmrem.fromScene(room, 0.04);+ scene.environment = target.texture;+ scene.environmentIntensity = 0.62;+ return () => {+ scene.environment = null;+ target.dispose();+ room.dispose();+ pmrem.dispose();+ };+ }, [gl, scene]);+ return null;+}++function Model({+ url,+ wireframe,+ framing,+ onBounds,+}: {+ url: string;+ wireframe: boolean;+ framing: number;+ onBounds: (radius: number) => void;+}) {+ const { scene } = useGLTF(url);+ const camera = useThree((s) => s.camera) as THREE.PerspectiveCamera;+ const controls = useThree((s) => s.controls) as OrbitLike | null;+ // The canvas size and not `camera.aspect`, which is still 1 on the frame this+ // first runs, so a wide viewport got framed as though it were square. Reading+ // it here also means turning a phone on its side re-frames instead of cropping.+ const { width, height } = useThree((s) => s.size);++ // Sampled once per asset, not once per reframe: a reset or a resize should not+ // walk every vertex again.+ const points = useMemo(() => surfacePoints(scene), [scene]);++ /**+ * `frustumCulled` off across the board. Several of these programs place parts+ * a long way from the origin -- the airship's mooring mast, the carrier's+ * island -- and three culls against a bounding sphere it computes per mesh, so+ * a part whose geometry was built with a large offset baked into its vertices+ * can blink out at certain angles. Fifty draw calls more is nothing here; a+ * disappearing funnel is not.+ */+ useEffect(() => {+ scene.traverse((o) => {+ o.frustumCulled = false;+ });+ }, [scene]);++ // Frame on load, on every explicit reset, and on resize. The engine's contract+ // puts an asset on Y=0 facing +X, so the camera can be placed from the geometry+ // alone and land on a three-quarter view every time with no per-asset hint.+ //+ // `framing` is not read in the body and is not meant to be: it is a counter+ // the reset button increments, and being in the dependency list is its whole+ // job.+ // biome-ignore lint/correctness/useExhaustiveDependencies: framing is a trigger, not an input.+ useEffect(() => {+ if (!controls) return;+ const box = new THREE.Box3().setFromObject(scene);+ const size = box.getSize(new THREE.Vector3());+ const center = box.getCenter(new THREE.Vector3());+ const radius = Math.max(size.length() / 2, 0.001);+ const framed = frameAsset(points, center, size.y, camera.fov, width / height);+ // A little over the exact fit, so nothing ever kisses the edge of the frame.+ const distance = Math.max(framed.distance, 0.01) * 1.04;++ camera.position.copy(framed.target).addScaledVector(orbitDirection(AZIMUTH), distance);+ camera.near = Math.max(distance / 800, 0.005);+ camera.far = distance * 16;+ camera.updateProjectionMatrix();+ controls.target.copy(framed.target);+ // Before `update()`, and imperatively rather than as props on the control:+ // the limits are a function of the bounds, the bounds are only known here,+ // and `update()` clamps to whatever the limits currently say. Passing them+ // as props meant the first frame of every asset was clamped against the+ // previous one's radius -- which framed the airship at 48 metres instead of+ // 109 and cut its mooring mast off the side of the screen.+ controls.minDistance = radius * 0.3;+ controls.maxDistance = radius * 14;+ controls.update();+ onBounds(radius);+ }, [scene, points, camera, controls, framing, onBounds, width, height]);++ useEffect(() => {+ const touched: THREE.Material[] = [];+ scene.traverse((o) => {+ const mesh = o as THREE.Mesh;+ if (!mesh.isMesh) return;+ for (const m of Array.isArray(mesh.material) ? mesh.material : [mesh.material]) {+ const mat = m as THREE.MeshStandardMaterial;+ mat.wireframe = wireframe;+ touched.push(mat);+ }+ });+ // Restored on the way out because drei caches the loaded scene by URL, and a+ // material left in wireframe would come back that way on the next visit.+ return () => {+ for (const m of touched) (m as THREE.MeshStandardMaterial).wireframe = false;+ };+ }, [scene, wireframe]);++ return <primitive object={scene} />;+}++function Loading() {+ const { active, progress } = useProgress();+ if (!active) return null;+ return (+ <div className="loading">+ <div>+ <i style={{ width: `${Math.max(progress, 4)}%` }} />+ </div>+ building the mesh+ </div>+ );+}++export function Viewer({ all, current }: { all: Specimen[]; current: Specimen }) {+ const { name } = current;+ const [wireframe, setWireframe] = useState(false);+ const [grid, setGrid] = useState(true);+ const [spin, setSpin] = useState(true);+ const [framing, setFraming] = useState(0);+ const [radius, setRadius] = useState(4);++ const index = all.findIndex((s) => s.name === name);+ const step = useMemo(+ () => (delta: number) => {+ const next = all[(index + delta + all.length) % all.length]!;+ location.hash = `#/${next.name}`;+ },+ [all, index],+ );++ // Arrow keys walk the gallery and Escape goes back to it, because anyone who+ // opens fifty of these in a row will try both within about a minute.+ useEffect(() => {+ const onKey = (e: KeyboardEvent) => {+ if (e.metaKey || e.ctrlKey || e.altKey) return;+ if (e.key === 'ArrowRight') step(1);+ else if (e.key === 'ArrowLeft') step(-1);+ else if (e.key === 'Escape') location.hash = '#/';+ else if (e.key.toLowerCase() === 'w') setWireframe((v) => !v);+ else if (e.key.toLowerCase() === 'g') setGrid((v) => !v);+ else return;+ e.preventDefault();+ };+ addEventListener('keydown', onKey);+ return () => removeEventListener('keydown', onKey);+ }, [step]);++ // A new specimen starts framed and spinning again, whatever was left set on+ // the last one. Wireframe and the grid deliberately carry over: someone+ // stepping through the gallery in wireframe meant to be in wireframe.+ //+ // biome-ignore lint/correctness/useExhaustiveDependencies: name is a trigger, not an input.+ useEffect(() => {+ setFraming((n) => n + 1);+ setSpin(true);+ }, [name]);++ const [x, y, z] = current.size;++ return (+ <div className="viewer">+ <div className="bar">+ <a className="back" href="#/">+ ← gallery+ </a>+ <div className="sep" />+ <h2>{title(current.name)}</h2>+ <div className="step">+ <button type="button" onClick={() => step(-1)} aria-label="Previous specimen">+ ←+ </button>+ <button type="button" onClick={() => step(1)} aria-label="Next specimen">+ →+ </button>+ </div>+ <div className="controls">+ <button+ type="button"+ className="chip"+ aria-pressed={wireframe}+ onClick={() => setWireframe(!wireframe)}+ >+ wireframe+ </button>+ <button type="button" className="chip" aria-pressed={grid} onClick={() => setGrid(!grid)}>+ grid+ </button>+ <button type="button" className="chip" aria-pressed={spin} onClick={() => setSpin(!spin)}>+ spin+ </button>+ <button type="button" className="chip" onClick={() => setFraming((n) => n + 1)}>+ reset view+ </button>+ <a className="chip" href={`${REPO}/blob/main/examples/${current.name}.kiln.js`}>+ program+ </a>+ <a className="chip" href={asset(current.file)} download={`${current.name}.glb`}>+ glb+ </a>+ </div>+ </div>++ <div className="stage">+ <Canvas+ dpr={[1, 2]}+ // Transparent, so the well behind it keeps its gradient: a flat clear+ // colour under a lit model reads as a cut-out, and the falloff is what+ // makes the stage look like a room.+ gl={{ antialias: true, alpha: true, toneMapping: THREE.ACESFilmicToneMapping }}+ camera={{ fov: 34, position: [6, 3, 5] }}+ >+ <Ibl />+ {/* A key with a real direction on top of the room light, so edges and+ bevels read. Everything else about the surface comes from the+ material the program declared. */}+ <directionalLight position={[radius * 2, radius * 2.6, radius * 1.4]} intensity={2.1} />+ <directionalLight position={[-radius * 1.8, radius, -radius * 1.6]} intensity={0.5} />+ <hemisphereLight args={['#cfd8dd', '#2a221c', 0.35]} />++ <OrbitControls+ makeDefault+ autoRotate={spin}+ autoRotateSpeed={0.55}+ enableDamping+ dampingFactor={0.06}+ />++ <Suspense fallback={null}>+ <Model+ key={current.name}+ url={asset(current.file)}+ wireframe={wireframe}+ framing={framing}+ onBounds={setRadius}+ />+ </Suspense>++ <ContactShadows+ position={[0, 0.001, 0]}+ scale={radius * 4}+ far={radius * 1.5}+ opacity={0.55}+ blur={2.4}+ resolution={1024}+ color="#000000"+ />+ {grid && (+ <Grid+ args={[radius * 10, radius * 10]}+ cellSize={radius / 5}+ cellColor="#2b2620"+ sectionSize={radius}+ sectionColor="#453b31"+ fadeDistance={radius * 9}+ fadeStrength={1.4}+ infiniteGrid+ followCamera={false}+ />+ )}+ </Canvas>++ <Loading />++ {/* One anchored group rather than two independently positioned panels:+ side by side on a wide screen, stacked on a phone, and neither one+ has to know how tall the other is. */}+ <div className="panels">+ <dl className="readout">+ <dt>triangles</dt>+ <dd>{num(current.tris)}</dd>+ <dt>draw calls</dt>+ <dd>{num(current.drawCalls)}</dd>+ <dt>materials</dt>+ <dd>{num(current.materials)}</dd>+ <dt>size</dt>+ <dd>+ {x} × {y} × {z} m+ </dd>+ <dt>glb</dt>+ <dd>{(current.bytes / 1024).toFixed(0)} KB</dd>+ </dl>++ <p className="caption">+ {current.caption}+ <b>+ written by <i>{current.model}</i> through {current.harness}+ {current.cleanRoom ? ', in a clean room' : ''}+ </b>+ </p>+ </div>+ </div>+ </div>+ );+}diff --git a/site/src/main.tsx b/site/src/main.tsxnew file mode 100644index 00000000..9aab2103--- /dev/null+++ b/site/src/main.tsx@@ -0,0 +1,11 @@+import { StrictMode } from 'react';+import { createRoot } from 'react-dom/client';++import { App } from './App';+import './styles.css';++createRoot(document.getElementById('root')!).render(+ <StrictMode>+ <App />+ </StrictMode>,+);diff --git a/site/src/styles.css b/site/src/styles.cssnew file mode 100644index 00000000..11cb4299--- /dev/null+++ b/site/src/styles.css@@ -0,0 +1,615 @@+/*+ * One visual world, deliberately.+ *+ * Every tool that shows a mesh -- Blender, Houdini, Unreal, Substance -- is dark,+ * because a dark surround is what lets you read a lit surface. So this commits to+ * a dark page rather than following the host theme, and paints every colour+ * explicitly so it holds on any ground.+ *+ * The two accents have separate jobs and never do each other's. Flame is the+ * kiln, and marks state: what is selected, what is on. Wire is the colour every+ * 3D tool draws edges in, and appears only where edges are being drawn.+ */+:root {+ --ground: #13110f;+ --stage: #0b0a09;+ --panel: #1a1714;+ --rule: #322c25;+ --ink: #f0eae1;+ --dim: #9c9187;+ --faint: #6b625a;+ --flame: #e8823c;+ --wire: #6fd3e4;++ --ui: "Archivo", ui-sans-serif, system-ui, "Segoe UI", sans-serif;+ --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", "Consolas", monospace;++ color-scheme: dark;+}++* {+ box-sizing: border-box;+}++html,+body,+#root {+ height: 100%;+}++body {+ margin: 0;+ background: var(--ground);+ color: var(--ink);+ font-family: var(--ui);+ font-size: 15px;+ line-height: 1.55;+ -webkit-font-smoothing: antialiased;+}++a {+ color: inherit;+}++button {+ font: inherit;+ color: inherit;+ background: none;+ border: 0;+ cursor: pointer;+}++:focus-visible {+ outline: 2px solid var(--flame);+ outline-offset: 2px;+}++/* ---------------------------------------------------------------- masthead */++.masthead {+ display: flex;+ flex-wrap: wrap;+ align-items: flex-end;+ gap: 28px 40px;+ padding: 34px 32px 26px;+ border-bottom: 1px solid var(--rule);+}++.wordmark {+ display: flex;+ align-items: baseline;+ gap: 12px;+ margin: 0;+ font-size: 30px;+ font-weight: 700;+ letter-spacing: -0.035em;+ line-height: 1;+}++.wordmark span {+ font-family: var(--mono);+ font-size: 11px;+ font-weight: 400;+ letter-spacing: 0.16em;+ text-transform: uppercase;+ color: var(--faint);+}++.masthead p {+ flex: 1 1 30ch;+ max-width: 62ch;+ margin: 0;+ color: var(--dim);+ text-wrap: pretty;+}++.masthead p a {+ color: var(--ink);+ text-decoration-color: var(--rule);+ text-underline-offset: 3px;+}++.masthead p a:hover {+ text-decoration-color: var(--flame);+}++.tally {+ display: flex;+ gap: 26px;+ margin-left: auto;+}++.tally div {+ display: flex;+ flex-direction: column;+ gap: 2px;+}++.tally b {+ font-family: var(--mono);+ font-size: 19px;+ font-weight: 500;+ font-variant-numeric: tabular-nums;+ line-height: 1;+}++.tally small {+ font-family: var(--mono);+ font-size: 10px;+ letter-spacing: 0.13em;+ text-transform: uppercase;+ color: var(--faint);+}++/* ----------------------------------------------------------------- filters */++.filters {+ position: sticky;+ top: 0;+ z-index: 5;+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ gap: 8px 22px;+ padding: 12px 32px;+ background: color-mix(in oklab, var(--ground) 88%, transparent);+ backdrop-filter: blur(14px);+ border-bottom: 1px solid var(--rule);+}++.facet {+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ gap: 6px;+}++.facet > small {+ margin-right: 4px;+ font-family: var(--mono);+ font-size: 10px;+ letter-spacing: 0.13em;+ text-transform: uppercase;+ color: var(--faint);+}++.chip {+ padding: 4px 11px;+ border: 1px solid var(--rule);+ border-radius: 2px;+ font-size: 12.5px;+ color: var(--dim);+ white-space: nowrap;+ transition:+ color 0.12s,+ border-color 0.12s,+ background 0.12s;+}++.chip:hover {+ color: var(--ink);+ border-color: var(--faint);+}++.chip[aria-pressed="true"] {+ color: var(--ground);+ background: var(--flame);+ border-color: var(--flame);+ font-weight: 500;+}++.chip em {+ font-family: var(--mono);+ font-style: normal;+ font-size: 11px;+ opacity: 0.65;+}++.count {+ margin-left: auto;+ font-family: var(--mono);+ font-size: 12px;+ color: var(--faint);+}++/* -------------------------------------------------------------------- grid */++/*+ * The hairlines between cards come from each card's own outward shadow filling+ * the one-pixel gap, not from a rule-coloured grid showing through it. With a+ * filter applied the grid can be three cards wide and eleven rows short, and a+ * rule-coloured background paints every empty track: a filter that matched three+ * assets used to leave two thirds of the page as a flat brown slab.+ */+.grid {+ display: grid;+ grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));+ gap: 1px;+ padding: 1px;+ background: var(--ground);+}++.card {+ display: flex;+ flex-direction: column;+ padding: 0;+ text-align: left;+ color: inherit;+ text-decoration: none;+ background: var(--ground);+ box-shadow: 0 0 0 1px var(--rule);+ transition: background 0.14s;+}++.card:hover,+.card:focus-visible {+ background: var(--panel);+}++.shot {+ position: relative;+ aspect-ratio: 1;+ overflow: hidden;+ background: var(--stage);+}++.shot img {+ display: block;+ width: 100%;+ height: 100%;+ object-fit: cover;+ transform: scale(1.02);+ transition:+ transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1),+ filter 0.3s;+ filter: saturate(0.94);+}++.card:hover .shot img {+ transform: scale(1.07);+ filter: saturate(1.05);+}++.shot b {+ position: absolute;+ right: 8px;+ bottom: 8px;+ padding: 3px 7px;+ border-radius: 2px;+ background: color-mix(in oklab, var(--stage) 78%, transparent);+ backdrop-filter: blur(4px);+ font-family: var(--mono);+ font-size: 10.5px;+ font-weight: 400;+ font-variant-numeric: tabular-nums;+ color: var(--dim);+}++.meta {+ display: flex;+ flex-direction: column;+ gap: 3px;+ padding: 12px 14px 15px;+}++.meta h3 {+ margin: 0;+ font-size: 14.5px;+ font-weight: 600;+ letter-spacing: -0.008em;+}++.meta p {+ margin: 0;+ font-size: 12.5px;+ line-height: 1.4;+ color: var(--dim);+ text-wrap: pretty;+}++.by {+ margin-top: 5px;+ font-family: var(--mono);+ font-size: 10.5px;+ letter-spacing: 0.02em;+ color: var(--faint);+}++.by i {+ font-style: normal;+ color: var(--ink);+}++/* ------------------------------------------------------------------ viewer */++/*+ * `minmax(0, 1fr)` and not the implicit `auto` column. An auto grid track is+ * sized to its widest item, the canvas is an item with an inline pixel width,+ * and the two of them chase each other: the canvas measures its parent, the+ * parent sizes to the canvas, and on a phone the whole viewer ended up a+ * thousand pixels wide with the controls and half the model off the right edge.+ */+.viewer {+ display: grid;+ grid-template-rows: auto 1fr;+ grid-template-columns: minmax(0, 1fr);+ height: 100%;+ overflow: hidden;+}++.bar {+ display: flex;+ min-width: 0;+ flex-wrap: wrap;+ align-items: center;+ gap: 10px 18px;+ padding: 11px 20px;+ border-bottom: 1px solid var(--rule);+ background: var(--ground);+}++.bar h2 {+ margin: 0;+ font-size: 16px;+ font-weight: 600;+ letter-spacing: -0.01em;+ white-space: nowrap;+}++.bar .sep {+ width: 1px;+ height: 20px;+ background: var(--rule);+}++.back {+ display: flex;+ text-decoration: none;+ align-items: center;+ gap: 7px;+ white-space: nowrap;+ font-family: var(--mono);+ font-size: 11px;+ letter-spacing: 0.1em;+ text-transform: uppercase;+ color: var(--dim);+}++.back:hover {+ color: var(--flame);+}++.controls {+ display: flex;+ flex-wrap: wrap;+ gap: 6px;+ margin-left: auto;+}++.controls .chip[aria-pressed="true"] {+ color: var(--stage);+ background: var(--wire);+ border-color: var(--wire);+}++.controls a.chip {+ text-decoration: none;+}++.stage {+ position: relative;+ min-width: 0;+ min-height: 0;+ overflow: hidden;+ background: radial-gradient(120% 90% at 50% 8%, #191512 0%, var(--stage) 62%);+}++.stage canvas {+ display: block;+ touch-action: none;+}++/* Anchored as one group so the caption never has to know how tall the readout+ is: side by side on a wide screen, stacked on a phone. */+.panels {+ position: absolute;+ right: 18px;+ bottom: 18px;+ left: 18px;+ display: flex;+ align-items: flex-end;+ justify-content: space-between;+ gap: 16px;+ pointer-events: none;+}++.readout {+ display: grid;+ grid-template-columns: auto auto;+ gap: 2px 20px;+ padding: 14px 18px;+ border: 1px solid var(--rule);+ border-radius: 3px;+ background: color-mix(in oklab, var(--panel) 82%, transparent);+ backdrop-filter: blur(10px);+ font-family: var(--mono);+ font-size: 11.5px;+ font-variant-numeric: tabular-nums;+ pointer-events: none;+}++.readout dt {+ align-self: center;+ font-size: 10px;+ letter-spacing: 0.08em;+ text-transform: uppercase;+ color: var(--faint);+}++.readout dd {+ margin: 0;+ color: var(--ink);+ text-align: right;+}++.caption {+ max-width: 36ch;+ padding: 13px 17px;+ border: 1px solid var(--rule);+ border-radius: 3px;+ background: color-mix(in oklab, var(--panel) 82%, transparent);+ backdrop-filter: blur(10px);+ text-align: right;+ font-size: 13px;+ line-height: 1.45;+ color: var(--dim);+ text-wrap: pretty;+ pointer-events: none;+}++.caption b {+ display: block;+ margin-top: 6px;+ font-family: var(--mono);+ font-size: 10.5px;+ font-weight: 400;+ letter-spacing: 0.05em;+ color: var(--faint);+}++.caption b i {+ font-style: normal;+ color: var(--flame);+}++.loading {+ position: absolute;+ inset: 0;+ display: grid;+ gap: 14px;+ place-content: center;+ justify-items: center;+ font-family: var(--mono);+ font-size: 11px;+ letter-spacing: 0.14em;+ text-transform: uppercase;+ color: var(--faint);+ pointer-events: none;+}++.loading div {+ width: 180px;+ height: 1px;+ background: var(--rule);+}++.loading i {+ display: block;+ height: 100%;+ background: var(--flame);+ transition: width 0.2s;+}++.step {+ display: flex;+ gap: 4px;+}++.step button {+ padding: 4px 9px;+ border: 1px solid var(--rule);+ border-radius: 2px;+ font-family: var(--mono);+ font-size: 12px;+ color: var(--dim);+}++.step button:hover {+ color: var(--ink);+ border-color: var(--faint);+}++/* ------------------------------------------------------------------ footer */++.foot {+ display: flex;+ flex-wrap: wrap;+ gap: 10px 28px;+ padding: 40px 32px 56px;+ border-top: 1px solid var(--rule);+ font-size: 13px;+ color: var(--faint);+}++.foot code {+ font-family: var(--mono);+ font-size: 12px;+ color: var(--dim);+}++.foot a {+ color: var(--dim);+ text-decoration-color: var(--rule);+ text-underline-offset: 3px;+}++.foot a:hover {+ color: var(--flame);+}++@media (max-width: 720px) {+ .masthead {+ gap: 18px;+ padding: 24px 18px 20px;+ }++ .tally {+ margin-left: 0;+ gap: 20px;+ }++ .filters {+ padding: 10px 18px;+ }++ .grid {+ grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));+ }++ .panels {+ right: 12px;+ bottom: 12px;+ left: 12px;+ flex-direction: column;+ align-items: stretch;+ gap: 8px;+ }++ .readout {+ grid-template-columns: 1fr auto;+ }++ .caption {+ max-width: none;+ text-align: left;+ }++ /* The bar already wraps to three lines on a phone; a sticky filter strip of+ five rows of chips on top of that would leave nothing to scroll. */+ .filters {+ position: static;+ }++ .foot {+ padding: 28px 18px 40px;+ }+}++@media (prefers-reduced-motion: reduce) {+ *,+ *::before,+ *::after {+ animation-duration: 0.01ms !important;+ transition-duration: 0.01ms !important;+ }+}diff --git a/site/src/types.ts b/site/src/types.tsnew file mode 100644index 00000000..8fdbc0e3--- /dev/null+++ b/site/src/types.ts@@ -0,0 +1,27 @@+/**+ * The shape `scripts/build-assets.mjs` writes. Every number in it came out of+ * the engine's own integration manifest while the GLB beside it was being made,+ * so nothing on the page is a figure somebody typed.+ */+export interface Specimen {+ name: string;+ file: string;+ thumb: string;+ bytes: number;+ category: string;+ caption: string;+ /** The model that wrote the program, named the way prose names it. */+ model: string;+ /** The agent harness it wrote through. */+ harness: string;+ /** Written with no access to this repository and no example to copy from. */+ cleanRoom: boolean;+ tris: number;+ drawCalls: number;+ materials: number;+ textures: number;+ /** Metres, on the engine's axes: +X forward, +Y up, +Z right. */+ size: [number, number, number];+ grounded: boolean;+ warnings: number;+}diff --git a/site/tsconfig.json b/site/tsconfig.jsonnew file mode 100644index 00000000..1eccfc60--- /dev/null+++ b/site/tsconfig.json@@ -0,0 +1,16 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "lib": ["ES2022", "DOM", "DOM.Iterable"],+ "module": "ESNext",+ "moduleResolution": "bundler",+ "jsx": "react-jsx",+ "strict": true,+ "noUncheckedIndexedAccess": true,+ "noUnusedLocals": true,+ "noEmit": true,+ "skipLibCheck": true,+ "types": ["vite/client"]+ },+ "include": ["src"]+}diff --git a/site/vite.config.ts b/site/vite.config.tsnew file mode 100644index 00000000..9d699f54--- /dev/null+++ b/site/vite.config.ts@@ -0,0 +1,25 @@+import react from '@vitejs/plugin-react';+import { defineConfig } from 'vite';++export default defineConfig({+ // Fast Refresh in development; without it every edit is a full reload and the+ // camera you just orbited to snaps back.+ plugins: [react()],+ // Relative, so the same build serves correctly from a custom domain at the+ // root and from a project page under `/kiln/` without being rebuilt for each.+ base: './',+ build: {+ outDir: 'dist',+ // Not the default `assets/`, which is where `public/assets/` lands: the GLBs+ // and the bundles would share a directory and only stay apart by luck of+ // filename.+ assetsDir: 'build',+ // The GLBs and thumbnails are already in `public/` and get copied verbatim;+ // nothing here needs inlining, and a base64 GLB would be a catastrophe.+ assetsInlineLimit: 0,+ // three plus drei is a megabyte and there is no version of this page that+ // does not ship a renderer. It is split out of the landing chunk, which is+ // the part that matters, so the warning is noise rather than news.+ chunkSizeWarningLimit: 1100,+ },+});