Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

chore: remove throwaway probe scripts from repo root

nirholasf8420142befa
diff --git a/.probe-wt.mjs b/.probe-wt.mjs
deleted file mode 100644
index 8f81de926..000000000
--- a/.probe-wt.mjs
+++ /dev/null
@@ -1,46 +0,0 @@
-// Scratch probe: dump stable anchor candidates from live three.ws pages.
-import { chromium } from 'playwright';
-
-const BASE = 'https://three.ws';
-const paths = process.argv.slice(2);
-
-const browser = await chromium.launch();
-const ctx = await browser.newContext({ viewport: { width: 1440, height: 900 } });
-const page = await ctx.newPage();
-
-for (const p of paths) {
- try {
- await page.goto(BASE + p, { waitUntil: 'domcontentloaded', timeout: 45000 });
- await page.waitForTimeout(3500);
- const out = await page.evaluate(() => {
- const rows = [];
- const seen = new Set();
- const push = (sel, el) => {
- if (seen.has(sel)) return;
- seen.add(sel);
- const r = el.getBoundingClientRect();
- if (r.width < 24 || r.height < 12) return;
- rows.push({
- sel,
- tag: el.tagName.toLowerCase(),
- text: (el.textContent || '').trim().replace(/\s+/g, ' ').slice(0, 70),
- box: [Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)],
- });
- };
- document.querySelectorAll('[id]').forEach((el) => push('#' + el.id, el));
- document.querySelectorAll('main h1, main h2, main .hero, main section').forEach((el) => {
- if (el.id) return;
- const cls = (el.className || '').toString().trim().split(/\s+/)[0];
- if (cls) push(el.tagName.toLowerCase() + '.' + cls, el);
- });
- return { title: document.title, rows };
- });
- console.log('\n=== ' + p + ' :: ' + out.title + ' ===');
- for (const r of out.rows.slice(0, 60)) {
- console.log(`${r.sel} [${r.box.join(',')}] <${r.tag}> ${r.text}`);
- }
- } catch (e) {
- console.log('\n=== ' + p + ' FAILED: ' + e.message);
- }
-}
-await browser.close();
diff --git a/.reel-probe.mjs b/.reel-probe.mjs
deleted file mode 100644
index f556d0717..000000000
--- a/.reel-probe.mjs
+++ /dev/null
@@ -1,38 +0,0 @@
-import { chromium } from 'playwright';
-const browser = await chromium.launch({ args: ['--use-gl=swiftshader','--enable-unsafe-swiftshader','--ignore-gpu-blocklist'] });
-const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
-page.on('pageerror', e => console.log('pageerror', e.message));
-await page.goto('http://localhost:3000/forge', { waitUntil: 'domcontentloaded' });
-await page.waitForTimeout(3000);
-await page.evaluate(() => document.dispatchEvent(new CustomEvent('forge:open-creation', { detail: { creation: { id:'p', prompt:'probe', glb_url:'https://three.ws/avatars/default.glb', backend:'trellis_selfhost' } } })));
-await page.waitForFunction(() => document.getElementById('viewer')?.loaded === true, null, { timeout: 90000 });
-await page.waitForTimeout(1500);
-const out = await page.evaluate(async () => {
- const v = document.getElementById('viewer');
- const cs = [...v.shadowRoot.querySelectorAll('canvas')]; const c = cs.find(x => x.id === 'webgl-canvas' && x.classList.contains('show')) || cs[0];
- const info = { hasCanvas: !!c, w: c?.width, h: c?.height, hasCapture: typeof c?.captureStream === 'function', mp4: MediaRecorder.isTypeSupported('video/mp4;codecs=avc1.42E01E') };
- if (!c) return info;
- info.results = {};
- for (const mime of ['video/mp4;codecs=avc1.42E01E','video/mp4','video/webm;codecs=vp9','video/webm;codecs=vp8','video/webm']) {
- if (!MediaRecorder.isTypeSupported(mime)) { info.results[mime] = 'unsupported'; continue; }
- const stream = c.captureStream(30);
- const rec = new MediaRecorder(stream, { mimeType: mime, videoBitsPerSecond: 8_000_000 });
- let total = 0; let err = '';
- rec.ondataavailable = e => { total += e.data.size; };
- rec.onerror = e => { err = e.error?.name || 'error'; };
- const done = new Promise(r => rec.onstop = r);
- rec.start(200);
- const t0 = performance.now();
- while (performance.now() - t0 < 900) {
- await new Promise(r => requestAnimationFrame(r));
- const a = (performance.now() - t0) / 900 * 360;
- v.cameraOrbit = `${a}deg 78deg auto`; v.jumpCameraToGoal?.();
- }
- rec.stop(); await done;
- for (const t of stream.getTracks()) t.stop();
- info.results[mime] = err ? `err:${err}` : total;
- }
- return info;
-});
-console.log(JSON.stringify(out, null, 2));
-await browser.close();
diff --git a/.reel-probe2.mjs b/.reel-probe2.mjs
deleted file mode 100644
index ea33dfc06..000000000
--- a/.reel-probe2.mjs
+++ /dev/null
@@ -1,39 +0,0 @@
-import { chromium } from 'playwright';
-const browser = await chromium.launch({ args: ['--use-gl=swiftshader','--enable-unsafe-swiftshader','--ignore-gpu-blocklist'] });
-const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
-await page.goto('http://localhost:3000/forge', { waitUntil: 'domcontentloaded' });
-await page.waitForTimeout(3000);
-await page.evaluate(() => document.dispatchEvent(new CustomEvent('forge:open-creation', { detail: { creation: { id:'p', prompt:'probe', glb_url:'https://three.ws/avatars/default.glb', backend:'trellis_selfhost' } } })));
-await page.waitForFunction(() => document.getElementById('viewer')?.loaded === true, null, { timeout: 90000 });
-await page.waitForTimeout(1500);
-const out = await page.evaluate(async () => {
- const v = document.getElementById('viewer');
- const canvases = [...v.shadowRoot.querySelectorAll('canvas')].map((c, i) => ({
- i, w: c.width, h: c.height, cls: c.className, id: c.id,
- ctx2d: !!c.getContext, parent: c.parentElement?.className,
- style: c.getAttribute('style')?.slice(0, 120) || '',
- }));
- // Also look for a canvas anywhere in the document that three's renderer owns
- const docCanvases = [...document.querySelectorAll('canvas')].map((c,i)=>({i,w:c.width,h:c.height,cls:c.className}));
-
- // Sanity: does MediaRecorder work at all here, on a plain 2D canvas?
- const plain = document.createElement('canvas');
- plain.width = 320; plain.height = 240;
- const ctx = plain.getContext('2d');
- const stream = plain.captureStream(30);
- const rec = new MediaRecorder(stream, { mimeType: 'video/webm;codecs=vp8' });
- let total = 0;
- rec.ondataavailable = e => { total += e.data.size; };
- const done = new Promise(r => rec.onstop = r);
- rec.start(200);
- const t0 = performance.now();
- while (performance.now() - t0 < 900) {
- await new Promise(r => requestAnimationFrame(r));
- ctx.fillStyle = `hsl(${(performance.now()/5)%360} 80% 50%)`;
- ctx.fillRect(0,0,320,240);
- }
- rec.stop(); await done;
- return { canvases, docCanvases, plainCanvasBytes: total };
-});
-console.log(JSON.stringify(out, null, 2));
-await browser.close();
diff --git a/.reel-probe3.mjs b/.reel-probe3.mjs
deleted file mode 100644
index 344e41385..000000000
--- a/.reel-probe3.mjs
+++ /dev/null
@@ -1,37 +0,0 @@
-import { chromium } from 'playwright';
-const browser = await chromium.launch({ args: ['--use-gl=swiftshader','--enable-unsafe-swiftshader','--ignore-gpu-blocklist'] });
-const page = await browser.newPage();
-await page.goto('http://localhost:3000/forge', { waitUntil: 'domcontentloaded' });
-const out = await page.evaluate(async () => {
- async function capture(kind) {
- const c = document.createElement('canvas');
- c.width = 320; c.height = 240; document.body.appendChild(c);
- let draw;
- if (kind === '2d') {
- const ctx = c.getContext('2d');
- draw = (t) => { ctx.fillStyle = `hsl(${t%360} 80% 50%)`; ctx.fillRect(0,0,320,240); };
- } else {
- const gl = c.getContext('webgl2') || c.getContext('webgl');
- if (!gl) return { kind, error: 'no webgl' };
- draw = (t) => { gl.clearColor((t%100)/100, 0.3, 0.7, 1); gl.clear(gl.COLOR_BUFFER_BIT); };
- }
- const stream = c.captureStream(30);
- const rec = new MediaRecorder(stream, { mimeType: 'video/webm;codecs=vp8' });
- let total = 0;
- rec.ondataavailable = e => { total += e.data.size; };
- const done = new Promise(r => rec.onstop = r);
- rec.start(200);
- const t0 = performance.now();
- while (performance.now() - t0 < 1200) {
- await new Promise(r => requestAnimationFrame(r));
- draw(performance.now() - t0);
- }
- rec.stop(); await done;
- for (const t of stream.getTracks()) t.stop();
- c.remove();
- return { kind, total };
- }
- return [await capture('2d'), await capture('webgl')];
-});
-console.log(JSON.stringify(out, null, 2));
-await browser.close();
diff --git a/.reel-verify.mjs b/.reel-verify.mjs
deleted file mode 100644
index b7b3bec6c..000000000
--- a/.reel-verify.mjs
+++ /dev/null
@@ -1,125 +0,0 @@
-// Real-browser verification of Forge Reel: load /forge, drop a real model into
-// the result viewer, open the Reel dialog, record an actual reel, and assert
-// the produced files are real bytes of the right type.
-import { chromium } from 'playwright';
-import { mkdirSync, writeFileSync } from 'node:fs';
-
-const OUT = '/tmp/claude-1000/-workspaces-three-ws/54abdcf2-c800-40d7-8c4b-205b55327f21/scratchpad/reel-shots';
-mkdirSync(OUT, { recursive: true });
-
-const errors = [];
-const browser = await chromium.launch({
- args: ['--use-gl=swiftshader', '--enable-unsafe-swiftshader', '--ignore-gpu-blocklist'],
-});
-const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
-page.on('console', (m) => {
- if (m.type() === 'error') errors.push(m.text());
-});
-page.on('pageerror', (e) => errors.push(`pageerror: ${e.message}`));
-
-await page.goto('http://localhost:3000/forge', { waitUntil: 'domcontentloaded' });
-await page.waitForTimeout(3000);
-
-// Put a real GLB in the result viewer through the page's own hook.
-await page.evaluate(() => {
- document.dispatchEvent(
- new CustomEvent('forge:open-creation', {
- detail: {
- creation: {
- id: 'verify-reel',
- prompt: 'a brass lantern',
- glb_url: 'https://three.ws/avatars/default.glb',
- backend: 'trellis_selfhost',
- },
- },
- }),
- );
-});
-
-await page.waitForSelector('#viewer[src]', { timeout: 20000 });
-await page.waitForFunction(() => document.getElementById('viewer')?.loaded === true, {
- timeout: 60000,
-});
-await page.waitForTimeout(1500);
-await page.screenshot({ path: `${OUT}/01-result.png` });
-
-const triggerVisible = await page.isVisible('#reel-open');
-console.log('reel trigger visible:', triggerVisible);
-
-await page.click('#reel-open');
-await page.waitForTimeout(500);
-await page.screenshot({ path: `${OUT}/02-dialog.png` });
-
-console.log('summary:', await page.textContent('.reel-summary'));
-
-// Shortest reel so verification stays quick.
-await page.click('.reel-durations .reel-chip[data-id="4"]');
-await page.click('.reel-start');
-await page.waitForTimeout(1800);
-await page.screenshot({ path: `${OUT}/03-recording.png` });
-
-await page.waitForSelector('.reel-done:not([hidden]) .reel-file, .reel-fallback:not([hidden]) .reel-file', {
- timeout: 60000,
-});
-await page.waitForTimeout(800);
-await page.screenshot({ path: `${OUT}/04-done.png` });
-
-// Pull the real bytes back out and write them to disk so the files can be
-// inspected outside the browser.
-const files = await page.evaluate(async () => {
- const rows = [...document.querySelectorAll('.reel-file')];
- const out = [];
- for (const row of rows) {
- const blob = await (await fetch(row.href)).blob();
- const buf = new Uint8Array(await blob.arrayBuffer());
- out.push({
- name: row.download,
- type: blob.type,
- size: blob.size,
- head: [...buf.slice(0, 16)],
- b64: btoa(String.fromCharCode(...buf.slice(0, 3_000_000))),
- });
- }
- return out;
-});
-
-for (const f of files) {
- writeFileSync(`${OUT}/${f.name}`, Buffer.from(f.b64, 'base64'));
- console.log(`file ${f.name} type=${f.type} size=${f.size}`);
-}
-
-// The stage must have been handed back: camera controls restored, no leftover
-// fixed positioning, no leftover backdrop.
-const restored = await page.evaluate(() => {
- const shell = document.getElementById('viewer-shell');
- const viewer = document.getElementById('viewer');
- return {
- stageClass: shell.classList.contains('is-reel-stage'),
- bodyClass: document.body.classList.contains('forge-reel-capturing'),
- cameraControls: viewer.hasAttribute('camera-controls'),
- autoRotate: viewer.hasAttribute('auto-rotate'),
- shellPosition: getComputedStyle(shell).position,
- };
-});
-console.log('restored:', JSON.stringify(restored));
-
-// Close with Escape, then confirm the keyboard shortcut reopens it.
-await page.keyboard.press('Escape');
-await page.waitForTimeout(400);
-console.log('closed after Esc:', !(await page.isVisible('.reel-panel')));
-await page.keyboard.press('r');
-await page.waitForTimeout(400);
-console.log('reopened with R:', await page.isVisible('.reel-panel'));
-await page.keyboard.press('Escape');
-
-// Narrow viewport: the dialog and the stage must both fit.
-await page.setViewportSize({ width: 320, height: 720 });
-await page.waitForTimeout(400);
-await page.click('#reel-open');
-await page.waitForTimeout(400);
-await page.screenshot({ path: `${OUT}/05-320.png` });
-const overflow = await page.evaluate(() => document.documentElement.scrollWidth > window.innerWidth + 1);
-console.log('320px horizontal overflow:', overflow);
-
-console.log('console errors:', JSON.stringify(errors, null, 2));
-await browser.close();