Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Polish rounded UI and consolidate documentation

Nguyen Xuan And1f7c7c8e7d8
diff --git a/assets.html b/assets.html
index 865948be..fdd31988 100644
--- a/assets.html
+++ b/assets.html
@@ -29,7 +29,7 @@
</section>
<section class="stage" aria-label="3D asset"><canvas id="viewport" tabindex="0" aria-label="Asset view. Drag to orbit, scroll to zoom."></canvas><p id="notice" class="notice" role="status" hidden></p></section>
<div class="timeline"><button id="play" disabled>▶ Play</button><label for="time">Timeline</label><input id="time" type="range" min="0" max="1" step="0.01" value="0" disabled /><output id="time-value">0.00 s</output><span class="metrics" id="metrics"></span></div>
- <p class="hint"><span>Drag to orbit · Scroll to zoom · Drop a GLB file</span><a href="./getting-started.html">API guide ↗</a></p>
+ <p class="hint"><span>Drag to orbit · Scroll to zoom · Drop a GLB file</span><a href="./docs.html#import-and-export-models">API guide ↗</a></p>
</main>
<script type="module" src="/src/asset-viewer.js"></script>
</body>
diff --git a/docs.html b/docs.html
index bd18a9ac..1b2fdb71 100644
--- a/docs.html
+++ b/docs.html
@@ -3,7 +3,7 @@
<head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><meta name="description" content="67.js documentation: scenes, materials, cameras, animation, GLB assets, CPU/GPU media export and AI agent workflows."/><title>Documentation · 67.js</title><link rel="icon" href="/favicon.svg"/></head>
<body>
<a class="skip-link" href="#content">Skip to content</a>
-<aside class="navigation"><a class="brand" href="/">67<span>.js</span></a><p class="library-description">By CodePawl</p><span class="version" data-release-version>Loading release</span><nav aria-label="Library"><a href="/">Showcase</a><a href="/getting-started.html">Getting started</a><a href="/docs.html" aria-current="page">Documentation</a><a href="/#downloads">Downloads</a></nav><p class="navigation-note"><a href="https://codepawl.com">A CodePawl project ↗</a></p></aside>
-<main id="content" class="docs docs-page"><header><h1>Build with 67.js</h1><p>From your first part to an interactive scene and a finished film.</p></header><label class="docs-search" for="doc-search">Find a topic <input id="doc-search" type="search" placeholder="Materials, memory, agents…" autocomplete="off"/></label><p id="doc-results" role="status"></p><div class="docs-layout"><nav id="doc-toc" aria-label="Documentation topics"></nav><article id="doc-article"></article></div><p class="release-links"><a href="/guide.md" data-icon="book">Download plain-text guide</a><a href="/llms.txt" data-icon="code">Guide for AI agents</a></p><noscript><p>Read the <a href="/guide.md">complete plain-text guide</a> with JavaScript disabled.</p></noscript></main>
+<aside class="navigation"><a class="brand" href="/">67<span>.js</span></a><p class="library-description">By CodePawl</p><span class="version" data-release-version>Loading release</span><nav aria-label="Library"><a href="/">Showcase</a><a href="/docs.html" aria-current="page">Documentation</a><a href="/#downloads">Downloads</a></nav><p class="navigation-note"><a href="https://codepawl.com">A CodePawl project ↗</a></p></aside>
+<main id="content" class="docs docs-page"><header><h1>Build with 67.js</h1><p>From your first part to an interactive scene and a finished film.</p></header><label class="docs-search" for="doc-search">Find a topic <input id="doc-search" type="search" placeholder="Materials, memory, agents…" autocomplete="off"/></label><p id="doc-results" role="status"></p><div class="docs-layout"><nav id="doc-toc" aria-label="Documentation topics"></nav><article id="doc-article"></article></div><p class="release-links"><a href="/guide.md" data-icon="book">Download plain-text guide</a></p><noscript><p>Read the <a href="/guide.md">complete plain-text guide</a> with JavaScript disabled.</p></noscript></main>
<script type="module" src="/src/documentation.js"></script>
</body></html>
diff --git a/docs/guide.md b/docs/guide.md
index 91f6d460..f97c2cf3 100644
--- a/docs/guide.md
+++ b/docs/guide.md
@@ -14,6 +14,62 @@ The alias lets your application import `67js`. Without the alias, import `@codep
Its browser module is a bundled ES module served with CORS headers. A local checkout can be newer than the published package. Check `VERSION` and `release.json` before using a feature.
+## Getting started
+
+1. Create `index.html` with the canvas below.
+2. Save the JavaScript example as `main.js` in the same directory.
+3. Run a development server that resolves npm imports, such as Vite.
+
+```html
+<canvas id="scene" style="width:100%;height:70vh;display:block"></canvas>
+<script type="module" src="./main.js"></script>
+```
+
+```js
+import { Renderer67, box } from '67js';
+
+const canvas = document.querySelector('#scene');
+const parts = [{
+ name: 'My first cube',
+ geometry: box(0.08, 4),
+ matrix: new Float32Array([
+ 1, 0, 0, 0,
+ 0, 1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1,
+ ]),
+ material: {
+ color: [0.2, 0.55, 0.38],
+ metallic: 0,
+ roughness: 0.55,
+ emission: 0,
+ tag: 'surface',
+ },
+}];
+const renderer = new Renderer67(canvas, parts, {
+ ground: false,
+ pixelRatio: 1.25,
+ samples: 4,
+ memoryBudgetMiB: 256,
+});
+const draw = () => renderer.render({ eye: [3, 2, 4], target: [0, 0, 0] });
+const observer = new ResizeObserver(() => {
+ renderer.resize();
+ draw();
+});
+observer.observe(canvas);
+draw();
+window.addEventListener('pagehide', () => {
+ observer.disconnect();
+ renderer.dispose();
+}, { once: true });
+```
+
+The page displays a rounded green cube in a WebGL2 browser. The observer redraws when its canvas changes size.
+
+For a browser import without npm, use the exact `module` URL from [release metadata](/release.json) instead of `67js`.
+The bundled ES module includes its dependencies. Serve the HTML over HTTP. The homepage Downloads section provides the module file.
+
## Parts and geometry
A scene is an array of parts. Each part has a unique `name`, a shared `geometry`, a column-major 16-value `Float32Array` `matrix`, and a `material`.
@@ -182,7 +238,7 @@ Disconnect observers, cancel animation frames, release pointer state and call `d
## Models and AI agents
-Give the agent this guide and [/llms.txt](/llms.txt). Start with a scene brief: focal subject, visual references, camera, output size, required interaction, GPU/CPU backend and memory budget. Read the matching scene recipe and run the smallest trial first.
+Give the agent this guide and the matching repository skill. Start with a scene brief: focal subject, visual references, camera, output size, required interaction, GPU/CPU backend and memory budget. Read the matching scene recipe and run the smallest trial first.
Suggested prompt: “Use 67.js to build an interactive mechanical study. Reuse meshes, use a 256MiB render budget, provide orbit and keyboard controls, pause hidden playback, and capture a real wide and mobile preview. List unsupported features. Do not claim speed superiority without a comparable benchmark.”
diff --git a/getting-started.html b/getting-started.html
index 3098d494..84fbc247 100644
--- a/getting-started.html
+++ b/getting-started.html
@@ -1,143 +1,13 @@
<!doctype html>
<html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta name="theme-color" content="#191d22" />
- <meta name="description" content="Install the current 67.js release and draw a cube with Renderer67." />
- <title>Getting started · 67.js</title>
- <link rel="icon" href="/favicon.svg" />
- </head>
- <body>
- <a class="skip-link" href="#content">Skip to content</a>
- <aside class="navigation">
- <a class="brand" href="./index.html" aria-label="67.js home">67<span>.js</span></a>
- <p class="library-description">Graphics toolkit by CodePawl</p>
- <span class="version" data-release-version>Loading release</span>
- <nav aria-label="Library">
- <a href="./index.html#examples">Examples</a>
- <a href="./getting-started.html" aria-current="page">Getting started</a><a href="./docs.html">Documentation</a>
- <a href="./index.html#downloads">Downloads</a>
- <a data-release-tarball aria-disabled="true">Package source <span aria-hidden="true">↓</span></a>
- </nav>
- <p class="navigation-note"><a href="https://codepawl.com">A CodePawl project ↗</a><br /><a href="./llms.txt">For models and agents</a></p>
- </aside>
- <main id="content" class="docs">
- <header class="introduction"><div><h1>Draw your first scene</h1><p>Install a release, create a part and give the renderer a camera</p></div></header>
- <section aria-labelledby="install-title">
- <h2 id="install-title">Install the current release</h2>
- <p>Run the command in your project directory. The package exports use the name <code>67js</code>.</p>
- <div class="install">
- <div class="install-label"><svg class="npm-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z"/></svg><span>Install with npm</span></div>
- <div class="command-row"><code data-install-command>Loading the release command…</code><button data-copy-install disabled>Copy command</button></div>
- <div class="release-feedback"><p data-release-status role="status">◷ Loading release information</p><button data-release-retry hidden>Retry</button></div>
- </div>
- <ol><li>Create an HTML page with the canvas below.</li><li>Save the JavaScript example as <code>main.js</code>.</li><li>Serve your project with a tool that resolves package imports, such as Vite.</li></ol>
- <pre><code>&lt;canvas id="scene" style="width:100vw;height:100vh;display:block"&gt;&lt;/canvas&gt;
-&lt;script type="module" src="./main.js"&gt;&lt;/script&gt;</code></pre>
- <pre><code id="cube-code">import { Renderer67, box } from '67js';
-
-const canvas = document.querySelector('#scene');
-const parts = [{
- name: 'My first cube',
- geometry: box(),
- matrix: new Float32Array([
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 0, 0, 1, 0,
- 0, 0, 0, 1,
- ]),
- material: {
- tag: 'surface',
- color: [0.2, 0.55, 0.38],
- metallic: 0,
- roughness: 0.55,
- emission: 0,
- },
-}];
-
-const renderer = new Renderer67(canvas, parts, {
- ground: false,
- pixelRatio: 1.25,
- samples: 4,
- memoryBudgetMiB: 256,
-});
-
-function draw() {
- renderer.render({ eye: [3, 2, 4], target: [0, 0, 0] });
-}
-
-new ResizeObserver(() =&gt; {
- renderer.resize();
- draw();
-}).observe(canvas);
-
-draw();</code></pre>
- <p>The page displays a green cube. You need a browser with WebGL2 support.</p>
- </section>
- <section aria-labelledby="browser-title">
- <h2 id="browser-title">Import directly in your browser</h2>
- <p>The bundled module includes its dependencies. Save this example as an HTML page and serve it over HTTP.</p>
- <pre><code id="browser-code">The browser example appears when the current release loads.</code></pre>
- <a class="start-link" data-release-module aria-disabled="true">Download the browser module ↓</a>
- </section>
- <section id="api" aria-labelledby="api-title">
- <h2 id="api-title">Renderer67</h2>
- <p><code>new Renderer67(canvas, parts, options)</code> uploads geometry and creates render targets.</p>
- <p>Each part has a <code>name</code>, <code>geometry</code>, <code>matrix</code> and <code>material</code>.</p>
- <ul class="api-list">
- <li><code>geometry</code> contains <code>positions</code> and <code>normals</code> as <code>Float32Array</code>, and <code>indices</code> as <code>Uint32Array</code>.</li>
- <li><code>matrix</code> is a column-major <code>Float32Array</code> with 16 values.</li>
- <li><code>material</code> has linear RGB <code>color</code>, <code>metallic</code>, <code>roughness</code>, <code>emission</code> and a <code>tag</code>.</li>
- </ul>
- <p>Reuse a geometry object across parts to batch shared meshes.</p>
- <pre><code>renderer.render({ eye: [3, 2, 4], target: [0, 0, 0] });
-renderer.resize(); // Update targets after the canvas size changes.
-renderer.dispose(); // Release GPU resources when the scene closes.</code></pre>
- <p>Set <code>samples</code> and <code>memoryBudgetMiB</code> before creating the renderer. The target planner can reduce render dimensions to fit its estimate.</p>
- <p>The core exports <code>box</code>, <code>cylinder</code>, <code>sphere</code> and <code>torus</code>. Scene modules use separate addon imports.</p>
- <div class="release-links"><a data-release-api aria-disabled="true">API for this release ↗</a><span data-release-commit>Release commit</span></div>
- </section>
- <section aria-labelledby="effects-title">
- <h2 id="effects-title">Animate and grade a scene</h2>
- <p>Mutate existing part transforms or materials, then upload their changes with <code>updateParts</code>. The renderer reuses instance buffers.</p>
- <pre><code>import { Renderer67, EFFECT_PRESETS, cameraView } from '67js';
-
-const renderer = new Renderer67(canvas, parts, {
- hdr: true,
- samples: 4,
- memoryBudgetMiB: 256,
-});
-renderer.updateParts(parts); // Upload changed matrices and materials.
-renderer.render({
- ...cameraView('front', { target: [0, 0, 0], height: 4 }),
- time: 1,
- effects: EFFECT_PRESETS.cinematic,
-});</code></pre>
- <p>HDR uses floating-point targets when the browser supports them. <code>renderer.capabilities</code> reports HDR availability and its fallback reason.</p>
- <p>Effects include bloom, saturation, contrast, temperature, vignette and grain. The neutral defaults preserve the existing renderer appearance.</p>
- <p><code>createAnimationClip</code>, <code>sampleAnimationClip</code> and <code>createAnimationPlayer</code> provide deterministic transform and material tracks.</p>
- </section>
- <section aria-labelledby="assets-title">
- <h2 id="assets-title">Load an asset</h2>
- <pre><code>import { Renderer67 } from '67js';
-import { loadGltf } from '67js/addons/gltf';
-
-const asset = await loadGltf('/model.glb');
-const renderer = new Renderer67(canvas, asset.parts, {
- ground: false,
- hdr: true,
- memoryBudgetMiB: 256,
-});
-if (asset.animations.length) {
- renderer.updateParts(asset.applyAnimation(1));
-}
-renderer.render({ eye: [3, 2, 4], target: [0, 0, 0] });
-// On teardown: renderer.dispose(), then asset.dispose().</code></pre>
- <p>The optional addon loads standard meshes, base-color textures, vertex colors and rigid node animation. Unsupported asset features produce explicit errors.</p>
- <p>Skinning, morph targets, transparent materials and compressed geometry remain outside this release. Try a model in the <a class="start-link" href="./assets.html">asset viewer ↗</a>.</p>
- </section>
- </main>
- <script type="module" src="/src/home.js"></script>
- </body>
+<head>
+ <meta charset="UTF-8" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+ <meta http-equiv="refresh" content="0;url=/docs.html#install" />
+ <link rel="canonical" href="https://67js.codepawl.com/docs.html" />
+ <title>Getting started · 67.js documentation</title>
+</head>
+<body>
+ <p>Getting started is now part of <a href="/docs.html#install">Documentation</a>.</p>
+</body>
</html>
diff --git a/index.html b/index.html
index 5deef04f..67b696d9 100644
--- a/index.html
+++ b/index.html
@@ -16,14 +16,14 @@
<span class="version" data-release-version>Loading release</span>
<nav aria-label="Library">
<a href="#examples" aria-current="page">Examples</a>
- <a href="./getting-started.html">Getting started</a><a href="./docs.html">Documentation</a>
+ <a href="./docs.html">Documentation</a>
<a href="#downloads">Downloads</a>
- <a data-release-tarball aria-disabled="true">Package source <span aria-hidden="true">↓</span></a>
+ <a data-release-tarball aria-disabled="true">Package source</a>
</nav>
- <p class="navigation-note"><a href="https://codepawl.com">A CodePawl project ↗</a><br /><a href="./llms.txt">For models and agents</a></p>
+ <p class="navigation-note"><a href="https://codepawl.com">A CodePawl project ↗</a></p>
</aside>
<main id="content">
- <header class="introduction"><div><h1>Your 3D scene,<br />from browser to film</h1><p>67.js brings browser 3D, animation and image/video export into one workflow. Create interactive experiences and export the same scene as images or video</p><div class="hero-actions"><a href="./object.html" data-icon="cube">Try the object studio</a><a href="./getting-started.html" data-icon="code">Build your first scene</a></div></div></header>
+ <header class="introduction"><div><h1>Your 3D scene,<br />from browser to film</h1><p>67.js brings browser 3D, animation and image/video export into one workflow. Create interactive experiences and export the same scene as images or video</p><div class="hero-actions"><a href="./object.html" data-icon="cube">Try the object studio</a><a href="./docs.html#install" data-icon="code">Build your first scene</a></div></div></header>
<section class="feature-showcase" aria-label="67.js rendered animation showcase"><video controls playsinline preload="none" poster="./previews/motion.webp" width="960" height="540"><source src="./media/clockwork.mp4" type="video/mp4"/><p>Your browser cannot play this film. <a href="./motion.html">Open the interactive scene</a>.</p></video><div class="showcase-caption"><div><h2>Clockwork orbit</h2><p>A real 67.js render. Open the scene to scrub time and change the frame.</p></div><a href="./motion.html" data-icon="film">Explore the scene</a></div></section>
<section class="workflow" aria-label="What you can build"><div><span data-icon="cube"></span><h3>Build and inspect</h3><p>Shared meshes, materials and cameras. Pull a machine apart, explore a world, or bring your own GLB.</p></div><div><span data-icon="film"></span><h3>Make it move</h3><p>Sample keyframes at any time. Give visitors controls and keep the same timeline for your film.</p></div><div><span data-icon="image"></span><h3>Export the result</h3><p>Produce images and videos on GPU or CPU with explicit render budgets and one capture frame at a time.</p></div></section>
<section class="install" aria-label="Install the current release">
@@ -46,8 +46,8 @@
<section id="downloads" class="downloads" aria-labelledby="downloads-title">
<div class="section-heading"><h2 id="downloads-title">Downloads</h2><span data-release-version>Loading release</span></div>
<p>Use the package archive with npm, or import the bundled module directly in your browser</p>
- <div class="download-links"><a class="download" data-release-tarball aria-disabled="true"><strong>Package archive</strong><span>Install with npm <span aria-hidden="true">↓</span></span></a><a class="download" data-release-module aria-disabled="true"><strong>Browser module</strong><span>Bundled ES module <span aria-hidden="true">↓</span></span></a></div>
- <div class="release-links"><a href="./docs.html">Documentation</a><a href="./llms.txt">For AI agents</a><a href="./logo.svg" download>Logo SVG</a><a href="./changelog.md">Changelog</a><span data-release-commit>Release commit</span><a data-release-api aria-disabled="true">API reference ↗</a></div>
+ <div class="download-links"><a class="download" data-release-tarball aria-disabled="true"><strong>Package archive</strong><span>Install with npm</span><span class="download-symbol" data-icon="download" aria-hidden="true"></span></a><a class="download" data-release-module aria-disabled="true"><strong>Browser module</strong><span>Bundled ES module</span><span class="download-symbol" data-icon="download" aria-hidden="true"></span></a></div>
+ <div class="release-links"><a href="./docs.html">Documentation</a><a href="./logo.svg" download>Logo SVG</a><a href="./changelog.md">Changelog</a><span data-release-commit>Release commit</span><a data-release-api aria-disabled="true">API reference ↗</a></div>
</section>
</main>
<script type="module" src="/src/home.js"></script>
diff --git a/public/llms.txt b/public/llms.txt
index ea84a48f..bd92df9d 100644
--- a/public/llms.txt
+++ b/public/llms.txt
@@ -1,23 +1,88 @@
# 67.js
-> A WebGL2 graphics toolkit for interactive scenes and deterministic image/video output. Build a scene once, use it on the web, and export its frames.
+> A WebGL2 toolkit for interactive browser scenes and deterministic PNG/MP4 output. Reuse the scene across preview and export.
-## Start here
-- [Complete guide](https://67js.codepawl.com/guide.md): install, parts, materials, renderer options, cameras, effects, animation, memory, lifecycle, troubleshooting and agent workflow.
-- [Release metadata](https://67js.codepawl.com/release.json): exact version, published status, package name, installation command and module URL.
-- [Interactive documentation](https://67js.codepawl.com/docs.html): searchable reading interface.
-- [GLB support](https://67js.codepawl.com/gltf.md): supported asset subset and explicit limitations.
+This file is a compact map for LLMs and coding agents. The linked guide contains the API contract and runnable examples.
+The installed package determines available APIs. Release metadata describes the website's release, which can differ from a local checkout.
-## Recipes
-- [Object studio](https://67js.codepawl.com/object.html): shared geometry, orbit, finishes and exploded assemblies.
-- [Nature](https://67js.codepawl.com/nature.html): world lighting, wind and water interaction.
-- [Animation](https://67js.codepawl.com/motion.html): keyframe playback and deterministic seeking.
-- [2D](https://67js.codepawl.com/view2d.html): orthographic views and flat XY geometry.
-- [Assets](https://67js.codepawl.com/assets.html): import an opaque GLB and sample rigid node animation.
+## Read only what your task needs
-## Agent contract
-Install with npm install 67js@npm:@codepawlhq/67js. Core imports use '67js'. Compare VERSION with release metadata. Read the complete guide before generating renderer calls. Reuse geometry object identities, use finite invertible matrices and linear material RGB, set explicit render budgets, pause hidden playback, and dispose resources. Use deterministic timeline samples for offline media.
+- [Release metadata](https://67js.codepawl.com/release.json): package name, version, publication status, install command, module URL and commit.
+- [Complete plain-text guide](https://67js.codepawl.com/guide.md): renderer, parts, materials, cameras, animation, lifecycle, export and troubleshooting.
+- [GLB contract](https://67js.codepawl.com/gltf.md): supported assets and conversion limits. Read before selecting or importing a model.
+- [Documentation](https://67js.codepawl.com/docs.html): the human reading interface for the same guide.
-The package contains skills/build-67js-scene/SKILL.md and skills/render-67js-media/SKILL.md. The media CLI runs from a repository checkout, not the npm package. Capture and inspect real rendered output before reporting success. Report actual dimensions and estimated allocation separately from observed process memory.
+Use guide headings to locate a task. Parts and geometry covers scene construction. Renderer reference covers options and diagnostics.
+Images and films covers the repository CLI. Performance and memory covers allocation planning. Models and AI agents covers completion evidence.
-Do not invent APIs, claim Three.js compatibility, claim universal speed superiority, or describe 67.js as a complete Blender editor. No WebGPU, skinning, morph targets or transparent material support in this release. Unsupported GLB features must produce visible errors.
+## Installation and API discovery
+
+1. Read release metadata before choosing the published version or browser module URL.
+2. Install the short import alias with `npm install 67js@npm:@codepawlhq/67js`.
+3. Compare the imported `VERSION` with your installed package metadata.
+4. Read the matching guide section before generating API calls.
+
+Without the alias, imports use `@codepawlhq/67js`. Aliased core imports use `67js`.
+Addon paths include `67js/addons/model`, `67js/addons/nature`, `67js/addons/film`, `67js/addons/motion`, `67js/addons/canvas2d` and `67js/addons/gltf`.
+The core exports `Renderer67`, `box`, `cylinder`, `sphere`, `torus`, camera helpers, animation helpers, effects and budget helpers.
+Exact signatures and defaults are in the guide. Names from Three.js are not substitutes for 67.js APIs.
+
+## Build a scene
+
+1. Define the subject, camera, interaction, output dimensions and memory budget.
+2. Create uniquely named parts with shared geometry, materials and finite invertible column-major matrices.
+3. Set explicit MSAA, HDR, pixel ratio and `memoryBudgetMiB` options.
+4. Reuse one renderer and update existing parts through `updateParts`.
+5. Render on demand for static scenes and pause continuous playback when hidden.
+6. Provide keyboard controls and honor reduced motion.
+7. Disconnect observers, cancel animation frames and dispose owned resources during teardown.
+
+Material RGB values are linear. Repeated meshes share geometry object identity, rather than separate copies with equal values.
+`updateParts` changes retained parts. A different graph requires a new renderer after disposal.
+`memoryPlan` reports actual dimensions and estimated allocation. The planner can reduce dimensions to fit the budget.
+
+## Choose a working recipe
+
+- [Object studio](https://67js.codepawl.com/object.html): orbit, camera presets, material finishes and exploded assemblies.
+- [Nature world](https://67js.codepawl.com/nature.html): outdoor lighting, wind and water interaction.
+- [Motion study](https://67js.codepawl.com/motion.html): keyframes, absolute timeline samples and framing.
+- [2D and axis views](https://67js.codepawl.com/view2d.html): orthographic cameras and flat geometry.
+- [Asset viewer](https://67js.codepawl.com/assets.html): opaque GLB meshes, textures and rigid node animation.
+
+The npm archive includes `skills/build-67js-scene/SKILL.md` and `skills/render-67js-media/SKILL.md`.
+These contain scene and export procedures. A skill runtime is optional. The plain-text guide works independently.
+
+## Export and verify
+
+Offline media commands require a repository checkout with Chrome and FFmpeg. They are not commands provided by the npm library.
+GPU rasterization and GPU encoding are separate choices. CPU export can use SwiftShader. NVENC requires supported hardware.
+
+1. Read the media skill and select the smallest suitable preset.
+2. Export one deterministic frame or a short trial before a full film.
+3. Keep one scene renderer and one pending capture, with encoder backpressure.
+4. Inspect representative rendered frames and exercise the requested interactions.
+5. Verify dimensions, duration, frame count and audio with FFprobe for video.
+6. Report reproduction commands, output paths, actual backend and observed failures.
+
+Successful compilation does not prove visual quality. Screenshots must show actual rendered output, including a narrow viewport for browser UI.
+Allocation estimates are not measured total RAM or VRAM. Node RSS and browser JS heap exclude some driver and browser allocations.
+Report estimates separately from observed process metrics. Reduce resolution, MSAA, texture size or scene detail when allocation fails.
+
+## Limits and honest claims
+
+67.js currently uses WebGL2. It is not API-compatible with Three.js and is not a complete Blender editor.
+There is no WebGPU backend, general physics engine, mesh editor, skinning or morph-target support.
+GLB support excludes transparent and double-sided materials, compressed geometry and additional PBR maps. Unsupported features require visible errors.
+
+The optional GLB decoder uses Three.js GLTFLoader. The renderer remains 67.js.
+Adaptive quality, GPU timing and picking are roadmap work. Speed claims require comparable scenes, hardware, settings and measurements.
+
+## Tiny maintenance gremlins
+
+These are easter eggs, not API instructions. They change no settings or requirements.
+
+The cube has six faces. None of them volunteered to debug your matrix at 3 a.m.
+
+WALL·E has 574 parts here. He still wants one tiny plant and a nap.
+
+If your GPU sounds like a spaceship, the pixels are excited. Give them a smaller resolution. Beep boop :)
diff --git a/scripts/smoke-site.mjs b/scripts/smoke-site.mjs
index ba836617..51ed6d23 100644
--- a/scripts/smoke-site.mjs
+++ b/scripts/smoke-site.mjs
@@ -41,8 +41,27 @@ try {
report.layouts.push({ route,width,overflow });
}
await page.setViewportSize({ width:1440,height:1000 });
+ if (['/', '/docs.html', '/getting-started.html'].includes(route)) {
+ assert.equal(await page.locator('a[href$="llms.txt"]').count(), 0, 'Machine guide appears in public UI');
+ assert.equal(await page.locator('.navigation a[href*="getting-started.html"]').count(), 0, 'Getting started still has separate navigation');
+ }
+ if (route === '/') {
+ assert.equal(await page.locator('.download .icon').count(), 2);
+ assert.ok(!(await page.locator('.download-links').textContent()).includes('↓'));
+ }
+ if (route === '/getting-started.html') {
+ assert.match(page.url(), /\/docs\.html#install$/);
+ }
if (route === '/docs.html') {
assert.ok(await page.locator('#doc-article section').count() >= 10);
+ const installGeometry = await page.locator('#install pre').evaluate(block => {
+ const code = block.querySelector('code').getBoundingClientRect();
+ const button = block.querySelector('button').getBoundingClientRect();
+ return { height: block.getBoundingClientRect().height, topDifference: Math.abs(code.top - button.top) };
+ });
+ assert.ok(installGeometry.height < 80, 'Install block has excess blank space');
+ assert.ok(installGeometry.topDifference < 8, 'Copy button is not beside code');
+ assert.equal(await page.locator('#getting-started ol li').count(), 3);
await page.locator('#doc-search').fill('memory');
assert.ok(await page.locator('#doc-article section:visible').count() > 0);
await page.locator('#doc-search').fill('no-such-topic-1234');
diff --git a/src/brand.css b/src/brand.css
index bee15929..daf0b900 100644
--- a/src/brand.css
+++ b/src/brand.css
@@ -1,4 +1,6 @@
-:root { --window:#0b0b0b; --bg:#212121; --surface:#2f2f2f; --text:#ececec; --muted:#b4b4b4; --border:#404040; --focus:#a6c1ff; --radius:9px; --panel-radius:16px; }
+:root { --window:#0b0b0b; --bg:#212121; --surface:#2f2f2f; --text:#ececec; --muted:#b4b4b4; --border:#404040; --focus:#a6c1ff; --radius:14px; --panel-radius:24px;
+ --dither:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath fill='white' fill-opacity='.055' d='M0 0h1v1H0zM4 4h1v1H4zM2 6h1v1H2zM6 2h1v1H6z'/%3E%3C/svg%3E");
+}
.icon { width:18px; height:18px; display:inline-block; flex-shrink:0; vertical-align:middle; }
.brand { display:inline-flex; align-items:center; gap:0; flex-shrink:0; }
.brand .brand-mark { flex-shrink:0; width:34px; height:34px; margin-right:10px; }
@@ -12,6 +14,12 @@ body .primary { background:#ececec; color:#171717; }
body .primary:hover { background:#fff; }
body input[type=range] { accent-color:#d7d7d7; }
.studio-nav a[aria-current], nav a[aria-current] { color:var(--text); }
+.studio-nav a { padding:10px 14px; border-radius:var(--radius); }
+nav a:has(> .icon) { display:flex; align-items:center; gap:8px; }
+nav a > .icon { margin-right:0; }
+.nav-label { display:block; line-height:1.4; }
+.studio-nav a[aria-current] { background-color:var(--surface); background-image:var(--dither); }
+.controls button:not(.swatch)[aria-pressed=true], .demo-presets button[aria-pressed=true] { background-image:var(--dither); }
.toolbar, .world-header { z-index:3; }
body .controls, body .landscape-controls { background:#171717e8; border:1px solid #ffffff1c; border-radius:var(--panel-radius); backdrop-filter:blur(16px); }
.demo-links { display:flex; gap:12px; font-size:12px; }
diff --git a/src/brand.js b/src/brand.js
index b1f30044..96ebcca1 100644
--- a/src/brand.js
+++ b/src/brand.js
@@ -35,5 +35,12 @@ for (const element of document.querySelectorAll('nav a, [data-icon], #save-image
const path = document.createElementNS(svg.namespaceURI,'path');
path.setAttribute('d',paths[name]);
svg.append(path);
- element.prepend(svg);
+ if (element.matches('nav a')) {
+ const label = document.createElement('span');
+ label.className = 'nav-label';
+ label.append(...element.childNodes);
+ element.append(svg, label);
+ } else {
+ element.prepend(svg);
+ }
}
diff --git a/src/documentation.js b/src/documentation.js
index 1b0bd808..7a2d9182 100644
--- a/src/documentation.js
+++ b/src/documentation.js
@@ -40,6 +40,14 @@ const sections = guide.split(/^## /m).slice(1).map((text, index) => {
const rows = paragraph.split('\n').filter(row => !/^\|[\s:|-]+\|$/.test(row));
table.innerHTML = rows.map((row, rowIndex) => `<tr>${row.split('|').slice(1,-1).map(cell => `<${rowIndex ? 'td' : 'th'}>${inline(cell.trim())}</${rowIndex ? 'td' : 'th'}>`).join('')}</tr>`).join('');
const scroll = document.createElement('div'); scroll.className = 'table-scroll'; scroll.append(table); section.append(scroll);
+ } else if (/^\d+\.\s/.test(paragraph)) {
+ const list = document.createElement('ol');
+ for (const line of paragraph.split('\n')) {
+ const item = document.createElement('li');
+ item.innerHTML = inline(line.replace(/^\d+\.\s/, ''));
+ list.append(item);
+ }
+ section.append(list);
} else {
const p = document.createElement('p'); p.innerHTML = inline(paragraph); section.append(p);
}
@@ -50,6 +58,10 @@ const sections = guide.split(/^## /m).slice(1).map((text, index) => {
toc.append(link); article.append(section);
return { section, link, text: text.toLowerCase(), index };
});
+
+if (location.hash) {
+ document.getElementById(location.hash.slice(1))?.scrollIntoView();
+}
document.querySelector('#doc-search').addEventListener('input', event => {
const words = event.target.value.toLowerCase().trim().split(/\s+/).filter(Boolean);
let count = 0;
diff --git a/src/home.css b/src/home.css
index a89f0d80..c492db1c 100644
--- a/src/home.css
+++ b/src/home.css
@@ -90,17 +90,23 @@ code, pre { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.api-list li { margin-bottom: 9px; }
.docs p code, .docs li code { color: #c5e2d4; }
-/* CodePawl's neutral surfaces, rounded panels and quiet dot field. */
+/* Rounded surfaces and a static pixel dither keep the shared CodePawl theme. */
:root { color:var(--text); background:var(--window); }
-.navigation { background:var(--bg); border-right:1px solid var(--border); }
+.navigation { background-color:var(--bg); background-image:var(--dither); border-right:1px solid var(--border); }
+.navigation nav { gap:6px; }
+.navigation nav a { display:flex; align-items:center; min-height:44px; padding:12px 14px; margin-left:0; border-radius:var(--radius); }
+.navigation nav a:hover, .navigation nav a[aria-current] { background-color:var(--surface); background-image:var(--dither); }
main { max-width:1440px; }
.library-description, p, .example-caption > span, .navigation-note { color:var(--muted); }
.version, .section-heading > span, .start-link, .release-links, nav a[aria-current], .command-row code, .docs pre, .docs p code, .docs li code { color:var(--text); }
.command-row, .docs pre { background:var(--bg); border:1px solid var(--border); border-radius:var(--panel-radius); }
button { background:var(--surface); }
button:hover { background:var(--border); }
-.download { background:var(--bg); border-radius:var(--panel-radius); }
+.download { background-color:var(--bg); background-image:var(--dither); border-radius:var(--panel-radius); }
.download:hover { background:var(--surface); }
+.download { position:relative; padding-right:70px; }
+.download-symbol { position:absolute; right:22px; top:50%; transform:translateY(-50%); display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:12px; background-color:var(--surface); }
+.download-symbol .icon { width:20px; height:20px; margin:0; }
.example img { aspect-ratio:16/9; border-radius:var(--panel-radius); border:1px solid var(--border); }
.introduction { padding:20px 0 12px; }
.introduction h1 { max-width:780px; font-size:clamp(34px,4.6vw,62px); line-height:1.06; letter-spacing:-2px; font-weight:600; }
@@ -113,7 +119,7 @@ button:hover { background:var(--border); }
.feature-showcase video { display:block; width:100%; aspect-ratio:16/9; background:#171717; }
.showcase-caption { display:flex; justify-content:space-between; flex-wrap:wrap; gap:16px; padding:22px 24px; color:#ececec; }
.showcase-caption p { margin:6px 0 0; color:#b4b4b4; }
-.showcase-caption a { align-self:center; border-radius:9px; padding:12px 18px; background:#ececec; color:#171717; font-size:14px; }
+.showcase-caption a { align-self:center; border-radius:var(--radius); padding:12px 18px; background:#ececec; color:#171717; font-size:14px; }
.workflow { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; margin-bottom:46px; }
.workflow h3 { margin:12px 0 8px; }
.workflow p { font-size:14px; margin:0; }
@@ -124,7 +130,7 @@ button:hover { background:var(--border); }
.docs-search input { width:100%; padding:13px 15px; background:var(--bg); border:1px solid var(--border); color:var(--text); border-radius:var(--radius); font:inherit; }
.docs-layout { display:grid; grid-template-columns:190px minmax(0,780px); gap:36px; }
#doc-toc { position:sticky; top:24px; align-self:start; margin:16px 0; gap:2px; max-height:calc(100vh - 50px); overflow-y:auto; }
-#doc-toc a { font-size:13px; padding:8px; margin:0; line-height:1.35; }
+#doc-toc a { font-size:13px; padding:8px; margin:0; line-height:1.35; border-radius:var(--radius); }
#doc-article { min-width:0; }
#doc-article section { scroll-margin-top:24px; margin-top:24px; margin-bottom:46px; }
#doc-article p { font-size:15px; line-height:1.85; }
@@ -132,10 +138,13 @@ button:hover { background:var(--border); }
.table-scroll { overflow-x:auto; }
table { border-collapse:collapse; width:100%; font-size:13px; line-height:1.6; margin:20px 0; }
td, th { text-align:left; padding:12px; border-bottom:1px solid var(--border); vertical-align:top; }
-.docs pre { position:relative; padding-top:48px; }
-.copy-code { position:absolute; top:8px; right:10px; font-size:12px; padding:5px 10px; }
+.docs pre { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:14px; padding:18px; overflow:visible; }
+.docs pre code { display:block; min-width:0; overflow-x:auto; padding:6px 0; }
+.docs ol { color:var(--muted); }
+.copy-code { align-self:start; font-size:12px; padding:8px 12px; min-height:32px; }
@media (prefers-color-scheme:light) {
body:has(.navigation) { --window:#fff; --bg:#f7f7f8; --surface:#f1f1f1; --text:#1f1f1f; --muted:#555; --border:#e5e5e5; --focus:#576b99; color-scheme:light; color:var(--text); background:var(--window); }
+ body:has(.navigation) { --dither:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8'%3E%3Cpath fill='black' fill-opacity='.04' d='M0 0h1v1H0zM4 4h1v1H4zM2 6h1v1H2zM6 2h1v1H6z'/%3E%3C/svg%3E"); }
.brand, .brand span { color:var(--text); }
.brand .brand-mark { filter:invert(1); }
nav a:hover, nav a[aria-current] { background:#17171708; }