Skip to content

armgit / 67.js

Public Imported from GitHub
0

3D engine that AI agents drive

Redesign the 67.js front page around a live hero, code example, capability grid and agent section

Nguyen Xuan An73e510b39873
diff --git a/index.html b/index.html
index b30c7b19..96aee37e 100644
--- a/index.html
+++ b/index.html
@@ -4,9 +4,18 @@
<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="3D tools for agents: author scenes, import models, inspect PNG previews and refine with atomic edits and undo. Install 67.js for browser rendering and MCP." />
- <title>67.js · 3D tools for agents</title>
- <link rel="icon" href="/favicon.svg" />
+ <meta name="description" content="67.js is a WebGL2 3D engine for agents and people: PBR, shadows, fog, animation, GLB, PNG and MP4 export, and an MCP server. Install with npm i @codepawlhq/67js." />
+ <meta property="og:type" content="website" />
+ <meta property="og:site_name" content="67.js" />
+ <meta property="og:title" content="67.js · a 3D engine agents can drive" />
+ <meta property="og:description" content="WebGL2 rendering, deterministic animation and an MCP server in one npm package." />
+ <meta property="og:url" content="https://67js.codepawl.com/" />
+ <meta property="og:image" content="https://67js.codepawl.com/previews/wall-e.png" />
+ <meta property="og:image:alt" content="WALL·E rendered by 67.js" />
+ <meta name="twitter:card" content="summary_large_image" />
+ <link rel="canonical" href="https://67js.codepawl.com/" />
+ <title>67.js · a 3D engine agents can drive</title>
+ <link rel="icon" href="/favicon.svg" />
</head>
<body>
<a class="skip-link" href="#content">Skip to content</a>
@@ -19,47 +28,107 @@
</header>
<main id="content">
<section class="hero" aria-label="67.js introduction and live preview">
- <header class="introduction"><div><h1>3D scenes,<br />built with agents</h1><p>Give agents tools to build, inspect and refine 3D. Preview in your browser, then export the scene.</p><section id="downloads" class="home-install" aria-label="Install 67.js">
- <div class="package-install">
- <div class="package-managers" role="group" aria-label="Package manager">
- <button data-package-manager="npm" aria-pressed="true"><span class="package-logo package-logo-npm" aria-hidden="true"></span><span>npm</span></button>
- <button data-package-manager="pnpm" aria-pressed="false"><span class="package-logo package-logo-pnpm" aria-hidden="true"></span><span>pnpm</span></button>
- <button data-package-manager="yarn" aria-pressed="false"><span class="package-logo package-logo-yarn" aria-hidden="true"></span><span>Yarn</span></button>
- <button data-package-manager="bun" aria-pressed="false"><span class="package-logo package-logo-bun" aria-hidden="true"></span><span>Bun</span></button>
+ <header class="introduction">
+ <div>
+ <h1>A 3D engine<br />agents can drive</h1>
+ <p>WebGL2 rendering, deterministic animation and an MCP server in one package.</p>
+ <section id="downloads" class="home-install" aria-label="Install 67.js">
+ <div class="package-install">
+ <div class="package-managers" role="group" aria-label="Package manager">
+ <button data-package-manager="npm" aria-pressed="true"><span class="package-logo package-logo-npm" aria-hidden="true"></span><span>npm</span></button>
+ <button data-package-manager="pnpm" aria-pressed="false"><span class="package-logo package-logo-pnpm" aria-hidden="true"></span><span>pnpm</span></button>
+ <button data-package-manager="yarn" aria-pressed="false"><span class="package-logo package-logo-yarn" aria-hidden="true"></span><span>Yarn</span></button>
+ <button data-package-manager="bun" aria-pressed="false"><span class="package-logo package-logo-bun" aria-hidden="true"></span><span>Bun</span></button>
+ </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" hidden><p data-release-status role="status">Loading release information</p><button data-release-retry hidden>Retry</button></div>
+ </div>
+ </section>
+ <div class="hero-actions">
+ <a href="/docs.html#getting-started" data-icon="book">Get started</a>
+ <a href="https://github.com/anxuanng/67.js"><span class="package-logo package-logo-github" aria-hidden="true"></span>GitHub</a>
+ <a href="https://www.npmjs.com/package/@codepawlhq/67js"><span class="package-logo package-logo-npm brand-npm" aria-hidden="true"></span>npm</a>
+ </div>
</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" hidden><p data-release-status role="status">Loading release information</p><button data-release-retry hidden>Retry</button></div>
- <div class="package-links"><a href="https://www.npmjs.com/package/@codepawlhq/67js" data-icon="package">View on npm</a><a href="https://github.com/anxuanng/67.js" data-icon="github">Source on GitHub</a><a href="/docs.html" data-icon="book">Docs</a></div>
- </div>
- </section></div></header>
+ </header>
- <section class="feature-showcase live-showcase" aria-label="Interactive 3D preview">
- <canvas id="home-preview" tabindex="0" aria-label="WALL·E 3D model. Drag or use arrow keys to rotate. Use plus and minus to zoom. Press Space to pause or resume animation."></canvas>
- <p id="home-preview-status" role="status">Loading 3D preview…</p>
- <div class="preview-assembly">
- <div class="preview-assembly-label"><label for="preview-assembly">Explore the machinery</label><output id="preview-assembly-value" for="preview-assembly">Assembled</output></div>
- <input id="preview-assembly" type="range" min="0" max="100" step="1" value="0" aria-valuetext="Assembled" aria-describedby="preview-assembly-hint" />
- <p id="preview-assembly-hint">Slide to take WALL·E apart. Reassemble to start rolling.</p>
- </div>
+ <section class="feature-showcase live-showcase" aria-label="Interactive 3D preview">
+ <canvas id="home-preview" tabindex="0" aria-label="WALL·E 3D model. Drag or use arrow keys to rotate. Use plus and minus to zoom. Press Space to pause or resume animation."></canvas>
+ <p id="home-preview-status" role="status">Loading 3D preview…</p>
+ <div class="preview-assembly">
+ <div class="preview-assembly-label"><label for="preview-assembly">Take it apart</label><output id="preview-assembly-value" for="preview-assembly">Assembled</output></div>
+ <input id="preview-assembly" type="range" min="0" max="100" step="1" value="0" aria-valuetext="Assembled" />
+ </div>
+ </section>
</section>
+
+ <section id="code" class="code-section" aria-labelledby="code-title">
+ <div class="code-copy">
+ <h2 id="code-title">A scene in a few lines</h2>
+ <div class="code-block">
+ <pre><code id="home-code">import { Renderer67 } from '67js';
+import { createModel } from '67js/addons/model';
+
+const renderer = new Renderer67(canvas, createModel(), {
+ samples: 4,
+ memoryBudgetMiB: 256,
+});
+
+renderer.render({
+ eye: [4, 3, 7],
+ target: [0, 1.5, 0],
+ assemblyAmount: 0.5,
+});</code></pre>
+ <button data-copy-code="home-code" aria-label="Copy the code example">Copy</button>
+ </div>
+ </div>
+ <img class="code-result" src="./previews/wall-e-exploded.webp" alt="WALL·E pulled apart into its 574 parts, rendered by the code on the left" width="1280" height="720" loading="lazy" />
</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 id="examples" class="examples" aria-labelledby="examples-title">
- <h2 id="examples-title">Interactive showcase</h2><p>Explore a machine, a world, a film or your own model</p>
+ <h2 id="examples-title">Rendered by the engine</h2>
+ <ul class="capability-list" aria-label="Engine capabilities">
+ <li>PBR materials</li><li>Shadows</li><li>HDR and bloom</li><li>MSAA</li><li>Volumetric fog</li><li>Skinning and morphs</li><li>Physics</li><li>Spume liquid</li><li>GLB import and export</li><li>PNG and MP4 export</li>
+ </ul>
<div class="gallery">
- <a class="example" href="./modeling.html"><img src="./previews/modeling.webp" alt="A porcelain and brass lantern built with profile, extrusion and curve tools" width="1280" height="720" loading="lazy" /><div class="example-caption"><h3>Aster lantern</h3><span>Modeling <span aria-hidden="true">↗</span></span></div><p>Explore curved brass rails, a turned pedestal and animated clockwork rings</p></a>
- <a class="example" href="./object.html"><img src="./previews/wall-e.webp" alt="WALL·E model rendered in 67.js" width="1280" height="720" fetchpriority="high" /><div class="example-caption"><h3>WALL·E</h3><span>Object studio <span aria-hidden="true">↗</span></span></div><p>Explore the exterior or separate 574 parts to inspect the machinery</p></a>
- <a class="example" href="./nature.html"><img src="./previews/nature.webp" alt="A winding stream through Silverwater valley" width="1280" height="720" /><div class="example-caption"><h3>Silverwater valley</h3><span>Nature <span aria-hidden="true">↗</span></span></div><p>Move through the landscape and change the light and wind</p></a>
- <a class="example" href="./film.html"><img src="./previews/film-contact.webp" alt="Scenes from the Oppenheimer 3D trailer study rendered in 67.js" width="1280" height="720" loading="lazy" /><div class="example-caption"><h3>Oppenheimer</h3><span>Short film <span aria-hidden="true">↗</span></span></div><p>Explore a 3D trailer study with an original synthesized score</p></a>
- <a class="example" href="./view2d.html"><img src="./previews/view2d.webp" alt="A flat orbital poster rendered through an orthographic camera" width="960" height="540" loading="lazy" /><div class="example-caption"><h3>Orbital field</h3><span>2D and views <span aria-hidden="true">↗</span></span></div><p>Pan a vector scene or inspect a model from front, right and top</p></a>
- <a class="example" href="./assets.html"><img src="./previews/assets.webp" alt="An imported geometric study displayed in the asset viewer" width="960" height="540" loading="lazy" /><div class="example-caption"><h3>Your models</h3><span>GLB assets <span aria-hidden="true">↗</span></span></div><p>Open a GLB, inspect its materials and sample node animation</p></a>
+ <a class="example" href="./object.html"><img src="./previews/wall-e.webp" alt="WALL·E model rendered in 67.js" width="1280" height="720" loading="lazy" /><div class="example-caption"><h3>WALL·E</h3></div><p>574 parts you can pull apart</p></a>
+ <a class="example" href="./nature.html"><img src="./previews/nature.webp" alt="A winding stream through Silverwater valley" width="1280" height="720" loading="lazy" /><div class="example-caption"><h3>Silverwater valley</h3></div><p>Light, wind and fog in a landscape</p></a>
+ <a class="example" href="./film.html"><img src="./previews/film-contact.webp" alt="Scenes from the Oppenheimer 3D trailer study rendered in 67.js" width="1280" height="720" loading="lazy" /><div class="example-caption"><h3>Oppenheimer</h3></div><p>A short film on one timeline</p></a>
+ <a class="example" href="./modeling.html"><img src="./previews/modeling.webp" alt="A porcelain and brass lantern built with profile, extrusion and curve tools" width="1280" height="720" loading="lazy" /><div class="example-caption"><h3>Aster lantern</h3></div><p>Modeling from profiles and curves</p></a>
+ <a class="example" href="./view2d.html"><img src="./previews/view2d.webp" alt="A flat orbital poster rendered through an orthographic camera" width="960" height="540" loading="lazy" /><div class="example-caption"><h3>Orbital field</h3></div><p>Orthographic and 2D views</p></a>
+ <a class="example" href="./assets.html"><img src="./previews/assets.webp" alt="An imported geometric study displayed in the asset viewer" width="960" height="540" loading="lazy" /><div class="example-caption"><h3>Your models</h3></div><p>Open a GLB and play its clips</p></a>
+ </div>
+ </section>
+
+ <section id="agents" class="agents" aria-labelledby="agents-title">
+ <div class="agents-intro">
+ <h2 id="agents-title">Built for agents</h2>
+ <p>An agent gets a live scene to edit, render and review.</p>
+ <div class="code-block">
+ <pre><code id="home-mcp">npx 67js-mcp --backend gpu --memory 192</code></pre>
+ <button data-copy-code="home-mcp" aria-label="Copy the MCP server command">Copy</button>
+ </div>
+ </div>
+ <div class="agent-cards">
+ <a href="/mcp.md" data-icon="cube"><h3>18 MCP tools</h3><p>Create, edit, undo and render over stdio.</p></a>
+ <a href="/agent-scene.md" data-icon="code"><h3>Scene recipes</h3><p>One JSON file describes a whole scene.</p></a>
+ <a href="/agent-review.md" data-icon="image"><h3>Visual review</h3><p>Compare labeled views from one snapshot.</p></a>
</div>
</section>
+ <section id="documentation" class="documentation-links" aria-labelledby="documentation-title">
+ <h2 id="documentation-title">Documentation</h2>
+ <div class="doc-links">
+ <a href="/docs.html#getting-started" data-icon="book">Getting started</a>
+ <a href="/docs.html#models-and-ai-agents" data-icon="cube">Models and agents</a>
+ <a href="/docs.html#performance-and-memory" data-icon="code">Performance and memory</a>
+ <a href="/changelog.md" data-icon="package">Changelog</a>
+ </div>
+ </section>
</main>
- <footer class="site-footer" aria-label="Site footer">
- <div class="footer-introduction"><a class="brand" href="/" aria-label="67.js home">67<span>.js</span></a><p>Browser 3D, from scene to film.<br>Made by <a href="https://codepawl.com">CodePawl</a>.</p></div>
- <div class="footer-links"><a href="https://github.com/anxuanng/67.js" data-icon="github">GitHub</a><a href="https://www.npmjs.com/package/@codepawlhq/67js"><span class="package-logo package-logo-npm" aria-hidden="true"></span>npm</a><a href="/changelog.md">Changelog</a><a href="/license.txt">MIT license</a><a href="/logo.svg" download>Logo SVG</a></div>
+ <footer class="site-footer" aria-label="Site footer">
+ <div class="footer-introduction"><a class="brand" href="/" aria-label="67.js home">67<span>.js</span></a><p>Made by <a href="https://codepawl.com">CodePawl</a>.</p></div>
+ <div class="footer-links"><a href="https://github.com/anxuanng/67.js"><span class="package-logo package-logo-github" aria-hidden="true"></span>GitHub</a><a href="https://www.npmjs.com/package/@codepawlhq/67js"><span class="package-logo package-logo-npm brand-npm" aria-hidden="true"></span>npm</a><a data-release-commit href="https://github.com/anxuanng/67.js">Release commit</a><a href="/changelog.md">Changelog</a><a href="/license.txt">MIT license</a><a href="/logo.svg" download>Logo SVG</a></div>
</footer>
<script type="module" src="/src/home.js"></script>
</body>
diff --git a/public/logos/github.svg b/public/logos/github.svg
new file mode 100644
index 00000000..23349765
--- /dev/null
+++ b/public/logos/github.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>GitHub</title><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/></svg>
diff --git a/src/home.css b/src/home.css
index 9f2a137b..bb7825f8 100644
--- a/src/home.css
+++ b/src/home.css
@@ -223,3 +223,58 @@ body:has(.navigation) > main { flex:1; width:100%; }
.footer-links a { display:inline-flex; align-items:center; gap:8px; min-height:44px; font-size:13px; }
.footer-links .icon { margin:0; }
@media (max-width:760px) { .site-footer { align-items:flex-start; flex-direction:column; width:calc(100% - 32px); padding:22px; gap:16px; } }
+
+/* Front page: install, code example, capability grid, agent section and documentation links. */
+.package-logo-github { mask-image:url('/logos/github.svg'); }
+.brand-npm { color:#cb3837; }
+.hero { margin-bottom:88px; }
+.hero .live-showcase canvas { height:clamp(340px,34vw,500px); }
+.home-install { margin-bottom:24px; }
+.hero-actions a { display:inline-flex; align-items:center; gap:8px; min-height:44px; }
+.hero-actions .icon { margin:0; }
+.hero-actions .package-logo { width:18px; height:18px; }
+.hero-actions a:first-child { background:var(--text); color:var(--window); }
+.code-section, .examples, .agents, .documentation-links { margin-bottom:88px; }
+.code-section { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr); align-items:center; gap:40px; }
+.code-copy { min-width:0; }
+.code-result { width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; border-radius:var(--panel-radius); border:1px solid var(--border); background:var(--bg); }
+.code-block { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:14px; padding:18px; border-radius:var(--panel-radius); background:var(--bg); }
+.code-block pre { margin:0; overflow-x:auto; font-size:13px; line-height:1.7; color:var(--text); user-select:text; }
+.code-block code { display:block; padding:6px 0; user-select:text; }
+.code-block button { font-size:12px; min-height:36px; padding:6px 12px; }
+.capability-list { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 32px; padding:0; list-style:none; }
+.capability-list li { padding:7px 14px; border-radius:var(--radius); background:var(--surface); color:var(--muted); font-size:13px; }
+.gallery { grid-template-columns:repeat(3,minmax(0,1fr)); gap:36px 24px; }
+.example-caption { margin:14px 0 4px; }
+.example p { font-size:14px; }
+.agents { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:40px; align-items:center; padding:40px; border-radius:var(--panel-radius); background:var(--bg); }
+.agents .code-block { background:var(--window); align-items:center; }
+.agents-intro p { margin-bottom:24px; font-size:16px; }
+.agent-cards { display:grid; gap:12px; }
+.agent-cards a { display:grid; grid-template-columns:auto minmax(0,1fr); column-gap:16px; align-items:center; padding:18px 20px; border-radius:var(--radius); background:var(--surface); }
+.agent-cards a:hover, .doc-links a:hover { background:var(--border); }
+.agent-cards .icon { grid-row:span 2; width:26px; height:26px; margin:0; }
+.agent-cards p { margin:2px 0 0; font-size:14px; }
+.doc-links { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
+.doc-links a { display:flex; align-items:center; gap:12px; min-height:60px; padding:16px 20px; border-radius:var(--radius); background:var(--bg); font-size:15px; }
+.doc-links .icon { margin:0; width:22px; height:22px; }
+@media (max-width:1100px) {
+ .gallery { grid-template-columns:repeat(2,minmax(0,1fr)); }
+ .doc-links { grid-template-columns:repeat(2,minmax(0,1fr)); }
+}
+@media (max-width:960px) {
+ .code-section, .agents { grid-template-columns:1fr; gap:28px; }
+}
+.agents .code-block pre { white-space:pre-wrap; overflow-wrap:anywhere; }
+.introduction p { max-width:680px; text-wrap:balance; }
+.documentation-links { margin-bottom:48px; }
+.preview-assembly { padding-bottom:8px; }
+@media (max-width:760px) {
+ .hero { margin-bottom:64px; }
+ .code-section, .examples, .agents, .documentation-links { margin-bottom:64px; }
+ .gallery, .doc-links { grid-template-columns:1fr; }
+ .agents { padding:22px; }
+ .code-block { padding:14px; }
+ .code-block pre { font-size:12px; }
+ .hero-actions a { padding:10px 14px; }
+}
diff --git a/src/home.js b/src/home.js
index 4fee946c..ebd3314e 100644
--- a/src/home.js
+++ b/src/home.js
@@ -122,6 +122,21 @@ document.querySelectorAll('[data-package-manager]').forEach(button => {
packageControls.push({ name, control });
});
+function mountCodeCopyButton(button) {
+ const source = document.getElementById(button.dataset.copyCode);
+ const control = controls.mountButton(button, { icon:'copy', onClick:async () => {
+ try {
+ await navigator.clipboard.writeText(source.textContent);
+ control.update({ label:'Copied', icon:'check' });
+ setTimeout(() => { control.update({ label:'Copy', icon:'copy' }); }, 2000);
+ } catch {
+ getSelection().selectAllChildren(source);
+ }
+ } });
+}
+
+document.querySelectorAll('[data-copy-code]').forEach(mountCodeCopyButton);
+
document.querySelectorAll('.example img').forEach(image => {
image.addEventListener('error', () => {
image.alt = `${image.alt}. Preview unavailable. Open the example to explore it`;