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.

Home forge controls, selfie face-geometry morph, and LLM/i18n updates

nirholas25cfb8a599ee
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 541733cc5..2ecd9a127 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -50,8 +50,9 @@ Public history for [three.ws](https://three.ws), newest first. New pages come fr
- **Share a model, and whoever opens the link builds their own** — Forge something you like and hit Share: you now get a remix link. When a friend opens it, the homepage loads with your prompt already in the forge bar and starts building their own version on arrival, no typing and no sign-up. Any link of the form three.ws/?prompt=your idea works the same way, so you can hand-craft or bookmark them too. It turns every creation into an invitation: make something, share it, and the next person is one glance away from making their own. (The Open in Scene action still links your exact finished model.) `[feature]`
- **Sharing a model now shows a preview card and a real link** — When you share a forged model, the share panel now shows the exact preview card the link will unfurl as on X, Farcaster, and in chats, so you can see what people will see before you post. Every share is now a real permalink to your model with that card, instead of sometimes falling back to a generic link. Models forged right on the homepage are shareable the same way. (`/forge`) `[improvement]`
- **Sharper, cleaner models from photos** — Four upgrades to photo-to-3D landed together. Uploaded photos now have their background cleanly removed before reconstruction, so a busy backdrop no longer bleeds into the model. You can supply up to 6 reference angles instead of 4 for fuller coverage. Every uploaded angle is now quality-checked, and a blurry or off-subject one is dropped instead of corrupting the result. And every finished model runs through an automatic geometry cleanup pass that welds and de-duplicates the mesh and trims redundant triangles, so models load faster and render cleaner with no loss of detail. (`/image-to-3d`) `[improvement, feature]`
-- **The 3D world no longer stays blurry after a slow moment** — The world automatically lowers render detail if frames get choppy (loading a crowded plaza, a browser tab hiccup, a background sync). Until now it could only step down and never recovered, so a single rough moment left the 3D permanently soft on high-resolution screens while the interface on top stayed sharp. It now climbs back up to your device's full sharpness once frames are smooth again, so a brief hitch no longer costs you clarity for the rest of the session. `[fix, improvement]`
+- **The 3D world looks sharper and shows more of the plaza** — Two fixes to how the world renders. First, sharpness: the world lowers render detail when frames get choppy (loading a crowded plaza, a tab hiccup, a background sync), but it could only ever step down and never recovered, so a single rough moment left the 3D permanently soft on high-resolution screens while the interface on top stayed crisp. It now climbs back to your device's full sharpness once frames are smooth again, and it re-tunes automatically when you drag the window between a laptop screen and an external monitor. Second, framing: the follow camera was zoomed in tight, cropping the totem and side screens at the edges. It now uses a wider lens so you see more of the plaza and the crowd around you at once. (`/play`) `[fix, improvement]`
- **The agent-to-agent payment economy runs far cheaper and now cycles hundreds of distinct payers** — Two improvements to the closed-loop x402 agent economy that dogfoods every paid endpoint on the platform. First, a fix: a background wallet-consolidation job was quietly closing the ring's payment account after every settlement, forcing the next one to recreate it and pay account rent each time. That single bug had pushed the real fee cost to roughly a hundred times where it should be. With it fixed and single-signature settlement turned on, each settlement is back to the network floor of a few thousandths of a cent, and the ring's working balance stays in the loop instead of leaking away. Second, a new capability: the ring can now cycle payments through a reusable pool of hundreds to a thousand distinct wallets instead of one, so the economy reads as many participants rather than a single account, with no extra cost per payment. The pool is off until funded and activated, and every wallet in it stays clearly labeled internal dogfooding, not organic demand. (`/admin/ring`) `[fix, improvement, infra]`
+- **The autonomous-trading scoreboard now counts only real on-chain trades** — The homepage's live trading panel promises "real positions, no simulation" — so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands. `[fix, improvement]`
- **The avatar shop and animation bazaar are now discoverable by paying agents** — Two paid endpoints, the premium cosmetic shop and the animation download bazaar, were being skipped during automated x402 discovery: a probe that arrived without a specific item id got a 400/404 before the payment layer could answer, so directory crawlers read them as "not a paid endpoint" and never listed them. They now return a proper payment challenge to any credential-less probe, so agents can find them, see the price, and pay, while real buyers still get precise errors for a missing or unknown item. `[fix]`
- **The homepage AR showcase leads with the best models, and its QR places the exact one you see** — The "Your 3D agent, in your room" section on the homepage now pulls from the top-voted community Forge gallery instead of a random newest-first bucket, so the model you land on is one of the best the community made, not a half-formed generation. And the desktop QR code finally keeps its promise: scanning it opens the exact model on screen in the AR studio and drops it into your space, instead of dumping you on a generic page. (`/`) `[fix]`
- **The homepage community feed is now a live, browsable loop** — The strip of community models on the homepage used to be a fixed set of six. It is now a live feed you can actually browse: switch between Fresh and Trending, and press Show more to see more. New models made by anyone appear at the top on their own while you watch, with a live indicator so Right now stays honest. Each card still spins the real 3D model and opens it when clicked. (`/`) `[feature, improvement]`
diff --git a/api/_lib/watsonx.js b/api/_lib/watsonx.js
index 2cf33f573..3ad057b00 100644
--- a/api/_lib/watsonx.js
+++ b/api/_lib/watsonx.js
@@ -197,7 +197,7 @@ export async function watsonxChatComplete(cfg, { messages, model, maxTokens, tem
} catch (err) {
const fallback = await graniteOpenRouterFallback({ messages, maxTokens, temperature });
if (fallback) {
- console.warn(`[watsonx] chat failed, served via OpenRouter Granite: ${err.message}`);
+ console.warn(`[watsonx] chat failed, served via OpenRouter (${fallback.model}): ${err.message}`);
return fallback;
}
throw err;
@@ -216,7 +216,16 @@ async function graniteOpenRouterFallback({ messages, maxTokens, temperature }) {
...(process.env.OPENROUTER_FALLBACK_KEYS || '').split(',').map((k) => k.trim()),
].filter(Boolean);
if (!keys.length) return null;
- const model = process.env.OPENROUTER_GRANITE_MODEL?.trim() || 'ibm-granite/granite-4.1-8b';
+ // Vision reads (ibm/vision.js) send multimodal messages — an array content
+ // block with an image_url. OpenRouter has no Granite-vision model, and the
+ // text Granite model can't see the image, so route those to a vision-capable
+ // model instead. Plain text completions keep using Granite (same family).
+ const isMultimodal = (messages || []).some(
+ (m) => Array.isArray(m?.content) && m.content.some((p) => p?.type === 'image_url'),
+ );
+ const model = isMultimodal
+ ? process.env.OPENROUTER_VISION_MODEL?.trim() || 'google/gemini-2.5-flash'
+ : process.env.OPENROUTER_GRANITE_MODEL?.trim() || 'ibm-granite/granite-4.1-8b';
for (const key of [...new Set(keys)]) {
try {
const res = await fetch('https://openrouter.ai/api/v1/chat/completions', {
diff --git a/api/brain/chat.js b/api/brain/chat.js
index 6d4d902f6..646a134f9 100644
--- a/api/brain/chat.js
+++ b/api/brain/chat.js
@@ -307,6 +307,10 @@ const PROVIDERS = {
maxOutput: 4096,
description: 'IBM’s open, enterprise-governed foundation model on watsonx.ai.',
watsonx: true,
+ // Same Granite family hosted on OpenRouter — the same-model backstop when
+ // watsonx drops a request, and the primary lane when watsonx creds are
+ // absent entirely (so Granite stays selectable without an IBM account).
+ openrouterModel: 'ibm-granite/granite-4.1-8b',
},
// ── Google Vertex AI — first-party Claude billed to GCP credits ──────────────
@@ -424,7 +428,10 @@ function openrouterKeys() {
// records which path won so buildFallback() knows whether OpenRouter is a
// distinct escape hatch.
function buildPrimary(spec) {
- if (spec.watsonx) return watsonxConfig().configured ? { kind: 'watsonx' } : null;
+ // watsonx leads when its creds are present; otherwise fall through so a
+ // Granite spec with an openrouterModel still resolves (OpenRouter-hosted
+ // Granite becomes the primary lane instead of showing unavailable).
+ if (spec.watsonx && watsonxConfig().configured) return { kind: 'watsonx' };
// Vertex-served Claude — routed through the shared vertex-claude transport
// (not an AI SDK model object), so it reports availability here and streams
// via streamVertex() in streamBrain(). Requires the GCP project to be set.
@@ -442,7 +449,12 @@ function buildPrimary(spec) {
// outage (quota exhausted, out of credits, rate-limited). When the primary was
// already OpenRouter the free-tier safety net (freeFallbackChain) is the next stop.
function buildFallback(spec, primary) {
- if (primary?.via !== 'native' || !spec.openrouterModel || !openrouterKeys().length) return null;
+ if (!spec.openrouterModel || !openrouterKeys().length) return null;
+ // The mirror routes around a native/watsonx/vertex outage on the SAME model
+ // via OpenRouter. Skip it only when the primary ALREADY ran on OpenRouter —
+ // the mirror would be the identical key+model and the free-tier chain is the
+ // meaningful next stop.
+ if (primary?.via === 'openrouter') return null;
return openrouter()(spec.openrouterModel);
}
diff --git a/api/home-stats.js b/api/home-stats.js
index 8fc11a836..18874aac6 100644
--- a/api/home-stats.js
+++ b/api/home-stats.js
@@ -23,12 +23,13 @@ export default wrap(async (req, res) => {
if (!rl.success) return rateLimited(res, rl);
try {
- const [agentsRow, onchainRow, widgetsRow, chainsRow, attRow] = await Promise.all([
+ const [agentsRow, onchainRow, widgetsRow, chainsRow, attRow, forgeRow] = await Promise.all([
sql`SELECT COUNT(*)::int AS n FROM agent_identities WHERE deleted_at IS NULL`,
sql`SELECT COUNT(*)::int AS n FROM erc8004_agents_index WHERE active = true`,
sql`SELECT COUNT(*)::int AS n FROM widgets WHERE deleted_at IS NULL`,
sql`SELECT COUNT(DISTINCT chain_id)::int AS n FROM erc8004_agents_index WHERE active = true`,
sql`SELECT COUNT(*)::int AS n FROM solana_attestations`,
+ sql`SELECT COUNT(*)::int AS n FROM forge_creations WHERE status = 'done' AND glb_url IS NOT NULL AND (outcome IS NULL OR outcome != 'rejected')`,
]);
const stats = {
@@ -38,6 +39,7 @@ export default wrap(async (req, res) => {
widgets: widgetsRow[0]?.n ?? 0,
chains: chainsRow[0]?.n ?? 0,
attestations: attRow[0]?.n ?? 0,
+ forge_models: forgeRow[0]?.n ?? 0,
updated_at: new Date().toISOString(),
};
diff --git a/api/ibm/vision.js b/api/ibm/vision.js
index 9f84a2d77..1d68f75d1 100644
--- a/api/ibm/vision.js
+++ b/api/ibm/vision.js
@@ -152,13 +152,20 @@ async function handleSubjects(req, res) {
async function handleVision(req, res) {
const cfg = watsonxConfig();
- if (!cfg.configured) {
+ // Granite Vision leads on watsonx, but a vision-capable OpenRouter model is a
+ // full backstop (watsonxChatComplete falls over to it). So the endpoint is
+ // available when EITHER watsonx is configured OR an OpenRouter key is set —
+ // only both-absent is a true 503.
+ const openrouterAvailable = Boolean(
+ process.env.OPENROUTER_API_KEY?.trim() || (process.env.OPENROUTER_FALLBACK_KEYS || '').trim(),
+ );
+ if (!cfg.configured && !openrouterAvailable) {
return error(
res,
503,
'watsonx_unavailable',
'IBM Granite Vision runs on watsonx.ai. Set WATSONX_API_KEY and WATSONX_PROJECT_ID ' +
- '(or WATSONX_SPACE_ID) to let Granite see your avatar.',
+ '(or WATSONX_SPACE_ID), or an OPENROUTER_API_KEY backstop, to read an image.',
);
}
diff --git a/api/pulse.js b/api/pulse.js
index a1a0901d4..77ca7ba2e 100644
--- a/api/pulse.js
+++ b/api/pulse.js
@@ -974,7 +974,13 @@ export default async function handler(req, res) {
// shield the DB from a thundering herd of pollers.
const isFirstGlobalPage = !cursor && !since && !agentId;
if (isFirstGlobalPage) {
- const cacheKey = `pulse:feed:${network}:${type}`;
+ // `limit` is part of the cache key: handleFeed returns exactly `limit` rows
+ // (plus has_more / next_cursor computed from it), so two callers asking for
+ // different page sizes must NOT share a cached body. Omitting it let a
+ // limit=1 self-heal probe poison the shared feed page with a 1-row body.
+ // Clamp identically to handleFeed so the key matches the body it produced.
+ const limit = Math.min(MAX_LIMIT, Math.max(1, Number(url.searchParams.get('limit')) || 30));
+ const cacheKey = `pulse:feed:${network}:${type}:${limit}`;
let body = await cacheGet(cacheKey);
if (body === null) {
body = await handleFeed(req, res, { network, type, agentId, cursor, since });
diff --git a/api/sniper/leaderboard.js b/api/sniper/leaderboard.js
index cfc487516..bafbf4e12 100644
--- a/api/sniper/leaderboard.js
+++ b/api/sniper/leaderboard.js
@@ -12,6 +12,15 @@
*
* Backward-compatible: every field the arena already reads is still present; the
* board rows are now a SUPERSET (win_rate, score, verified, roi_pct, drawdown, …).
+ *
+ * Also returns `real_stats`: an all-time, on-chain-ONLY aggregate over
+ * agent_sniper_positions (buy_sig present and not the 'SIMULATED' sentinel). It
+ * powers the homepage "real positions · no simulation" scoreboard, which must
+ * never count paper fills the engine writes in simulate mode. Shape:
+ * { closed, wins, losses, win_rate, open, best_realized_pct,
+ * best_realized_multiple, best_peak_multiple, realized_pnl_sol }
+ * This is deliberately separate from the trader-stats board rows, which include
+ * paper fills so an agent's track record stays continuous across practice runs.
*/
import { cors, json, method, wrap, rateLimited } from '../_lib/http.js';
@@ -86,7 +95,7 @@ export default wrap(async (req, res) => {
const sort = LEADERBOARD_SORTS.has(params.get('sort')) ? params.get('sort') : 'score';
const verifiedOnly = params.get('verified') === '1' || params.get('verified') === 'true';
- const [boardResult, recent, open] = await Promise.all([
+ const [boardResult, recent, open, realAgg] = await Promise.all([
getLeaderboard({ network, window, sort, verifiedOnly, limit: 100 }),
sql`
select p.id, p.agent_id, a.name as agent_name, p.mint, p.symbol, p.name,
@@ -108,8 +117,46 @@ export default wrap(async (req, res) => {
order by p.opened_at desc
limit 50
`,
+ // Real, on-chain-only aggregate. A position counts here ONLY if it landed a
+ // genuine broadcast signature (buy_sig present and not the 'SIMULATED'
+ // sentinel simulate-mode writes) — so the homepage "no simulation" scoreboard
+ // can never inflate itself with paper fills. All-time, network-scoped.
+ sql`
+ select
+ count(*) filter (where status = 'closed') as real_closed,
+ count(*) filter (where status = 'closed' and realized_pnl_lamports > 0) as real_wins,
+ count(*) filter (where status = 'open') as real_open,
+ max(realized_pnl_pct) filter (where status = 'closed') as best_realized_pct,
+ max((peak_value_lamports::numeric) / nullif(entry_quote_lamports, 0))
+ filter (where peak_value_lamports is not null and entry_quote_lamports > 0) as best_peak_multiple,
+ coalesce(sum(realized_pnl_lamports) filter (where status = 'closed'), 0) as realized_pnl_lamports
+ from agent_sniper_positions
+ where network = ${network}
+ and buy_sig is not null and buy_sig <> 'SIMULATED'
+ `.catch(() => [{}]),
]);
+ // Real-trade scoreboard (on-chain fills only). Powers the homepage KPIs that
+ // claim "real positions · no simulation" — kept structurally separate from the
+ // trader-stats board (which includes paper fills for track-record continuity).
+ const ra = realAgg[0] || {};
+ const realClosed = Number(ra.real_closed) || 0;
+ const realWins = Number(ra.real_wins) || 0;
+ const bestPeak = ra.best_peak_multiple != null ? Number(ra.best_peak_multiple) : null;
+ const bestRealizedPct = ra.best_realized_pct != null ? Number(ra.best_realized_pct) : null;
+ const real_stats = {
+ closed: realClosed,
+ wins: realWins,
+ losses: Math.max(0, realClosed - realWins),
+ win_rate: realClosed > 0 ? Math.round((realWins / realClosed) * 100) : null,
+ open: Number(ra.real_open) || 0,
+ best_realized_pct: bestRealizedPct,
+ best_realized_multiple: bestRealizedPct != null ? Number((1 + bestRealizedPct / 100).toFixed(2)) : null,
+ best_peak_multiple: bestPeak != null ? Number(bestPeak.toFixed(2)) : null,
+ realized_pnl_sol: ra.realized_pnl_lamports != null
+ ? Number((Number(BigInt(ra.realized_pnl_lamports)) / 1e9).toFixed(6)) : 0,
+ };
+
const trades = recent.map((t) => ({
id: t.id,
agent_id: t.agent_id,
@@ -162,6 +209,7 @@ export default wrap(async (req, res) => {
source,
sol_usd: boardResult.sol_usd,
leaderboard: boardResult.leaderboard,
+ real_stats,
live_traders: live,
live_window: source === 'live' ? (KOL_WINDOW[window] || '7d') : null,
trades,
diff --git a/data/changelog.json b/data/changelog.json
index c254bea88..ed6da0a4b 100644
--- a/data/changelog.json
+++ b/data/changelog.json
@@ -3,13 +3,23 @@
"entries": [
{
"date": "2026-07-17",
- "title": "The 3D world no longer stays blurry after a slow moment",
- "summary": "The world automatically lowers render detail if frames get choppy (loading a crowded plaza, a browser tab hiccup, a background sync). Until now it could only step down and never recovered, so a single rough moment left the 3D permanently soft on high-resolution screens while the interface on top stayed sharp. It now climbs back up to your device's full sharpness once frames are smooth again, so a brief hitch no longer costs you clarity for the rest of the session.",
+ "title": "The autonomous-trading scoreboard now counts only real on-chain trades",
+ "summary": "The homepage's live trading panel promises \"real positions, no simulation\" — so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands.",
"tags": [
"fix",
"improvement"
]
},
+ {
+ "date": "2026-07-17",
+ "title": "The 3D world looks sharper and shows more of the plaza",
+ "summary": "Two fixes to how the world renders. First, sharpness: the world lowers render detail when frames get choppy (loading a crowded plaza, a tab hiccup, a background sync), but it could only ever step down and never recovered, so a single rough moment left the 3D permanently soft on high-resolution screens while the interface on top stayed crisp. It now climbs back to your device's full sharpness once frames are smooth again, and it re-tunes automatically when you drag the window between a laptop screen and an external monitor. Second, framing: the follow camera was zoomed in tight, cropping the totem and side screens at the edges. It now uses a wider lens so you see more of the plaza and the crowd around you at once.",
+ "tags": [
+ "fix",
+ "improvement"
+ ],
+ "link": "/play"
+ },
{
"date": "2026-07-17",
"title": "Granite-powered features stay up during an IBM outage",
diff --git a/pages/home.html b/pages/home.html
index fe6e99d96..3e2b6d077 100644
--- a/pages/home.html
+++ b/pages/home.html
@@ -2523,6 +2523,26 @@
}
.har-nav-btn:hover { color: #fff; background: rgba(255,255,255,.08); }
.har-prompt { font-size: 11px; color: rgba(255,255,255,.5); font-family: var(--font-mono); max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
+ .har-cat {
+ position: absolute; top: 14px; left: 14px; z-index: 2;
+ font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
+ color: rgba(255,255,255,.7); background: rgba(0,0,0,.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
+ border: 1px solid rgba(255,255,255,.1); border-radius: 999px; padding: 4px 9px;
+ opacity: 0; transition: opacity .3s ease;
+ }
+ .har-cat[data-shown="1"] { opacity: 1; }
+ .har-count { font-size: 13px; color: var(--text-3); margin: 10px 0 0; min-height: 18px; opacity: 0; transition: opacity .4s ease; }
+ .har-count[data-shown="1"] { opacity: 1; }
+ .har-count b { color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 600; }
+ .har-count .har-dot-live { display: inline-block; width: 6px; height: 6px; border-radius: 999px; background: #34d399; margin-right: 6px; vertical-align: middle; box-shadow: 0 0 0 0 rgba(52,211,153,.5); animation: har-pulse 2.4s ease-out infinite; }
+ @keyframes har-pulse { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.5); } 70% { box-shadow: 0 0 0 6px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
+ @media (prefers-reduced-motion: reduce) { .har-count .har-dot-live { animation: none; } }
+ .har-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; }
+ .har-empty p { color: var(--text-3); font-size: 14px; margin: 0; max-width: 240px; line-height: 1.5; }
+ .har-empty a { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: #000; font-weight: 600; font-size: 13px; padding: 9px 16px; border-radius: 999px; text-decoration: none; transition: transform .15s, box-shadow .15s; }
+ .har-empty a:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(255,255,255,.14); }
+ #home-ar .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
+ .har-viewer-wrap:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.har-dots { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 2; }
.har-dot { width: 6px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.25); border: none; padding: 0; cursor: pointer; transition: background .2s, transform .2s; }
.har-dot:hover { background: rgba(255,255,255,.5); }
@@ -2732,7 +2752,7 @@
<div class="hf-telemetry" aria-live="polite">
<span data-hf-tel-state data-i18n="home.standby">standby</span>
<span class="hf-elapsed" data-hf-elapsed></span>
- <span data-i18n="home.standard_free_lane">standard &middot; free lane</span>
+ <span data-hf-lane-label data-i18n="home.standard_free_lane">standard &middot; free lane</span>
</div>
<!-- Session history — real captured frames of models you forged here,
@@ -2843,19 +2863,56 @@
<form class="hf-dock" data-hf-form autocomplete="off">
<div class="hf-chips" data-hf-chips role="group" aria-label="Example prompts">
+ <button type="button" class="hf-chip hf-chip--surprise" data-hf-surprise title="Roll a fresh prompt" aria-label="Surprise me with a prompt" data-i18n-attr="aria-label:home.surprise_me_arialabel;title:home.surprise_title"><span class="hf-chip-ico" aria-hidden="true">&#9860;</span><span data-i18n="home.surprise">Surprise</span></button>
<button type="button" class="hf-chip" data-prompt="a low-poly red fox, sitting" data-i18n="home.low_poly_fox">low-poly fox</button>
<button type="button" class="hf-chip" data-prompt="a sci-fi combat helmet, brushed metal" data-i18n="home.sci_fi_helmet">sci-fi helmet</button>
<button type="button" class="hf-chip" data-prompt="a potted monstera plant" data-i18n="home.monstera_plant">monstera plant</button>
<button type="button" class="hf-chip" data-prompt="a vintage film camera" data-i18n="home.film_camera">film camera</button>
</div>
+
+ <!-- Options disclosure — the full-Forge brains (quality tier, engine lane,
+ aspect, BYOK, $THREE High gate), kept collapsed so the default chamber
+ stays the minimal bar. Buttons inside are built at runtime from
+ /api/forge?catalog + ?health by src/home-forge-controls.js. -->
+ <div class="hf-panel" id="hf-panel" data-hf-panel hidden>
+ <div class="hf-panel-row">
+ <span class="hf-panel-label" data-i18n="home.quality">Quality</span>
+ <div class="hf-seg" data-hf-tier role="group" aria-label="Quality tier"></div>
+ </div>
+ <div class="hf-panel-row">
+ <span class="hf-panel-label" data-i18n="home.engine">Engine</span>
+ <div class="hf-engine" data-hf-engine role="group" aria-label="Generation engine"></div>
+ </div>
+ <div class="hf-panel-row" data-hf-aspect-row>
+ <span class="hf-panel-label" data-i18n="home.frame">Frame</span>
+ <div class="hf-seg" data-hf-aspect role="group" aria-label="Aspect ratio"></div>
+ </div>
+ <div class="hf-byok" data-hf-byok hidden>
+ <label class="hf-byok-label" for="hf-byok-key"><span data-hf-byok-label data-i18n="home.provider_key">Provider key</span></label>
+ <input id="hf-byok-key" class="hf-byok-key" data-hf-byok-key type="password" autocomplete="off" spellcheck="false" placeholder="Your API key (kept in this browser)" />
+ <p class="hf-byok-hint" data-hf-byok-hint></p>
+ </div>
+ <div class="hf-lock" data-hf-lock hidden></div>
+ <p class="hf-perk" data-hf-perk hidden></p>
+ </div>
+
<div class="hf-bar">
<span class="hf-bar-glyph" aria-hidden="true">&#9670;</span>
<label class="sr-only" for="hf-prompt-input" data-i18n="home.describe_the_object_to_generate">Describe the object to generate</label>
<textarea id="hf-prompt-input" class="hf-prompt" data-hf-prompt rows="1" maxlength="1000" placeholder="describe an object&hellip;"></textarea>
+ <button type="button" class="hf-icon-mini" data-hf-enhance title="Enhance the prompt (art-director rewrite)" aria-label="Enhance the prompt" data-i18n-attr="aria-label:home.enhance_the_prompt_arialabel;title:home.enhance_title">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="m12 3 1.9 4.6L18.5 9.5 13.9 11.4 12 16l-1.9-4.6L5.5 9.5l4.6-1.9z"/><path d="M19 15l.6 1.6 1.6.6-1.6.6L19 20l-.6-1.6-1.6-.6 1.6-.6z"/></svg>
+ </button>
<span class="hf-kbd" aria-hidden="true">&#8984;&#9166;</span>
<button class="hf-forge-btn" data-hf-generate type="submit" data-i18n-html="home.forge_2"><span data-hf-generate-label>Forge</span></button>
</div>
- <p class="hf-dock-note" data-i18n-html="home.free_no_sign_up_lands_in_your">Free &middot; no sign-up &middot; lands in your full Forge gallery on this device &middot; <a href="/forge">open the full Forge &rarr;</a></p>
+ <div class="hf-dock-meta">
+ <button type="button" class="hf-opts-toggle" data-hf-opts aria-expanded="false" aria-controls="hf-panel">
+ <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M4 6h16"/><path d="M4 12h16"/><path d="M4 18h16"/><circle cx="9" cy="6" r="2" fill="var(--bg,#000)"/><circle cx="15" cy="12" r="2" fill="var(--bg,#000)"/><circle cx="9" cy="18" r="2" fill="var(--bg,#000)"/></svg>
+ <span data-i18n="home.options">Options</span>
+ </button>
+ <p class="hf-dock-note" data-i18n-html="home.free_no_sign_up_lands_in_your">Free &middot; no sign-up &middot; lands in your full Forge gallery on this device &middot; <a href="/forge">open the full Forge &rarr;</a></p>
+ </div>
</form>
</div>
</div>
@@ -4306,11 +4363,109 @@
#home-forge .hf-forge-btn:active { transform: translateY(1px); }
#home-forge .hf-forge-btn:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
#home-forge .hf-forge-btn[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
+ #home-forge .hf-dock-meta { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
#home-forge .hf-dock-note { font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.04em; color: var(--text-3); margin: 0; text-align: center; }
#home-forge .hf-dock-note a { color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--hairline-strong); }
#home-forge .hf-dock-note a:hover { color: var(--text); }
#home-forge .hf-dock-note a:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
+ /* ── Forge controls: Surprise chip, Enhance button, Options panel ──────
+ The full-Forge brains layered onto the chamber. Kept visually quiet so
+ the default (collapsed) chamber still reads as the minimal bar. */
+ #home-forge .hf-chip--surprise { color: var(--text); border-color: var(--hairline-strong); background: rgba(139, 92, 246, 0.08); }
+ #home-forge .hf-chip--surprise:hover { background: rgba(139, 92, 246, 0.16); border-color: rgba(139, 92, 246, 0.5); }
+ #home-forge .hf-chip .hf-chip-ico { margin-right: 5px; opacity: 0.85; }
+
+ /* Enhance — small icon button inside the bar, left of the Forge button. */
+ #home-forge .hf-icon-mini {
+ flex: none; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
+ border-radius: 8px; border: 1px solid var(--hairline-strong); background: rgba(14, 14, 18, 0.5);
+ color: var(--text-3); cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease, transform .15s ease;
+ }
+ #home-forge .hf-icon-mini svg { width: 16px; height: 16px; }
+ #home-forge .hf-icon-mini:hover { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.5); background: rgba(139, 92, 246, 0.1); transform: translateY(-1px); }
+ #home-forge .hf-icon-mini:active { transform: translateY(0); }
+ #home-forge .hf-icon-mini:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
+ #home-forge .hf-icon-mini[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
+ #home-forge .hf-icon-mini.is-working { color: #c4b5fd; border-color: rgba(139, 92, 246, 0.5); }
+ #home-forge .hf-icon-mini.is-working svg { animation: hf-spin 0.9s linear infinite; }
+ @keyframes hf-spin { to { transform: rotate(360deg); } }
+
+ /* Options toggle. */
+ #home-forge .hf-opts-toggle {
+ display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 11px;
+ letter-spacing: 0.04em; padding: 5px 11px; border-radius: 999px; cursor: pointer;
+ border: 1px solid var(--hairline-strong); background: rgba(14, 14, 18, 0.5); color: var(--text-3);
+ transition: color .15s ease, border-color .15s ease, background .15s ease;
+ }
+ #home-forge .hf-opts-toggle svg { width: 14px; height: 14px; }
+ #home-forge .hf-opts-toggle:hover { color: var(--text); border-color: var(--hairline-strong); }
+ #home-forge .hf-opts-toggle.is-open { color: var(--text); border-color: rgba(139, 92, 246, 0.5); background: rgba(139, 92, 246, 0.1); }
+ #home-forge .hf-opts-toggle:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
+
+ /* Options panel. */
+ #home-forge .hf-panel {
+ width: 100%; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px;
+ padding: 15px 16px; border-radius: 16px; border: 1px solid var(--hairline);
+ background: linear-gradient(180deg, rgba(16, 16, 22, 0.86), rgba(10, 10, 14, 0.86));
+ backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
+ max-height: 340px; overflow-y: auto; animation: hf-panel-in .24s cubic-bezier(.22, 1, .36, 1);
+ }
+ @keyframes hf-panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
+ #home-forge .hf-panel-row { display: flex; align-items: flex-start; gap: 12px; }
+ #home-forge .hf-panel-row[hidden] { display: none; }
+ #home-forge .hf-panel-label { flex: none; width: 62px; padding-top: 6px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }
+
+ /* Segmented control (tier + aspect). */
+ #home-forge .hf-seg { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
+ #home-forge .hf-seg-btn {
+ display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 12px;
+ padding: 6px 12px; border-radius: 9px; cursor: pointer; border: 1px solid var(--hairline-strong);
+ background: rgba(14, 14, 18, 0.5); color: var(--text-2); transition: color .14s ease, border-color .14s ease, background .14s ease;
+ }
+ #home-forge .hf-seg-btn:hover { color: var(--text); border-color: var(--hairline-strong); }
+ #home-forge .hf-seg-btn[aria-pressed="true"] { color: var(--text); background: rgba(255, 255, 255, 0.08); border-color: var(--hairline-strong); }
+ #home-forge .hf-seg-btn:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
+
+ /* The High-tier $THREE lock pill on its tier button. */
+ #home-forge .hfc-lock { display: inline-flex; align-items: center; gap: 3px; font-size: 9px; font-weight: 700; letter-spacing: 0.03em; padding: 2px 5px; border-radius: 5px; }
+ #home-forge .hfc-lock[data-state="locked"] { color: #f5c451; background: rgba(245, 196, 81, 0.14); }
+ #home-forge .hfc-lock[data-state="unlocked"] { color: #6ee7a8; background: rgba(110, 231, 168, 0.14); }
+ #home-forge .hfc-lock-ico { width: 10px; height: 10px; }
+
+ /* Engine picker — pills that scroll horizontally when they overflow. */
+ #home-forge .hf-engine { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
+ #home-forge .hfc-engine-btn {
+ display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 12px;
+ padding: 6px 11px; border-radius: 9px; cursor: pointer; border: 1px solid var(--hairline-strong);
+ background: rgba(14, 14, 18, 0.5); color: var(--text-2); transition: color .14s ease, border-color .14s ease, background .14s ease;
+ }
+ #home-forge .hfc-engine-btn:hover:not(:disabled) { color: var(--text); border-color: var(--hairline-strong); }
+ #home-forge .hfc-engine-btn[aria-pressed="true"] { color: var(--text); background: rgba(255, 255, 255, 0.08); border-color: var(--hairline-strong); }
+ #home-forge .hfc-engine-btn:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
+ #home-forge .hfc-engine-btn:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
+ #home-forge .hfc-engine-btn[data-health="degraded"] { border-color: rgba(245, 196, 81, 0.4); }
+ #home-forge .hfc-engine-auto[aria-pressed="true"] { background: rgba(139, 92, 246, 0.14); border-color: rgba(139, 92, 246, 0.5); }
+ #home-forge .hfc-auto-pill { font-size: 8.5px; font-weight: 700; letter-spacing: 0.06em; color: #c4b5fd; }
+ #home-forge .hfc-free-pill { font-size: 8.5px; font-weight: 700; letter-spacing: 0.06em; color: #6ee7a8; background: rgba(110, 231, 168, 0.14); padding: 1px 4px; border-radius: 4px; }
+ #home-forge .hfc-key { width: 12px; height: 12px; opacity: 0.7; }
+
+ /* BYOK key row. */
+ #home-forge .hf-byok { display: flex; flex-direction: column; gap: 6px; padding: 11px 12px; border-radius: 11px; border: 1px solid var(--hairline); background: rgba(20, 20, 27, 0.6); }
+ #home-forge .hf-byok[hidden] { display: none; }
+ #home-forge .hf-byok-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); }
+ #home-forge .hf-byok-key { font-family: var(--font-mono); font-size: 13px; padding: 8px 11px; border-radius: 8px; border: 1px solid var(--hairline-strong); background: rgba(0, 0, 0, 0.35); color: var(--text); }
+ #home-forge .hf-byok-key:focus-visible { outline: 2px solid #8b5cf6; outline-offset: 2px; }
+ #home-forge .hf-byok-hint { margin: 0; font-size: 11px; color: var(--text-3); line-height: 1.5; }
+ #home-forge .hf-byok-hint a { color: var(--text-2); }
+
+ /* Lock host + holder perk line. */
+ #home-forge .hf-lock[hidden] { display: none; }
+ #home-forge .hf-perk { margin: 0; font-size: 11.5px; color: var(--text-3); line-height: 1.5; text-align: center; }
+ #home-forge .hf-perk[hidden] { display: none; }
+ #home-forge .hf-perk strong { color: var(--text); }
+ #home-forge .hf-perk a { color: var(--text-2); }
+
/* Ghost buttons shared by states. */
#home-forge .hf-btn {
display: inline-flex; align-items: center; gap: 6px; text-align: center;
@@ -4488,9 +4643,10 @@
</p>
</div>
<div class="har-inner reveal reveal-d1">
- <div class="har-viewer-wrap" id="har-viewer-wrap">
+ <div class="har-viewer-wrap" id="har-viewer-wrap" tabindex="0" role="group" aria-roledescription="carousel" aria-label="Community model showcase, use left and right arrow keys to browse">
<div class="har-skeleton" id="har-skeleton">Loading model&hellip;</div>
<!-- model-viewer injected by JS once the CDN script is ready -->
+ <span class="har-cat" id="har-cat"></span>
<div class="har-dots" id="har-dots" role="tablist" aria-label="Showcase models" style="display:none"></div>
<div class="har-autobar" id="har-autobar" aria-hidden="true"></div>
<div class="har-viewer-nav" id="har-viewer-nav" style="display:none">
@@ -4498,6 +4654,7 @@
<span class="har-prompt" id="har-prompt-label"></span>
<button class="har-nav-btn" id="har-next" aria-label="Next model" data-i18n-attr="aria-label:home.next_model_arialabel">&rarr;</button>
</div>
+ <span id="har-live" class="sr-only" aria-live="polite"></span>
</div>
<div class="har-right">
<div>
@@ -4509,6 +4666,7 @@
<span class="har-compat-pill" data-i18n="home.quick_look_ios">Quick Look &middot; iOS</span>
<span class="har-compat-pill" data-i18n="home.no_app_needed">No app needed</span>
</div>
+ <p class="har-count" id="har-count" aria-live="polite"></p>
</div>
<!-- Mobile: direct AR launch -->
@@ -4529,6 +4687,7 @@
</div>
<div style="display:flex;flex-direction:column;gap:10px">
+ <a class="har-cta-link har-desktop-only" id="har-open-model" href="/forge" style="color:var(--text);font-weight:600" data-i18n="home.open_this_model_in_ar">Open this model in AR &rarr;</a>
<a class="har-cta-link" href="/forge" data-i18n="home.generate_your_own_model">Generate your own model &rarr;</a>
<a class="har-cta-link" href="/gallery" data-i18n="home.browse_the_avatar_gallery">Browse the avatar gallery &rarr;</a>
<a class="har-cta-link" href="/features/ar" data-i18n="home.ar_feature_overview">AR feature overview &rarr;</a>
@@ -4577,6 +4736,22 @@
const arBtn = document.getElementById('har-ar-btn');
const qrCanvas = document.getElementById('har-qr-canvas');
const qrWrap = document.getElementById('har-qr-wrap');
+ const catChip = document.getElementById('har-cat');
+ const countEl = document.getElementById('har-count');
+ const liveEl = document.getElementById('har-live');
+ const openLink = document.getElementById('har-open-model');
+ const nfmt = (n) => { try { return new Intl.NumberFormat().format(n); } catch { return String(n); } };
+ // Map the raw category slug to a human label for the on-viewer chip.
+ const CAT_LABEL = { avatar: 'Character', creature: 'Creature', item: 'Object', accessory: 'Accessory', scene: 'Scene', vehicle: 'Vehicle', prop: 'Prop', other: 'Model' };
+
+ // The AR-studio deep link for a given model, shared by the QR and the desktop
+ // "Open this model in AR" text link.
+ function arStudioUrl(glbUrl, prompt) {
+ if (!glbUrl) return '/forge';
+ const q = new URLSearchParams({ src: glbUrl });
+ if (prompt) q.set('title', String(prompt).slice(0, 120));
+ return 'https://three.ws/ar/studio/?' + q.toString();
+ }
// Dedupe (same prompt or same mesh twice reads as a bug) and interleave by
// category so consecutive slides feel varied (a character, an object, a
@@ -4612,15 +4787,9 @@
// it places exactly this model in the room, matching the "place this model"
// caption. Falls back to /forge only when no glb is available yet.
function updateQR(glbUrl, prompt) {
- let arUrl = 'https://three.ws/forge';
- if (glbUrl) {
- const q = new URLSearchParams({ src: glbUrl });
- if (prompt) q.set('title', String(prompt).slice(0, 120));
- arUrl = 'https://three.ws/ar/studio/?' + q.toString();
- }
try {
const ctx = qrCanvas.getContext('2d');
- const tmp = renderQRToCanvas(arUrl, { scale: 8, margin: 2 });
+ const tmp = renderQRToCanvas(arStudioUrl(glbUrl, prompt), { scale: 8, margin: 2 });
qrCanvas.width = tmp.width;
qrCanvas.height = tmp.height;
ctx.drawImage(tmp, 0, 0);
@@ -4629,6 +4798,22 @@
} catch {}
}
+ // Warm the browser cache for the next model's GLB so cycling feels instant.
+ let prefetchLink = null;
+ function prefetchNext() {
+ if (models.length < 2) return;
+ const next = models[(idx + 1) % models.length];
+ if (!next || !next.glb_url) return;
+ if (!prefetchLink) {
+ prefetchLink = document.createElement('link');
+ prefetchLink.rel = 'prefetch';
+ prefetchLink.as = 'fetch';
+ prefetchLink.crossOrigin = 'anonymous';
+ document.head.appendChild(prefetchLink);
+ }
+ prefetchLink.href = next.glb_url;
+ }
+
function loadModel(m) {
if (!mv) return;
// Poster-first: the rendered thumbnail paints instantly while the GLB
@@ -4639,8 +4824,19 @@
mv.setAttribute('alt', m.prompt || '3D model');
promptLabel.textContent = m.prompt || 'model';
arBtn.disabled = false;
+ // Category chip: signals the variety is intentional, not random.
+ if (catChip) {
+ const label = CAT_LABEL[m.model_category] || CAT_LABEL.other;
+ catChip.textContent = label;
+ catChip.dataset.shown = '1';
+ }
+ // Desktop text link opens exactly this model in AR.
+ if (openLink) openLink.href = arStudioUrl(m.glb_url, m.prompt);
+ // Announce the change for screen-reader users.
+ if (liveEl) liveEl.textContent = 'Showing ' + (m.prompt || 'model') + ', model ' + (idx + 1) + ' of ' + models.length;
updateQR(m.glb_url, m.prompt);
syncDots();
+ prefetchNext();
}
function syncDots() {
@@ -4700,7 +4896,36 @@
function softPause() { autoPaused = true; if (autobar) autobar.dataset.run = '0'; }
function softResume() { autoPaused = false; restartAutobar(); }
+ // Live social-proof count. The `total` is the full community-model count; we
+ // show the bigger of it and the fetched slice so the number never undercounts.
+ function renderCount(total) {
+ if (!countEl) return;
+ const n = Math.max(Number(total) || 0, models.length);
+ if (n < 3) return; // too few to be persuasive: stay quiet.
+ countEl.innerHTML = '<span class="har-dot-live" aria-hidden="true"></span>Join <b>' + nfmt(n) + '</b> models forged by the community.';
+ countEl.dataset.shown = '1';
+ }
+
+ // Designed failure state: never a bare "no data", always a way forward.
+ function showEmpty(message) {
+ if (mv) { mv.remove(); mv = null; }
+ nav.style.display = 'none';
+ if (dotsWrap) dotsWrap.style.display = 'none';
+ skeleton.style.display = 'none';
+ if (wrap.querySelector('.har-empty')) return;
+ const box = document.createElement('div');
+ box.className = 'har-empty';
+ const p = document.createElement('p');
+ p.textContent = message;
+ const a = document.createElement('a');
+ a.href = '/forge';
+ a.textContent = 'Forge a model →';
+ box.append(p, a);
+ wrap.appendChild(box);
+ }
+
async function init() {
+ let total = 0;
try {
// Curated community showcase (top-voted first, rejected excluded), not
// the anonymous newest-first bucket. The AR hero should lead with the
@@ -4708,6 +4933,7 @@
const r = await fetch('/api/forge-gallery?scope=community&sort=top&limit=24');
if (!r.ok) throw new Error(r.status);
const d = await r.json();
+ total = Number(d.total) || 0;
const all = (d.creations || []).filter(c => c.glb_url);
// Votes are sparse, so top-sort falls back to newest and can surface
// throwaway prompts ("test") or un-rendered results. Prefer entries that
@@ -4723,10 +4949,12 @@
} catch { models = []; }
if (!models.length) {
- skeleton.textContent = 'No models available';
+ showEmpty('The community showcase is warming up. Be the first to forge one.');
return;
}
+ renderCount(total);
+
await ensureModelViewer();
mv = document.createElement('model-viewer');
@@ -4734,8 +4962,11 @@
mv.setAttribute('auto-rotate', '');
mv.setAttribute('ar', '');
mv.setAttribute('ar-modes', 'webxr scene-viewer quick-look');
- mv.setAttribute('shadow-intensity', '1');
+ mv.setAttribute('shadow-intensity', '1.3');
+ mv.setAttribute('shadow-softness', '0.85');
+ mv.setAttribute('exposure', '1.05');
mv.setAttribute('environment-image', 'neutral');
+ mv.setAttribute('interaction-prompt', 'none');
if (models[0].preview_image_url) mv.setAttribute('poster', models[0].preview_image_url);
mv.style.cssText = 'width:100%;height:100%;--poster-color:transparent;background:transparent;';
@@ -4757,6 +4988,12 @@
document.getElementById('har-prev').addEventListener('click', () => { pauseAuto(); show(idx - 1); });
document.getElementById('har-next').addEventListener('click', () => { pauseAuto(); show(idx + 1); });
+ // Keyboard: arrow keys cycle when the viewer group has focus.
+ wrap.addEventListener('keydown', (e) => {
+ if (e.key === 'ArrowLeft') { pauseAuto(); show(idx - 1); e.preventDefault(); }
+ else if (e.key === 'ArrowRight') { pauseAuto(); show(idx + 1); e.preventDefault(); }
+ });
+
// Hover/focus/drag softly holds position; leaving resumes.
wrap.addEventListener('pointerenter', softPause);
wrap.addEventListener('pointerleave', softResume);
diff --git a/public/changelog.json b/public/changelog.json
index 9035b9a90..c0c246c36 100644
--- a/public/changelog.json
+++ b/public/changelog.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-17T23:15:17.858Z",
+ "generated_at": "2026-07-17T23:29:01.425Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json + data/changelog.json",
"site": {
"name": "three.ws",
@@ -469,9 +469,9 @@
{
"date": "2026-07-17",
"type": "update",
- "title": "The 3D world no longer stays blurry after a slow moment",
- "summary": "The world automatically lowers render detail if frames get choppy (loading a crowded plaza, a browser tab hiccup, a background sync). Until now it could only step down and never recovered, so a single rough moment left the 3D permanently soft on high-resolution screens while the interface on top stayed sharp. It now climbs back up to your device's full sharpness once frames are smooth again, so a brief hitch no longer costs you clarity for the rest of the session.",
- "link": null,
+ "title": "The 3D world looks sharper and shows more of the plaza",
+ "summary": "Two fixes to how the world renders. First, sharpness: the world lowers render detail when frames get choppy (loading a crowded plaza, a tab hiccup, a background sync), but it could only ever step down and never recovered, so a single rough moment left the 3D permanently soft on high-resolution screens while the interface on top stayed crisp. It now climbs back to your device's full sharpness once frames are smooth again, and it re-tunes automatically when you drag the window between a laptop screen and an external monitor. Second, framing: the follow camera was zoomed in tight, cropping the totem and side screens at the edges. It now uses a wider lens so you see more of the plaza and the crowd around you at once.",
+ "link": "/play",
"tags": [
"fix",
"improvement"
@@ -489,6 +489,17 @@
"infra"
]
},
+ {
+ "date": "2026-07-17",
+ "type": "update",
+ "title": "The autonomous-trading scoreboard now counts only real on-chain trades",
+ "summary": "The homepage's live trading panel promises \"real positions, no simulation\" — so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands.",
+ "link": null,
+ "tags": [
+ "fix",
+ "improvement"
+ ]
+ },
{
"date": "2026-07-17",
"type": "update",
diff --git a/public/changelog.xml b/public/changelog.xml
index 616d5c58c..44c0d384d 100644
--- a/public/changelog.xml
+++ b/public/changelog.xml
@@ -359,12 +359,12 @@
<description>Four upgrades to photo-to-3D landed together. Uploaded photos now have their background cleanly removed before reconstruction, so a busy backdrop no longer bleeds into the model. You can supply up to 6 reference angles instead of 4 for fuller coverage. Every uploaded angle is now quality-checked, and a blurry or off-subject one is dropped instead of corrupting the result. And every finished model runs through an automatic geometry cleanup pass that welds and de-duplicates the mesh and trims redundant triangles, so models load faster and render cleaner with no loss of detail.</description>
</item>
<item>
- <title>The 3D world no longer stays blurry after a slow moment</title>
- <link>https://three.ws/changelog</link>
- <guid isPermaLink="false">2026-07-17:The 3D world no longer stays blurry after a slow moment</guid>
+ <title>The 3D world looks sharper and shows more of the plaza</title>
+ <link>https://three.ws/play</link>
+ <guid isPermaLink="false">2026-07-17:The 3D world looks sharper and shows more of the plaza</guid>
<pubDate>Fri, 17 Jul 2026 12:00:00 GMT</pubDate>
<category>fix</category>
- <description>The world automatically lowers render detail if frames get choppy (loading a crowded plaza, a browser tab hiccup, a background sync). Until now it could only step down and never recovered, so a single rough moment left the 3D permanently soft on high-resolution screens while the interface on top stayed sharp. It now climbs back up to your device's full sharpness once frames are smooth again, so a brief hitch no longer costs you clarity for the rest of the session.</description>
+ <description>Two fixes to how the world renders. First, sharpness: the world lowers render detail when frames get choppy (loading a crowded plaza, a tab hiccup, a background sync), but it could only ever step down and never recovered, so a single rough moment left the 3D permanently soft on high-resolution screens while the interface on top stayed crisp. It now climbs back to your device's full sharpness once frames are smooth again, and it re-tunes automatically when you drag the window between a laptop screen and an external monitor. Second, framing: the follow camera was zoomed in tight, cropping the totem and side screens at the edges. It now uses a wider lens so you see more of the plaza and the crowd around you at once.</description>
</item>
<item>
<title>The agent-to-agent payment economy runs far cheaper and now cycles hundreds of distinct payers</title>
@@ -374,6 +374,14 @@
<category>fix</category>
<description>Two improvements to the closed-loop x402 agent economy that dogfoods every paid endpoint on the platform. First, a fix: a background wallet-consolidation job was quietly closing the ring's payment account after every settlement, forcing the next one to recreate it and pay account rent each time. That single bug had pushed the real fee cost to roughly a hundred times where it should be. With it fixed and single-signature settlement turned on, each settlement is back to the network floor of a few thousandths of a cent, and the ring's working balance stays in the loop instead of leaking away. Second, a new capability: the ring can now cycle payments through a reusable pool of hundreds to a thousand distinct wallets instead of one, so the economy reads as many participants rather than a single account, with no extra cost per payment. The pool is off until funded and activated, and every wallet in it stays clearly labeled internal dogfooding, not organic demand.</description>
</item>
+ <item>
+ <title>The autonomous-trading scoreboard now counts only real on-chain trades</title>
+ <link>https://three.ws/changelog</link>
+ <guid isPermaLink="false">2026-07-17:The autonomous-trading scoreboard now counts only real on-chain trades</guid>
+ <pubDate>Fri, 17 Jul 2026 12:00:00 GMT</pubDate>
+ <category>fix</category>
+ <description>The homepage's live trading panel promises &quot;real positions, no simulation&quot; — so its headline numbers now come only from trades that actually landed on-chain. Winning exits, best run, best ROI, and open positions all exclude paper (simulated) fills, which the engine writes while it runs in practice mode. Nothing is inflated: the board shows the true count of profitable trades agents have closed for real, and it moves the instant a genuine winning exit lands.</description>
+ </item>
<item>
<title>The avatar shop and animation bazaar are now discoverable by paying agents</title>
<link>https://three.ws/changelog</link>
diff --git a/public/features.json b/public/features.json
index a70b3f721..149fce9ad 100644
--- a/public/features.json
+++ b/public/features.json
@@ -1,5 +1,5 @@
{
- "generated_at": "2026-07-17T23:15:17.839Z",
+ "generated_at": "2026-07-17T23:29:01.395Z",
"generated_by": "scripts/build-page-index.mjs from data/pages.json",
"site": {
"name": "three.ws",
diff --git a/public/locales/en.json b/public/locales/en.json
index 479e26ff5..fac61fb4c 100644
--- a/public/locales/en.json
+++ b/public/locales/en.json
@@ -3784,7 +3784,17 @@
"hero_forge_placeholder": "describe anything: a brass compass, weathered…",
"hero_forge_note": "Free, no sign-up, a real textured model in about a minute. <a href=\"/forge\">Open the full Forge →</a>",
"feed_empty_top": "No trending models yet this week. Check back after a few votes, or browse Fresh.",
- "feed_empty_fresh": "Nothing here yet. Be the first to forge one."
+ "feed_empty_fresh": "Nothing here yet. Be the first to forge one.",
+ "surprise": "Surprise",
+ "surprise_me_arialabel": "Surprise me with a prompt",
+ "surprise_title": "Roll a fresh prompt",
+ "quality": "Quality",
+ "engine": "Engine",
+ "frame": "Frame",
+ "provider_key": "Provider key",
+ "enhance_the_prompt_arialabel": "Enhance the prompt",
+ "enhance_title": "Enhance the prompt (art-director rewrite)",
+ "options": "Options"
},
"ibm_hello": {
"01forge": "<span class=\"n\">01</span>Forge",
diff --git a/scripts/i18n-translate.mjs b/scripts/i18n-translate.mjs
index 464cf7b0d..5b3a912d9 100644
--- a/scripts/i18n-translate.mjs
+++ b/scripts/i18n-translate.mjs
@@ -315,12 +315,12 @@ async function callVertex(prompt) {
return content;
}
-async function callOpenAICompat(prompt) {
- const spec = OPENAI_COMPAT[cfg.provider];
+async function callOpenAICompat(prompt, providerName = cfg.provider, modelOverride = null) {
+ const spec = OPENAI_COMPAT[providerName];
const key = process.env[spec.envKey];
if (!key) throw new Error(`${spec.envKey} not set`);
const body = {
- model: modelName(),
+ model: modelOverride || modelName(),
temperature: cfg.temperature ?? 0.2,
top_p: cfg.topP ?? 0.9,
messages: [{ role: 'user', content: prompt }],
@@ -356,6 +356,23 @@ function backend() {
);
}
+// Ordered backend chain: the configured provider first, then OpenRouter as the
+// universal failover so a mid-batch outage of the primary lane (a Vertex token
+// hiccup, a free-tier 429 storm) doesn't degrade a whole run to English
+// fallback. OpenRouter uses a FUNDED model (no :free) so the failover reliably
+// serves — a free-tier model would 402/429 exactly when it is needed. Set
+// OPENROUTER_I18N_MODEL to override. Skipped when the primary IS OpenRouter or
+// no OpenRouter key is configured.
+function backendChain() {
+ const chain = [{ name: cfg.provider, call: (p) => backend()(p) }];
+ const orKey = process.env.OPENROUTER_API_KEY?.trim();
+ if (orKey && cfg.provider !== 'openrouter') {
+ const orModel = process.env.OPENROUTER_I18N_MODEL?.trim() || 'meta-llama/llama-3.3-70b-instruct';
+ chain.push({ name: `openrouter(${orModel})`, call: (p) => callOpenAICompat(p, 'openrouter', orModel) });
+ }
+ return chain;
+}
+
// Parse the model's reply into an object, tolerating the usual LLM JSON noise:
// code fences (stripped upstream), leading/trailing prose, and a trailing comma.
// Falls back to the largest {...} span when a raw parse fails, so one stray
@@ -380,8 +397,9 @@ function parseModelJSON(raw) {
}
}
-async function translateChunk(langName, payload, attempt = 0) {
- const call = backend();
+// Try one backend with the existing retry/backoff. Returns the parsed object or
+// throws the last error after exhausting retries for THIS backend.
+async function callBackendWithRetry(call, langName, payload, attempt = 0) {
try {
const raw = await call(buildPrompt(langName, payload));
const parsed = parseModelJSON(raw);
@@ -397,12 +415,32 @@ async function translateChunk(langName, payload, attempt = 0) {
? Math.max((err.retryAfter || 0) * 1000, 2000 * (attempt + 1))
: 400 * (attempt + 1);
await new Promise((r) => setTimeout(r, wait));
- return translateChunk(langName, payload, attempt + 1);
+ return callBackendWithRetry(call, langName, payload, attempt + 1);
}
throw err;
}
}
+// Translate one chunk, failing over across the backend chain (primary →
+// OpenRouter). Each backend gets its full retry budget before the next is tried;
+// only when every backend is exhausted does the error propagate (to the caller's
+// halve-and-retry / English-fallback logic).
+async function translateChunk(langName, payload) {
+ const chain = backendChain();
+ let lastErr;
+ for (const [i, b] of chain.entries()) {
+ try {
+ return await callBackendWithRetry(b.call, langName, payload);
+ } catch (err) {
+ lastErr = err;
+ if (i < chain.length - 1) {
+ console.warn(` ↻ ${b.name} failed (${err.message?.slice(0, 80)}); failing over to ${chain[i + 1].name}`);
+ }
+ }
+ }
+ throw lastErr;
+}
+
// Bounded-concurrency map.
async function pool(items, limit, worker) {
const results = new Array(items.length);
@@ -461,7 +499,7 @@ async function translateLocale(code) {
}
let out;
try {
- out = await translateChunk(langName, payload, 0);
+ out = await translateChunk(langName, payload);
} catch (err) {
if (keys.length > 1) {
const mid = Math.ceil(keys.length / 2);
diff --git a/src/home-forge-controls.js b/src/home-forge-controls.js
new file mode 100644
index 000000000..41e698bbe
--- /dev/null
+++ b/src/home-forge-controls.js
@@ -0,0 +1,527 @@
+// Home Forge controls — the generation-intelligence layer for the homepage
+// chamber. The mini-forge (src/home-forge.js) owns the prompt bar, the pipeline
+// animation, the viewer, history, and embed. This module gives that chamber the
+// same brains the full /forge page runs on, without touching the beloved
+// single-bar design: quality tiers (Draft/Standard/High with the real $THREE
+// holder gate), a live engine picker (Auto health-routing plus every configured
+// lane with its true up/down status), aspect ratio, and BYOK keys — all rendered
+// from the SAME /api/forge?catalog and ?health endpoints the full page reads, so
+// the two surfaces can never drift. It reuses three-access.js (the $THREE access
+// matrix + tier pass), three-lock.js (the in-place frosted lock), and
+// forge-pay.js (pay-per-generation) verbatim, so a homepage High generation
+// behaves byte-for-byte like the full page's.
+//
+// Everything lives behind an "Options" disclosure the chamber keeps collapsed by
+// default: a first-time visitor still sees exactly the minimal bar they always
+// did. Auto stays the default engine — no backend is sent, so the server's
+// health-aware router picks the live lane, preserving the mini-forge's original
+// "never dead-end a visitor" behavior. A backend is sent only when the visitor
+// deliberately picks one.
+
+import {
+ getAccess,
+ getTierPass,
+ attachTierPass,
+ primeTierPass,
+} from './three-access.js';
+import { renderLock, lockStateFromAccess } from './three-lock.js';
+import { payForHighGeneration } from './forge-pay.js';
+
+// Short engine labels for the picker, keyed by backend id — mirrors ENGINE_LABELS
+// in src/forge.js so the two pickers read identically. Free lanes carry a FREE
+// pill (below), so they are named by engine like every other lane.
+const ENGINE_LABELS = {
+ nvidia: 'NVIDIA',
+ huggingface: 'Hunyuan3D',
+ trellis: 'Fast',
+ trellis_selfhost: 'TRELLIS',
+ meshy: 'Meshy',
+ tripo: 'Tripo',
+ rodin: 'Rodin',
+ stability: 'Stability',
+ replicate_byok: 'Replicate',
+ hunyuan3d: 'Hunyuan3D',
+ triposg: 'TripoSG',
+};
+
+// Where to mint a key per BYOK provider — mirrors KEY_HINTS in src/forge.js and
+// the canonical registry in api/_lib/provider-keys.js. Keep in sync.
+const KEY_HINTS = {
+ meshy: { label: 'Meshy AI', url: 'https://www.meshy.ai/settings/api' },
+ tripo: { label: 'Tripo AI', url: 'https://platform.tripo3d.ai/api-keys' },
+ rodin: { label: 'Rodin (Hyper3D)', url: 'https://developer.hyper3d.ai' },
+ stability: { label: 'Stability AI', url: 'https://platform.stability.ai/account/keys' },
+ replicate: { label: 'Replicate', url: 'https://replicate.com/account/api-tokens' },
+};
+
+const TIER_ORDER = ['draft', 'standard', 'high'];
+const ASPECTS = ['1:1', '4:3', '3:4', '16:9'];
+
+const KEY_SVG =
+ '<svg class="hfc-key" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="7.5" cy="15.5" r="4.5"/><path d="M10.7 12.3 21 2"/><path d="m15 7 3 3"/><path d="m18 4 3 3"/></svg>';
+const LOCK_PILL_SVG =
+ '<svg class="hfc-lock-ico" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><rect x="5" y="11" width="14" height="9" rx="2"/><path d="M8 11V7a4 4 0 0 1 8 0v4"/></svg>';
+
+/**
+ * Wire the controls into the chamber. Returns a small controller the mini-forge
+ * consults on every submit. Never throws — a deployment without the catalog
+ * endpoint (or with the panel markup absent) yields an inert controller whose
+ * getConfig() returns the mini-forge's original free-standard defaults.
+ *
+ * @param {object} o
+ * @param {HTMLElement} o.root the #home-forge root
+ * @param {object} o.clientHeaders { 'x-forge-client': id } — sent on catalog/health
+ * @param {(html:string)=>void} [o.onLane] called with a lane label for the HUD ("standard · auto")
+ * @param {(extra:object)=>void} o.onRerun run the current prompt again with an extra body (pay-per-use proof)
+ * @param {()=>void} [o.onBlockedChange] called when the High lock engages/clears so the bar can reflect it
+ */
+export function initForgeControls({ root, clientHeaders, onLane, onRerun, onBlockedChange }) {
+ const els = root && {
+ panel: root.querySelector('[data-hf-panel]'),
+ optsToggle: root.querySelector('[data-hf-opts]'),
+ tier: root.querySelector('[data-hf-tier]'),
+ engine: root.querySelector('[data-hf-engine]'),
+ aspectRow: root.querySelector('[data-hf-aspect-row]'),
+ aspect: root.querySelector('[data-hf-aspect]'),
+ byok: root.querySelector('[data-hf-byok]'),
+ byokLabel: root.querySelector('[data-hf-byok-label]'),
+ byokKey: root.querySelector('[data-hf-byok-key]'),
+ byokHint: root.querySelector('[data-hf-byok-hint]'),
+ lock: root.querySelector('[data-hf-lock]'),
+ perk: root.querySelector('[data-hf-perk]'),
+ };
+
+ // Inert controller: the panel is absent (older markup) — the mini-forge keeps
+ // its original fixed free-standard payload and everything still works.
+ if (!els || !els.panel || !els.tier || !els.engine) {
+ return {
+ whenReady: Promise.resolve(false),
+ getConfig: () => ({ tier: 'standard', path: 'image', backend: null, aspect_ratio: '1:1', byokKey: '' }),
+ laneLabel: () => 'standard · free lane',
+ async beforeSubmit(base) {
+ return { ok: true, headers: { ...(base || {}), ...(clientHeaders || {}) } };
+ },
+ async buildHeaders(base) {
+ return { ...(base || {}), ...(clientHeaders || {}) };
+ },
+ isBlocked: () => false,
+ };
+ }
+
+ let catalog = null;
+ let health = null;
+ let selectedTier = 'standard';
+ let selectedEngine = { id: null, path: 'image', backend: null, byok: null }; // id:null === Auto
+ let byokKey = '';
+ let highLocked = false;
+ let highAccess = null; // last resolved forge.high access payload
+ let healthRetry = 0;
+
+ const clientHdr = clientHeaders || {};
+
+ // ── Options disclosure ─────────────────────────────────────────────
+ if (els.optsToggle) {
+ els.optsToggle.addEventListener('click', () => {
+ const open = els.panel.hidden;
+ els.panel.hidden = !open;
+ els.optsToggle.setAttribute('aria-expanded', String(open));
+ els.optsToggle.classList.toggle('is-open', open);
+ });
+ }
+
+ // ── Catalog + health ───────────────────────────────────────────────
+ const whenReady = loadCatalog();
+
+ async function loadCatalog() {
+ try {
+ const res = await fetch('/api/forge?catalog=1', { headers: clientHdr });
+ catalog = await res.json().catch(() => null);
+ } catch {
+ catalog = null;
+ }
+ if (!catalog || !Array.isArray(catalog.backends)) {
+ // No catalog (older deploy) — hide the Options affordance entirely; the
+ // mini-forge's free-standard defaults still generate.
+ if (els.optsToggle) els.optsToggle.hidden = true;
+ els.panel.hidden = true;
+ return false;
+ }
+ buildTiers();
+ buildAspects();
+ buildEngineButtons();
+ selectTier('standard');
+ loadHealth();
+ reflectHighButtonAccess();
+ updatePerkLine();
+ emitLane();
+ return true;
+ }
+
+ async function loadHealth() {
+ try {
+ const res = await fetch('/api/forge?health=1', { headers: clientHdr });
+ const body = await res.json().catch(() => null);
+ health = body && body.backends ? body : null;
+ } catch {
+ health = null;
+ }
+ if (health) {
+ healthRetry = 0;
+ updateEngineAvailability();
+ } else if (healthRetry < 2) {
+ healthRetry += 1;
+ setTimeout(loadHealth, healthRetry * 30_000);
+ }
+ }
+
+ // ── Tiers ──────────────────────────────────────────────────────────
+ function buildTiers() {
+ els.tier.innerHTML = '';
+ const tiers = Array.isArray(catalog.tiers) ? catalog.tiers : [];
+ for (const id of TIER_ORDER) {
+ const t = tiers.find((x) => x.id === id);
+ if (!t) continue;
+ const btn = document.createElement('button');
+ btn.type = 'button';
+ btn.className = 'hf-seg-btn hfc-tier-btn';
+ btn.dataset.tier = id;
+ btn.setAttribute('aria-pressed', String(id === selectedTier));
+ const price = id === 'high' ? `$${t.price_usdc}` : '';
+ btn.title = t.blurb || t.label;
+ btn.innerHTML =
+ `<span class="hfc-tier-label">${t.label}</span>` +
+ (id === 'high'
+ ? `<span class="hfc-lock" data-state="locked" title="High quality is a $THREE holder feature">${LOCK_PILL_SVG}<span class="hfc-lock-txt">$THREE</span></span>`
+ : '');
+ void price;
+ btn.addEventListener('click', () => selectTier(id));
+ els.tier.appendChild(btn);
+ }
+ }
+
+ function selectTier(id) {
+ if (!TIER_ORDER.includes(id)) return;
+ selectedTier = id;
+ for (const b of els.tier.querySelectorAll('button')) {
+ b.setAttribute('aria-pressed', String(b.dataset.tier === id));
+ }
+ updateEngineAvailability();
+ reflectHighAccess(id);
+ emitLane();
+ }
+
+ // ── Aspect ratio ───────────────────────────────────────────────────
+ let selectedAspect = '1:1';
+ function buildAspects() {
+ if (!els.aspect) return;
+ els.aspect.innerHTML = '';
+ for (const a of ASPECTS) {
+ const btn = document.createElement('button');
+ btn.type = 'button';
+ btn.className = 'hf-seg-btn';
+ btn.dataset.aspect = a;
+ btn.textContent = a;
+ btn.setAttribute('aria-pressed', String(a === selectedAspect));
+ btn.addEventListener('click', () => {
+ selectedAspect = a;
+ for (const b of els.aspect.querySelectorAll('button')) {
+ b.setAttribute('aria-pressed', String(b.dataset.aspect === a));
+ }
+ });
+ els.aspect.appendChild(btn);
+ }
+ }
+
+ function updateAspectVisibility() {
+ if (!els.aspectRow) return;
+ // Aspect ratio only shapes the reference image an image-path lane renders;
+ // geometry/sketch lanes ignore it. Auto uses the image path, so it shows.
+ els.aspectRow.hidden = selectedEngine.path !== 'image';
+ }
+
+ // ── Engine picker ──────────────────────────────────────────────────
+ function buildEngineButtons() {
+ els.engine.innerHTML = '';
+ // Auto — the mini-forge's original behavior: no backend, server health-routes.
+ const auto = document.createElement('button');
+ auto.type = 'button';
+ auto.className = 'hfc-engine-btn hfc-engine-auto';
+ auto.dataset.engine = '__auto';
+ auto.dataset.path = 'image';
+ auto.setAttribute('aria-pressed', String(selectedEngine.id === null));
+ auto.title = 'Auto — we route to the best live lane for your prompt. Never dead-ends on a cold engine.';
+ auto.setAttribute('aria-label', 'Auto — best available engine');
+ auto.innerHTML = '<span class="hfc-engine-label">Auto</span><span class="hfc-auto-pill" aria-hidden="true">SMART</span>';
+ auto.addEventListener('click', () => selectEngine(auto));
+ els.engine.appendChild(auto);
+
+ // Text/photo tabs hide sketch-only lanes; the homepage is text-only, so we
+ // drop any lane that ONLY takes a sketch (no dead engine in the picker).
+ const usable = catalog.backends.filter((b) => {
+ if (!(b.configured || b.byok)) return false;
+ const sketchOnly = Array.isArray(b.paths) && b.paths.every((p) => p === 'sketch');
+ return !sketchOnly;
+ });
+ for (const b of usable) {
+ const path = b.paths.includes('geometry') ? 'geometry' : 'image';
+ const btn = document.createElement('button');
+ btn.type = 'button';
+ btn.className = 'hfc-engine-btn';
+ btn.dataset.engine = b.id;
+ btn.dataset.path = path;
+ btn.dataset.byok = b.byok || '';
+ const short = ENGINE_LABELS[b.id] || b.label;
+ btn.innerHTML =
+ `<span class="hfc-engine-label">${short}</span>` +
+ (b.free ? '<span class="hfc-free-pill" aria-hidden="true">FREE</span>' : '') +
+ (b.byok ? KEY_SVG : '');
+ const keyNote = b.byok ? ` · uses your own ${KEY_HINTS[b.byok]?.label || b.byok} key` : '';
+ const freeNote = b.free ? ' · free, no API key' : '';
+ btn.title = `${b.label} — ${b.blurb}${freeNote}${keyNote}`;
+ btn.setAttribute('aria-label', `${b.label}${freeNote}${keyNote}`);
+ btn.setAttribute('aria-pressed', String(b.id === selectedEngine.id));
+ btn.addEventListener('click', () => selectEngine(btn));
+ els.engine.appendChild(btn);
+ }
+ updateEngineAvailability();
+ }
+
+ function updateEngineAvailability() {
+ if (!catalog) return;
+ for (const btn of els.engine.querySelectorAll('button')) {
+ if (btn.dataset.engine === '__auto') continue;
+ const b = catalog.backends?.find((x) => x.id === btn.dataset.engine);
+ const lane = health?.backends?.[btn.dataset.engine];
+ const laneDown = Boolean(lane && (lane.status === 'down' || lane.status === 'unconfigured'));
+ const laneBusy = lane && lane.status === 'degraded';
+ btn.disabled = laneDown;
+ btn.setAttribute('aria-disabled', String(laneDown));
+ btn.dataset.health = lane ? lane.status : '';
+ if (laneDown) {
+ btn.title = `${b?.label || btn.dataset.engine} — temporarily unavailable: ${lane.message}`;
+ } else if (b) {
+ btn.title = laneBusy
+ ? `${b.label} — busy right now: ${lane.message}`
+ : `${b.label} — ${b.blurb}`;
+ }
+ // If the live-picked lane just went down, fall back to Auto so the user
+ // is never stranded on a dead engine.
+ if (laneDown && btn.dataset.engine === selectedEngine.id) {
+ const autoBtn = els.engine.querySelector('button[data-engine="__auto"]');
+ if (autoBtn) selectEngine(autoBtn);
+ }
+ }
+ }
+
+ function selectEngine(btn) {
+ if (!btn || btn.disabled) return;
+ const isAuto = btn.dataset.engine === '__auto';
+ selectedEngine = {
+ id: isAuto ? null : btn.dataset.engine,
+ path: btn.dataset.path || 'image',
+ backend: isAuto ? null : btn.dataset.engine,
+ byok: btn.dataset.byok || null,
+ };
+ for (const b of els.engine.querySelectorAll('button')) {
+ b.setAttribute('aria-pressed', String(b === btn));
+ }
+ updateByokRow();
+ updateAspectVisibility();
+ // The engine decides whether High is $THREE-gated (platform) or exempt (BYOK),
+ // so re-evaluate the lock whenever the engine changes under High.
+ if (selectedTier === 'high') reflectHighAccess('high', { silent: true });
+ emitLane();
+ }
+
+ function updateByokRow() {
+ if (!els.byok) return;
+ const byok = selectedEngine.byok;
+ els.byok.hidden = !byok;
+ if (!byok) return;
+ const hint = KEY_HINTS[byok];
+ const name = hint?.label || byok;
+ if (els.byokLabel) els.byokLabel.textContent = `${name} key`;
+ if (els.byokKey) els.byokKey.placeholder = `Your ${name} API key (kept in this browser)`;
+ if (els.byokHint) {
+ els.byokHint.innerHTML = hint
+ ? `Runs on your own ${hint.label} key. <a href="${hint.url}" target="_blank" rel="noopener">Get a key →</a>`
+ : `Runs on your own ${name} key, kept in this browser.`;
+ }
+ }
+
+ if (els.byokKey) {
+ els.byokKey.addEventListener('input', () => {
+ byokKey = els.byokKey.value.trim();
+ });
+ }
+
+ // ── High-tier $THREE gate ──────────────────────────────────────────
+ // The only combination the server $THREE-gates: High on a PLATFORM-keyed lane.
+ // BYOK High runs on the caller's own vendor key, so it is server-exempt.
+ function highTierNeedsPass() {
+ return selectedTier === 'high' && !selectedEngine.byok;
+ }
+
+ function setBlocked(v) {
+ if (v === highLocked) return;
+ highLocked = v;
+ if (typeof onBlockedChange === 'function') onBlockedChange(highLocked);
+ }
+
+ async function reflectHighAccess(tierId, { silent = false } = {}) {
+ if (!els.lock) return;
+ if (tierId !== 'high' || !highTierNeedsPass()) {
+ setBlocked(false);
+ highAccess = tierId === 'high' ? highAccess : null;
+ renderLock(els.lock, { clear: true });
+ els.lock.hidden = true;
+ return;
+ }
+ let access = silent && highAccess ? highAccess : null;
+ if (!access) {
+ els.lock.hidden = false;
+ renderLock(els.lock, { loading: true });
+ const data = await getAccess('forge.high');
+ if (!highTierNeedsPass()) return; // user moved off High while we fetched
+ access = data?.access || null;
+ }
+ if (!access) {
+ // Access read failed — fail open (server stays the authority) but offer a retry.
+ highAccess = null;
+ setBlocked(false);
+ els.lock.hidden = false;
+ renderLock(els.lock, { error: true, onRetry: () => reflectHighAccess('high') });
+ return;
+ }
+ highAccess = access;
+ setBlocked(!access.eligible);
+ els.lock.hidden = false;
+ renderLock(
+ els.lock,
+ lockStateFromAccess(access, {
+ getThreeUrl: '/three',
+ onUseFree: () => selectTier('standard'),
+ useFreeLabel: 'Use Standard (free)',
+ onPayPerUse: (pay) => payThenRun(pay),
+ }),
+ );
+ applyHighPill(access);
+ if (access.eligible) primeTierPass();
+ }
+
+ async function reflectHighButtonAccess() {
+ const data = await getAccess('forge.high');
+ const access = data?.access || null;
+ if (access) highAccess = access;
+ applyHighPill(access);
+ if (access?.eligible) primeTierPass();
+ }
+
+ function applyHighPill(access) {
+ const eligible = Boolean(access?.eligible);
+ const btn = els.tier?.querySelector('button[data-tier="high"]');
+ const pill = btn?.querySelector('.hfc-lock');
+ if (!pill) return;
+ pill.dataset.state = eligible ? 'unlocked' : 'locked';
+ pill.title = eligible
+ ? 'Unlocked — you hold $THREE'
+ : 'High quality is a $THREE holder feature';
+ pill.innerHTML = eligible
+ ? '<span class="hfc-lock-ico" aria-hidden="true">✓</span><span class="hfc-lock-txt">$THREE</span>'
+ : `${LOCK_PILL_SVG}<span class="hfc-lock-txt">$THREE</span>`;
+ }
+
+ // Pay $THREE for a single High generation, then re-run the current prompt with
+ // the settled proof attached. Mirrors payThenGenerate() in src/forge.js.
+ async function payThenRun(pay) {
+ const usd = Number(pay?.usd) || Number(highAccess?.pay_per_use?.usd) || 0;
+ if (!(usd > 0)) return;
+ if (selectedTier !== 'high') selectTier('high');
+ const result = await payForHighGeneration({ usd });
+ if (!result?.ok) return; // cancelled or failed — the modal explained why
+ if (typeof onRerun === 'function') {
+ onRerun({ payment_id: result.paymentId, ref_id: result.refId });
+ }
+ }
+
+ // ── Holder perk line ───────────────────────────────────────────────
+ const FREE_MULT_BY_LEVEL = { 1: 2, 2: 3, 3: 5, 4: 10 };
+ async function updatePerkLine() {
+ if (!els.perk) return;
+ const data = await getAccess();
+ const level = Number(data?.tier?.level) || 0;
+ els.perk.hidden = false;
+ if (level >= 1) {
+ const mult = FREE_MULT_BY_LEVEL[level] || 1;
+ els.perk.dataset.state = 'perk';
+ els.perk.innerHTML = `<span aria-hidden="true">⚡</span> Holder perk: <strong>${mult}× free quota</strong> · <a href="/three#tiers">your $THREE tier</a>`;
+ } else {
+ els.perk.dataset.state = 'upsell';
+ els.perk.innerHTML = '<a href="/three#tiers">Hold $THREE for up to 10× free generations →</a>';
+ }
+ }
+
+ // ── HUD lane label ─────────────────────────────────────────────────
+ function laneLabel() {
+ const engineName = selectedEngine.id
+ ? ENGINE_LABELS[selectedEngine.id] || selectedEngine.id
+ : 'auto';
+ return `${selectedTier} · ${engineName}`;
+ }
+ function emitLane() {
+ if (typeof onLane === 'function') onLane(laneLabel());
+ }
+
+ // ── Public API the mini-forge consults ─────────────────────────────
+ function getConfig() {
+ return {
+ tier: selectedTier,
+ path: selectedEngine.path || 'image',
+ backend: selectedEngine.backend, // null === Auto (omit → health routing)
+ aspect_ratio: selectedAspect,
+ byokKey,
+ };
+ }
+
+ // Assemble the request headers for a submit: the client id, the BYOK key when a
+ // BYOK lane is selected, and (for platform High) a freshly-minted $THREE tier
+ // pass AWAITED so the proof rides on THIS request. No-op for anonymous callers
+ // and the free tiers.
+ async function buildHeaders(base = {}) {
+ const headers = { ...base, ...clientHdr };
+ if (byokKey && selectedEngine.byok) headers['x-forge-provider-key'] = byokKey;
+ if (highTierNeedsPass()) {
+ await getTierPass({ interactive: Boolean(highAccess?.eligible) });
+ }
+ attachTierPass(headers);
+ return headers;
+ }
+
+ // Called right before a submit. Returns { ok, headers }. When platform High is
+ // selected but the visitor isn't eligible, opens the gate and returns ok:false
+ // so the mini-forge doesn't fire a request the server would 402.
+ async function beforeSubmit(base = {}) {
+ if (highTierNeedsPass() && highLocked) {
+ // Ensure the lock panel is visible + open Options so the CTA is reachable.
+ els.panel.hidden = false;
+ if (els.optsToggle) {
+ els.optsToggle.setAttribute('aria-expanded', 'true');
+ els.optsToggle.classList.add('is-open');
+ }
+ await reflectHighAccess('high');
+ return { ok: false };
+ }
+ return { ok: true, headers: await buildHeaders(base) };
+ }
+
+ return {
+ whenReady,
+ getConfig,
+ laneLabel,
+ beforeSubmit,
+ // A pay-per-use re-run already carries a settled payment, so it bypasses the
+ // gate block — the mini-forge builds its headers directly.
+ buildHeaders,
+ isBlocked: () => highTierNeedsPass() && highLocked,
+ };
+}
diff --git a/src/home-forge.js b/src/home-forge.js
index 9c698f7da..a035ae44f 100644
--- a/src/home-forge.js
+++ b/src/home-forge.js
@@ -32,6 +32,8 @@ import {
embedSize,
} from './forge-embed-snippets.js';
import { milestoneNote } from './forge-milestones.js';
+import { initForgeControls } from './home-forge-controls.js';
+import { generateForgePrompt } from './forge-prompt-gen.js';
const POLL_INTERVAL_MS = 2500;
// Max-tier texture bakes legitimately run past 10 minutes at full quality; the
@@ -68,6 +70,9 @@ const els = root && {
generate: root.querySelector('[data-hf-generate]'),
generateLabel: root.querySelector('[data-hf-generate-label]'),
chips: root.querySelector('[data-hf-chips]'),
+ surprise: root.querySelector('[data-hf-surprise]'),
+ enhance: root.querySelector('[data-hf-enhance]'),
+ laneLabel: root.querySelector('[data-hf-lane-label]'),
states: {
idle: root.querySelector('[data-hf-idle]'),
generating: root.querySelector('[data-hf-generating]'),
@@ -137,6 +142,13 @@ let busy = false;
let pollAbort = false;
let elapsedTimer = null;
let lastPrompt = '';
+// The Options controls (tier/engine/aspect/BYOK + $THREE High gate). Initialized
+// in boot(); null on a page without the panel markup (the mini-forge then keeps
+// its original free-standard behavior). highBlocked mirrors the controls' High
+// lock so the Forge button reflects it.
+let controls = null;
+let highBlocked = false;
+let enhanceBusy = false;
let modelViewerReady = null;
let currentViewer = null; // the live <model-viewer> on stage
let currentGlbUrl = ''; // what the toolbar acts on
@@ -201,9 +213,23 @@ function stopElapsed() {
function setBusy(b) {
busy = b;
- els.generate.disabled = b;
- els.generateLabel.textContent = b ? 'Forging…' : 'Forge';
if (els.vary) els.vary.disabled = b;
+ if (els.enhance) els.enhance.disabled = b || enhanceBusy;
+ reflectGenerate();
+}
+
+// The Forge button is disabled while a job runs OR while platform High is selected
+// by a non-holder (highBlocked). The label reflects which: "Forging…", "Hold
+// $THREE for High", or "Forge". Called by setBusy() and the controls' gate change.
+function reflectGenerate() {
+ if (!els.generate) return;
+ els.generate.disabled = busy || highBlocked;
+ els.generate.classList.toggle('is-gated', highBlocked && !busy);
+ els.generateLabel.textContent = busy
+ ? 'Forging…'
+ : highBlocked
+ ? 'Hold $THREE for High'
+ : 'Forge';
}
function showError(message) {
@@ -333,27 +359,50 @@ function downscaleDataUrl(src, size) {
// ── Pipeline ───────────────────────────────────────────────────────
-async function startJob(prompt) {
+// Build and POST a generation. `config` comes from the Options controls (tier,
+// engine/backend, aspect, path); with no controls it defaults to the free
+// standard lane. `headers` already carries the client id, any BYOK key, and the
+// $THREE tier pass (assembled by the controls). `payment` (a settled $THREE
+// pay-per-use proof) is attached for a non-holder's High generation.
+const DEFAULT_CFG = { tier: 'standard', path: 'image', backend: null, aspect_ratio: '1:1' };
+
+async function startJob(prompt, { config = DEFAULT_CFG, headers, payment } = {}) {
+ const body = {
+ prompt,
+ aspect_ratio: config.aspect_ratio || '1:1',
+ path: config.path || 'image',
+ tier: config.tier || 'standard',
+ // Granite art-director pass (fail-soft): same photoreal-biased prompt
+ // rewrite the full /forge page and every MCP tool already get.
+ director: true,
+ };
+ // A backend is sent ONLY when the visitor deliberately picked a lane in Options.
+ // With no backend (Auto), the server's health-aware router picks the best live
+ // lane — the mini-forge's original "never dead-end a visitor" behavior.
+ if (config.backend) body.backend = config.backend;
+ // Pay-per-use proof: a non-holder who paid $THREE for this High generation
+ // presents the settled payment so the server's gate is satisfied per use.
+ if (payment?.payment_id && payment?.ref_id) {
+ body.payment_id = payment.payment_id;
+ body.ref_id = payment.ref_id;
+ }
const res = await fetch('/api/forge', {
method: 'POST',
- headers: { 'content-type': 'application/json', ...CLIENT_HEADERS },
- // No backend field: an explicit backend disables the server's health-aware
- // lane selection (see the header note), and the whole point here is letting
- // the router route around a cold or unhealthy lane before submit.
- body: JSON.stringify({
- prompt,
- aspect_ratio: '1:1',
- path: 'image',
- tier: 'standard',
- // Granite art-director pass (fail-soft): same photoreal-biased prompt
- // rewrite the full /forge page and every MCP tool already get.
- director: true,
- }),
+ headers: headers || { 'content-type': 'application/json', ...CLIENT_HEADERS },
+ body: JSON.stringify(body),
});
const data = await res.json().catch(() => ({}));
if (res.status === 503 || data.error === 'unconfigured') {
throw new Error('The generator is offline right now — try again in a bit.');
}
+ // High-tier $THREE gate reached the server despite the client guard (e.g. a
+ // keyboard submit). Recoverable: the controls' lock panel carries Get $THREE /
+ // pay-per-generation. Surface a clear, non-fatal message.
+ if (res.status === 402 && data.error === 'three_hold_required') {
+ throw new Error(
+ data.message || 'High quality is a $THREE holder feature — open Options to hold or pay per generation.',
+ );
+ }
if (res.status === 429 || data.error === 'rate_limited') {
const secs = Number(data.retry_after) > 0 ? Math.ceil(Number(data.retry_after)) : 10;
throw new Error(data.message || `The forge is busy. Try again in about ${secs} seconds.`);
@@ -530,10 +579,29 @@ function showResult(glbUrl, prompt, { fromHistory = false, creationId = '' } = {
}
}
-async function run(prompt) {
+async function run(prompt, { payment } = {}) {
if (busy) return;
closeEmbed();
lastPrompt = prompt;
+
+ // Resolve the Options config and clear the $THREE High gate BEFORE animating
+ // anything, so a blocked High submit opens the lock instead of flashing the
+ // pipeline. A settled pay-per-use proof bypasses the gate (it IS the
+ // clearance) and just assembles headers. With no controls, both paths fall
+ // through to the free standard defaults.
+ let config = DEFAULT_CFG;
+ let headers = { 'content-type': 'application/json', ...CLIENT_HEADERS };
+ if (controls) {
+ if (payment) {
+ headers = await controls.buildHeaders({ 'content-type': 'application/json' });
+ } else {
+ const gate = await controls.beforeSubmit({ 'content-type': 'application/json' });
+ if (!gate.ok) return; // High locked — the lock panel opened; nothing to animate
+ headers = gate.headers;
+ }
+ config = controls.getConfig();
+ }
+
pollAbort = false;
const seq = ++runSeq;
setBusy(true);
@@ -548,7 +616,7 @@ async function run(prompt) {
const viewerLoad = ensureModelViewer().catch((err) => err);
try {
- const job = await startJob(prompt);
+ const job = await startJob(prompt, { config, headers, payment });
if (seq !== runSeq) return; // cancelled while the POST was in flight
if (job.preview_image_url) {
@@ -822,7 +890,98 @@ function wireEmbed() {
els.embedCopy.addEventListener('click', copyEmbedCode);
}
+// Surprise me — drop a fresh, well-formed prompt into the bar and forge it. Uses
+// the same curated grammar (src/forge-prompt-gen.js) the full page's dice + the
+// "Surprise me" button run on, so the homepage rolls the exact same ideas.
+function surpriseMe() {
+ if (busy) return;
+ const prompt = generateForgePrompt();
+ els.prompt.value = prompt;
+ autoGrow();
+ run(prompt);
+}
+
+// Enhance — the art-director rewrite: POST the raw prompt to /api/forge-enhance
+// (Vertex Gemini → free LLM chain, fail-soft), which returns a richer single-
+// subject spec with per-part PBR materials. Free, no key. Non-destructive: the
+// field is only replaced when a materially different rewrite comes back.
+async function enhance() {
+ if (enhanceBusy || busy) return;
+ const raw = els.prompt.value.trim();
+ if (raw.length < 3) {
+ els.prompt.focus();
+ showToast('Describe the object in a few words first, then enhance it.');
+ return;
+ }
+ enhanceBusy = true;
+ if (els.enhance) {
+ els.enhance.disabled = true;
+ els.enhance.classList.add('is-working');
+ }
+ els.prompt.setAttribute('aria-busy', 'true');
+ try {
+ const res = await fetch('/api/forge-enhance', {
+ method: 'POST',
+ headers: { 'content-type': 'application/json', ...CLIENT_HEADERS },
+ body: JSON.stringify({ prompt: raw }),
+ });
+ if (res.status === 429) {
+ const data = await res.json().catch(() => ({}));
+ const secs = Number(data.retry_after);
+ showToast(secs > 0 ? `Easy — try enhancing again in ${secs}s.` : 'Slow down a moment, then try again.');
+ return;
+ }
+ if (res.status === 503) {
+ showToast('The enhancer is offline right now — your prompt is unchanged.');
+ return;
+ }
+ if (!res.ok) {
+ showToast("Couldn't enhance that one. Tweak the wording and retry.");
+ return;
+ }
+ const data = await res.json().catch(() => ({}));
+ const next = typeof data.prompt === 'string' ? data.prompt.trim() : '';
+ if (!next || next.toLowerCase() === raw.toLowerCase()) {
+ showToast('That prompt is already in good shape.');
+ return;
+ }
+ els.prompt.value = next;
+ autoGrow();
+ showToast('Rewritten for sharper geometry. Edit freely, or just Forge.');
+ } catch {
+ showToast('Network hiccup — your prompt is unchanged. Try again.');
+ } finally {
+ enhanceBusy = false;
+ if (els.enhance) {
+ els.enhance.disabled = busy;
+ els.enhance.classList.remove('is-working');
+ }
+ els.prompt.removeAttribute('aria-busy');
+ }
+}
+
function boot() {
+ // Bring up the Options controls (tier/engine/aspect/BYOK + $THREE High gate).
+ // The chamber owns generation; the controls only shape the request and gate
+ // High. onLane keeps the HUD honest ("high · NVIDIA"); onRerun re-fires the
+ // current prompt with a settled pay-per-use proof; onBlockedChange reflects the
+ // High lock onto the Forge button.
+ controls = initForgeControls({
+ root,
+ clientHeaders: CLIENT_HEADERS,
+ onLane: (label) => {
+ if (els.laneLabel) els.laneLabel.textContent = label;
+ },
+ onRerun: (payment) => {
+ const p = (els.prompt.value.trim() || lastPrompt || '').trim();
+ if (p) run(p, { payment });
+ },
+ onBlockedChange: (blocked) => {
+ highBlocked = blocked;
+ reflectGenerate();
+ },
+ });
+
els.form.addEventListener('submit', (e) => {
e.preventDefault();
const prompt = els.prompt.value.trim();
@@ -875,6 +1034,16 @@ function boot() {
if (lastPrompt && !busy) run(lastPrompt);
});
+ if (els.surprise) els.surprise.addEventListener('click', surpriseMe);
+ if (els.enhance) els.enhance.addEventListener('click', enhance);
+ // ⌘/Ctrl+E enhances — same shortcut as the full page.
+ els.prompt.addEventListener('keydown', (e) => {
+ if ((e.metaKey || e.ctrlKey) && (e.key === 'e' || e.key === 'E')) {
+ e.preventDefault();
+ enhance();
+ }
+ });
+
wireEmbed();
wireHeroBar();
renderHistory();
diff --git a/src/home-sniper.js b/src/home-sniper.js
index 02bb8a646..1e2157358 100644
--- a/src/home-sniper.js
+++ b/src/home-sniper.js
@@ -7,8 +7,12 @@
*
* · /api/sniper/status → worker liveness (alive / feed-live / degraded),
* strategies armed, open positions.
- * · /api/sniper/leaderboard → win rate, best ROI, initial tape backlog
- * (recent closed trades + currently-open positions).
+ * · /api/oracle/stats → launches scored in the last 24h.
+ * · /api/sniper/leaderboard → real_stats (on-chain-only wins, best multiple,
+ * best realized ROI, open count — SIMULATED fills
+ * excluded so the "no simulation" panel stays true),
+ * plus the initial tape backlog (recent closed trades
+ * + currently-open positions).
* · /api/sniper/stream → SSE of fresh buy / sell / re-quote events; each
* drives a packet through the pipeline and a row
* into the tape.
@@ -223,10 +227,16 @@ function applyStatus(root, s) {
function makeStatBand(root) {
const band = root.querySelector('#snipe-stats');
+ // The three headline numbers draw from two real sources, merged:
+ // scored_24h — oracle/stats: every pump.fun mint graded in 24h.
+ // real_wins — sniper/leaderboard real_stats: profitable trades closed
+ // on-chain (SIMULATED fills excluded), matching this panel's
+ // "real positions · no simulation" promise.
+ // best_multiple — top multiple a real position reached from entry (peak/entry).
const fields = [
{ el: root.querySelector('#snipe-stat-scored'), key: 'scored_24h', fmt: fmtCompact },
- { el: root.querySelector('#snipe-stat-wins'), key: 'total_wins', fmt: fmtCompact },
- { el: root.querySelector('#snipe-stat-ath'), key: 'best_ath', fmt: (n) => `${Number(n).toFixed(1)}×` },
+ { el: root.querySelector('#snipe-stat-wins'), key: 'real_wins', fmt: fmtCompact },
+ { el: root.querySelector('#snipe-stat-ath'), key: 'best_multiple', fmt: (n) => `${Number(n).toFixed(1)}×` },
];
let values = null;
let shown = false;
@@ -271,8 +281,11 @@ function makeStatBand(root) {
window.addEventListener('resize', onScroll, { passive: true });
return {
- set(data) {
- values = data;
+ // Merge partial data from either source (oracle stats / real leaderboard).
+ // Whichever arrives first seeds the band; the second fills the rest. The
+ // count-up still fires exactly once, on reveal, with whatever has landed.
+ merge(partial) {
+ values = { ...(values || {}), ...partial };
render(); // fires now if already in view; otherwise the scroll handler will
},
};
@@ -313,7 +326,10 @@ export function initHomeSniper() {
async function loadStats() {
try {
const r = await fetch(STATS_URL, { headers: { accept: 'application/json' } });
- if (r.ok) statBand.set(await r.json());
+ if (r.ok) {
+ const d = await r.json();
+ statBand.merge({ scored_24h: d.scored_24h });
+ }
} catch { /* non-fatal — placeholders stay */ }
}
@@ -331,14 +347,18 @@ export function initHomeSniper() {
const r = await fetch(BOARD_URL, { headers: { accept: 'application/json' } });
if (!r.ok) throw new Error(String(r.status));
const d = await r.json();
- const board = Array.isArray(d.leaderboard) ? d.leaderboard : [];
- const bestRoi = board.reduce((m, a) => (Number(a.roi_pct) > (m ?? -Infinity) ? Number(a.roi_pct) : m), null);
- const totalOpen = board.reduce((s, a) => s + (Number(a.open_positions) || 0), 0)
- || (Array.isArray(d.positions) ? d.positions.length : 0);
+ // Real, on-chain-only scoreboard — this panel promises "no simulation",
+ // so every KPI here draws from real_stats (SIMULATED fills excluded),
+ // never the trader-stats board (which counts paper fills for continuity).
+ const rs = d.real_stats || {};
+ const bestMultiple = rs.best_peak_multiple ?? rs.best_realized_multiple ?? 0;
+ statBand.merge({ real_wins: Number(rs.wins) || 0, best_multiple: Number(bestMultiple) || 0 });
+ const bestRoi = rs.best_realized_pct != null ? Number(rs.best_realized_pct) : null;
+ const realOpen = Number(rs.open) || 0;
setKpi(root, '#snipe-kpi-roi', bestRoi != null ? (fmtPct(bestRoi) || '—') : '—', true);
- setKpi(root, '#snipe-kpi-open', fmtCompact(totalOpen));
+ setKpi(root, '#snipe-kpi-open', fmtCompact(realOpen));
// Seed the tape from real history: most recent closed trades, then open holds.
const seedTrades = (d.trades || []).slice(0, MAX_ROWS).map((t) => ({
diff --git a/src/pulse.js b/src/pulse.js
index 213ef3730..bd8f2187c 100644
--- a/src/pulse.js
+++ b/src/pulse.js
@@ -26,7 +26,10 @@ const $ = (id) => document.getElementById(id);
// Map of data-filter values → the feed type string the component understands.
const FILTER_TO_TYPE = { all: 'all', tips: 'tips', launches: 'launches', trades: 'trades', payments: 'payments', purchases: 'purchases' };
-const FILTER_LABEL = { tips: 'Tips', launches: 'Launches', trades: 'Trades', payments: 'Payments', purchases: 'Marketplace' };
+// Label the active-filter chip to match the feed's own tab (which highlights
+// "Purchases") and the 'purchase' beat kind, so clicking the Marketplace stat card
+// doesn't show "Showing: Marketplace" while the Purchases tab is lit.
+const FILTER_LABEL = { tips: 'Tips', launches: 'Launches', trades: 'Trades', payments: 'Payments', purchases: 'Purchases' };
function setFeedFilter(filter) {
const f = FILTER_TO_TYPE[filter] || 'all';
diff --git a/src/shared/money-pulse.js b/src/shared/money-pulse.js
index 69139d61d..52d0c611b 100644
--- a/src/shared/money-pulse.js
+++ b/src/shared/money-pulse.js
@@ -45,6 +45,19 @@ const FILTERS = [
{ id: 'purchases', label: 'Purchases' },
];
+// When a single filter is empty on the global mainnet feed, invite the action that
+// actually creates that beat instead of a dead end. Every link resolves to a live
+// surface. The self-heal probe still layers a one-click "show all activity" escape
+// on top of this, so the user gets both: how to create this kind, and where the
+// platform is busy right now.
+const FILTER_EMPTY_CTA = {
+ tips: 'No tips in this window. <a href="/agents">Tip an agent</a> to start the flow.',
+ launches: 'No launches in this window. <a href="/launch">Launch a coin</a> and be the first beat.',
+ trades: 'No trades in this window. <a href="/oracle">Arm an agent</a> to trade live.',
+ payments: 'No agent-to-agent payments in this window. <a href="/x402">Pay for a service</a> over x402.',
+ purchases: 'No skill purchases yet. <a href="/marketplace">Browse the marketplace</a>. Every paid buy lands here live.',
+};
+
let _stylesInjected = false;
function injectStyles() {
if (_stylesInjected || typeof document === 'undefined') return;
@@ -563,7 +576,9 @@ export function mountMoneyPulse({
|| (agentId
? 'This wallet has no public activity yet.'
: filtered
- ? `No ${typeLabel} on ${onDevnet ? 'devnet' : 'three.ws'} in this window.`
+ ? (!onDevnet && FILTER_EMPTY_CTA[state.type]
+ ? FILTER_EMPTY_CTA[state.type]
+ : `No ${typeLabel} on ${onDevnet ? 'devnet' : 'three.ws'} in this window.`)
: onDevnet
? 'Devnet is a test network — most live money moves on mainnet. Switch to see the real feed.'
: 'All quiet on three.ws right now. <a href="/agents">Tip an agent</a> and be the first beat.');
diff --git a/workers/avatar-reconstruction/face_geometry.py b/workers/avatar-reconstruction/face_geometry.py
new file mode 100644
index 000000000..3f73cb238
--- /dev/null
+++ b/workers/avatar-reconstruction/face_geometry.py
@@ -0,0 +1,216 @@
+"""
+Selfie → 3D face-shape identity morph (Phase 2: geometry, not just texture).
+
+Phase 1 (face_pipeline.py) only paints the user's face texture onto a generic
+Wolf3D head, so the *shape* — face width, jaw, nose projection, brow, cheekbones
+— stays that of the template. This module recovers the person's actual face
+geometry from a single photo and reshapes the template head to match, which is
+the difference between "a face sticker on a mannequin" and an avatar that reads
+as the same person (the gap vs Avaturn).
+
+Approach — sparse-to-dense identity transfer, fully commercial-clean:
+ 1. MediaPipe FaceMesh (Apache-2.0, already a dependency) → 468 3D landmarks.
+ 2. Umeyama similarity-align the detected landmarks onto MediaPipe's neutral
+ canonical face model (shared frame). The residual (person - canonical) on a
+ stable identity subset IS the person's face-shape deviation from neutral.
+ 3. Carry that per-landmark displacement onto the template head's corresponding
+ vertices (precomputed nearest-vertex map), scaled into head units.
+ 4. Diffuse the sparse displacements across all head vertices with a normalised
+ Gaussian RBF (partition of unity — local, bounded, never extrapolates), and
+ fade to zero outside the face region so the neck, scalp and back of the head
+ stay put.
+ 5. face_pipeline writes the morphed positions back with glb_ops.set_head_geometry,
+ which preserves skinning and all 52 ARKit blendshapes + visemes.
+
+Everything below the MediaPipe adapter is pure numpy and is unit-tested with
+synthetic landmarks, so the geometry math is verifiable without a GPU or a photo.
+"""
+
+from __future__ import annotations
+
+import json
+import logging
+from pathlib import Path
+from typing import Optional
+
+import numpy as np
+
+log = logging.getLogger("face_geometry")
+
+HERE = Path(__file__).parent
+FACE_MAP_PATH = HERE / "face_uv_map.json"
+
+# Landmarks that encode stable identity (bone/cartilage structure) rather than
+# transient expression. We deliberately exclude the eyeballs/irises (468-477),
+# inner lips and tongue: a smile or blink in the selfie must not deform the rest
+# pose of the avatar. Face oval, nose bridge/tip, cheeks, brow ridge, jawline.
+_STABLE_IDENTITY_INDICES = [
+ # face oval / silhouette
+ 10, 338, 297, 332, 284, 251, 389, 356, 454, 323, 361, 288,
+ 397, 365, 379, 378, 400, 377, 152, 148, 176, 149, 150, 136,
+ 172, 58, 132, 93, 234, 127, 162, 21, 54, 103, 67, 109,
+ # nose bridge + tip + alae
+ 6, 197, 195, 5, 4, 1, 19, 94, 2, 98, 327, 129, 358,
+ # cheeks / malar
+ 50, 280, 116, 345, 117, 346, 118, 347, 205, 425,
+ # brow ridge
+ 107, 336, 66, 296, 105, 334, 63, 293,
+ # jaw / chin
+ 32, 262, 211, 431, 170, 395, 208, 428,
+]
+
+
+class FaceMap:
+ """Precomputed template↔canonical correspondence (built by precompute_uv.py)."""
+
+ def __init__(self, data: dict):
+ self.canonical_norm = np.asarray(data["canonical_norm"], dtype=np.float64) # (468,3)
+ self.landmark_vtx = np.asarray(data["landmark_vtx"], dtype=np.int64) # (468,)
+ self.head_face_scale = float(data["head_face_scale"])
+ n = self.canonical_norm.shape[0]
+ self.stable_indices = np.asarray(
+ [i for i in data.get("stable_indices", _STABLE_IDENTITY_INDICES) if i < n],
+ dtype=np.int64,
+ )
+
+ @classmethod
+ def load(cls, path: Path = FACE_MAP_PATH) -> Optional["FaceMap"]:
+ if not path.exists():
+ return None
+ data = json.loads(path.read_text())
+ if "canonical_norm" not in data or "landmark_vtx" not in data:
+ # Older texture-only map without geometry fields — geometry morph off.
+ return None
+ return cls(data)
+
+
+# ── alignment ────────────────────────────────────────────────────────────────
+
+def umeyama(src: np.ndarray, dst: np.ndarray) -> tuple[float, np.ndarray, np.ndarray]:
+ """
+ Least-squares similarity transform (scale s, rotation R, translation t) that
+ best maps src → dst (both (N,3)). Umeyama 1991. Returns (s, R, t) with
+ dst ≈ s * R @ src + t.
+ """
+ src = np.asarray(src, dtype=np.float64)
+ dst = np.asarray(dst, dtype=np.float64)
+ mu_s, mu_d = src.mean(0), dst.mean(0)
+ sc, dc = src - mu_s, dst - mu_d
+ cov = (dc.T @ sc) / src.shape[0]
+ U, D, Vt = np.linalg.svd(cov)
+ S = np.eye(3)
+ if np.linalg.det(U) * np.linalg.det(Vt) < 0:
+ S[2, 2] = -1.0 # reflection guard — keep a proper rotation
+ R = U @ S @ Vt
+ var_s = (sc ** 2).sum() / src.shape[0]
+ s = float((D * np.diag(S)).sum() / var_s) if var_s > 0 else 1.0
+ t = mu_d - s * (R @ mu_s)
+ return s, R, t
+
+
+def _apply(s: float, R: np.ndarray, t: np.ndarray, pts: np.ndarray) -> np.ndarray:
+ return (s * (R @ pts.T)).T + t
+
+
+# ── the morph ────────────────────────────────────────────────────────────────
+
+def morph_head_to_landmarks(
+ base_positions: np.ndarray,
+ face_map: FaceMap,
+ detected_landmarks: np.ndarray,
+ *,
+ strength: float = 0.75,
+ max_displacement_frac: float = 0.18,
+ falloff: float = 1.6,
+) -> np.ndarray:
+ """
+ Reshape the template head to the person's face identity.
+
+ Args:
+ base_positions: (V,3) template head vertices (head/metre space).
+ face_map: precomputed correspondence + scale.
+ detected_landmarks: (468,3) MediaPipe landmarks for the selfie. May be
+ (478,3) with irises — extra rows are ignored.
+ strength: 0..1 how strongly to move toward the person's shape.
+ <1 keeps the result on a plausible face manifold.
+ max_displacement_frac: clamp per-control displacement to this fraction of
+ the face scale — rejects landmark/pose outliers.
+ falloff: Gaussian RBF radius as a multiple of the median
+ control-point spacing. Larger = smoother/broader.
+
+ Returns:
+ (V,3) float32 morphed vertices. Vertex count/order unchanged, so the
+ caller can write them back without disturbing skinning or blendshapes.
+ """
+ base = np.asarray(base_positions, dtype=np.float64)
+ canon = face_map.canonical_norm # (468,3), unit-cube frame
+ idx = face_map.stable_indices
+ det = np.asarray(detected_landmarks, dtype=np.float64)[: canon.shape[0]]
+
+ # 1. Similarity-align the person's landmarks onto the neutral canonical face,
+ # using only stable identity points, then measure the residual there.
+ s, R, t = umeyama(det[idx], canon[idx])
+ det_aligned = _apply(s, R, t, det) # person in canonical frame
+ residual = det_aligned - canon # identity deviation (norm units)
+
+ # 2. Carry to head units and clamp outliers.
+ disp = residual[idx] * face_map.head_face_scale * float(strength) # (K,3)
+ clamp = max_displacement_frac * face_map.head_face_scale
+ mag = np.linalg.norm(disp, axis=1, keepdims=True)
+ over = (mag > clamp).ravel()
+ if over.any():
+ disp[over] *= (clamp / mag[over])
+
+ # 3. Control points = the template vertices those stable landmarks map to.
+ ctrl_vtx = face_map.landmark_vtx[idx]
+ ctrl_pos = base[ctrl_vtx] # (K,3) in head space
+
+ # Deduplicate control vertices (several landmarks can share a nearest vertex);
+ # average their displacements so no vertex is double-weighted.
+ uniq, inv = np.unique(ctrl_vtx, return_inverse=True)
+ acc = np.zeros((uniq.shape[0], 3)); cnt = np.zeros((uniq.shape[0], 1))
+ np.add.at(acc, inv, disp); np.add.at(cnt, inv, 1.0)
+ ctrl_pos = base[uniq]
+ ctrl_disp = acc / np.maximum(cnt, 1.0)
+
+ # 4. Normalised-Gaussian RBF (partition of unity): every head vertex gets a
+ # weighted average of nearby control displacements. Bounded and local — no
+ # thin-plate extrapolation blow-ups on the neck or scalp.
+ spacing = _median_nn_spacing(ctrl_pos)
+ sigma = max(spacing * float(falloff), 1e-4)
+ d2 = _pairwise_sq(base, ctrl_pos) # (V,K)
+ w = np.exp(-d2 / (2.0 * sigma * sigma))
+ wsum = w.sum(1, keepdims=True)
+
+ # Locality mask: fade the morph to zero where the nearest control point is
+ # far away (back of head, neck), so only the face region actually moves.
+ nearest = np.sqrt(d2.min(1, keepdims=True))
+ mask = np.exp(-(nearest ** 2) / (2.0 * (sigma * 2.0) ** 2))
+
+ safe = wsum.ravel() > 1e-12
+ field = np.zeros_like(base)
+ field[safe] = (w[safe] @ ctrl_disp) / wsum[safe]
+ field *= mask
+
+ return (base + field).astype(np.float32)
+
+
+def _pairwise_sq(a: np.ndarray, b: np.ndarray) -> np.ndarray:
+ """Squared Euclidean distances, (len(a), len(b))."""
+ return ((a[:, None, :] - b[None, :, :]) ** 2).sum(-1)
+
+
+def _median_nn_spacing(pts: np.ndarray) -> float:
+ if pts.shape[0] < 2:
+ return 1.0
+ d2 = _pairwise_sq(pts, pts)
+ np.fill_diagonal(d2, np.inf)
+ return float(np.median(np.sqrt(d2.min(1))))
+
+
+# ── MediaPipe adapter ────────────────────────────────────────────────────────
+
+def landmarks_to_array(landmarks) -> np.ndarray:
+ """MediaPipe NormalizedLandmark list → (N,3) array. y is flipped to +up so the
+ frame matches the canonical model (image space is y-down)."""
+ return np.array([[lm.x, -lm.y, lm.z] for lm in landmarks], dtype=np.float64)
diff --git a/workers/avatar-reconstruction/face_pipeline.py b/workers/avatar-reconstruction/face_pipeline.py
index f29e7e387..eb53a8cdc 100644
--- a/workers/avatar-reconstruction/face_pipeline.py
+++ b/workers/avatar-reconstruction/face_pipeline.py
@@ -32,6 +32,7 @@ from PIL import Image, ImageFilter
from scipy.interpolate import RBFInterpolator
import glb_ops
+import face_geometry
import pygltflib
from worker_security import UnsafeUrlError, fetch_remote_bytes
@@ -43,6 +44,21 @@ HERE = Path(__file__).parent
UV_MAP_PATH = HERE / "face_uv_map.json"
TEMPLATES_DIR = HERE / "templates"
+# Phase 2: reshape the head to the person's actual face structure (not just paint
+# the texture). Default on; set GEOMETRY_MORPH=0 to fall back to texture-only.
+GEOMETRY_MORPH_ENABLED = os.environ.get("GEOMETRY_MORPH", "1") != "0"
+
+_FACE_MAP: Optional[face_geometry.FaceMap] = None
+_FACE_MAP_LOADED = False
+
+
+def _get_face_map() -> Optional[face_geometry.FaceMap]:
+ global _FACE_MAP, _FACE_MAP_LOADED
+ if not _FACE_MAP_LOADED:
+ _FACE_MAP = face_geometry.FaceMap.load()
+ _FACE_MAP_LOADED = True
+ return _FACE_MAP
+
# ── MediaPipe setup ────────────────────────────────────────────────────────────
_mp_face_mesh = mp.solutions.face_mesh
@@ -524,6 +540,30 @@ def process(
eye_rgb_norm = (eye_colour / 255.0).tolist()
glb_ops.set_material_base_color(glb, "Wolf3D_Eye", eye_rgb_norm + [1.0])
+ # 10b. Geometry morph — reshape the head to the person's actual face structure
+ # (face width, jaw, nose projection, brow), so the avatar reads as the same
+ # person rather than the user's texture on a generic head. Runs last because
+ # it overwrites POSITION/NORMAL in place; texture edits above already settled
+ # the blob. Degrades cleanly to texture-only if the map lacks geometry fields
+ # or anything goes wrong — never fails a job over the shape refinement.
+ if GEOMETRY_MORPH_ENABLED:
+ try:
+ fmap = _get_face_map()
+ if fmap is not None:
+ base_pos, _, faces = glb_ops.get_head_mesh_data(glb)
+ detected = face_geometry.landmarks_to_array(landmarks)
+ if detected.shape[0] >= fmap.canonical_norm.shape[0]:
+ morphed = face_geometry.morph_head_to_landmarks(base_pos, fmap, detected)
+ glb_ops.set_head_geometry(glb, morphed, faces=faces)
+ log.info("[%s] head geometry morphed to face identity (%.1fs)",
+ job_id, time.time() - t0)
+ else:
+ log.warning("[%s] only %d landmarks — skipping geometry morph",
+ job_id, detected.shape[0])
+ except Exception as exc: # noqa: BLE001 — refinement must never fail the job
+ log.warning("[%s] geometry morph failed (%s) — keeping template shape",
+ job_id, exc)
+
# 11. Serialize.
result = glb_ops.save_glb(glb)
log.info("[%s] pipeline done in %.1fs — %d bytes", job_id, time.time() - t0, len(result))
diff --git a/workers/avatar-reconstruction/face_uv_map.json b/workers/avatar-reconstruction/face_uv_map.json
new file mode 100644
index 000000000..b5efe1d4c
--- /dev/null
+++ b/workers/avatar-reconstruction/face_uv_map.json
@@ -0,0 +1,5686 @@
+{
+ "texture_width": 1024,
+ "texture_height": 1024,
+ "landmarks": [
+ {
+ "u": 0.49790000915527344,
+ "v": 0.5037000179290771,
+ "px": 509.849609375,
+ "py": 515.788818359375
+ },
+ {
+ "u": 0.49939998984336853,
+ "v": 0.4050999879837036,
+ "px": 511.3855895996094,
+ "py": 414.8223876953125
+ },
+ {
+ "u": 0.4986000061035156,
+ "v": 0.4603999853134155,
+ "px": 510.56640625,
+ "py": 471.4495849609375
+ },
+ {
+ "u": 0.4934000074863434,
+ "v": 0.3871999979019165,
+ "px": 505.2416076660156,
+ "py": 396.4927978515625
+ },
+ {
+ "u": 0.49950000643730164,
+ "v": 0.3986999988555908,
+ "px": 511.4880065917969,
+ "py": 408.268798828125
+ },
+ {
+ "u": 0.49950000643730164,
+ "v": 0.3986999988555908,
+ "px": 511.4880065917969,
+ "py": 408.268798828125
+ },
+ {
+ "u": 0.4996500015258789,
+ "v": 0.33274996280670166,
+ "px": 511.6416015625,
+ "py": 340.7359619140625
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.499099999666214,
+ "v": 0.2892000079154968,
+ "px": 511.0783996582031,
+ "py": 296.14080810546875
+ },
+ {
+ "u": 0.499099999666214,
+ "v": 0.2782999873161316,
+ "px": 511.0783996582031,
+ "py": 284.97918701171875
+ },
+ {
+ "u": 0.49914997816085815,
+ "v": 0.21165001392364502,
+ "px": 511.12957763671875,
+ "py": 216.7296142578125
+ },
+ {
+ "u": 0.49790000915527344,
+ "v": 0.5037000179290771,
+ "px": 509.849609375,
+ "py": 515.788818359375
+ },
+ {
+ "u": 0.4977000057697296,
+ "v": 0.5090999603271484,
+ "px": 509.6448059082031,
+ "py": 521.318359375
+ },
+ {
+ "u": 0.4977000057697296,
+ "v": 0.5090999603271484,
+ "px": 509.6448059082031,
+ "py": 521.318359375
+ },
+ {
+ "u": 0.4977000057697296,
+ "v": 0.5112999677658081,
+ "px": 509.6448059082031,
+ "py": 523.5711669921875
+ },
+ {
+ "u": 0.4977000057697296,
+ "v": 0.5112999677658081,
+ "px": 509.6448059082031,
+ "py": 523.5711669921875
+ },
+ {
+ "u": 0.4977000057697296,
+ "v": 0.5112999677658081,
+ "px": 509.6448059082031,
+ "py": 523.5711669921875
+ },
+ {
+ "u": 0.49755001068115234,
+ "v": 0.5432000160217285,
+ "px": 509.4912109375,
+ "py": 556.23681640625
+ },
+ {
+ "u": 0.49755001068115234,
+ "v": 0.5432000160217285,
+ "px": 509.4912109375,
+ "py": 556.23681640625
+ },
+ {
+ "u": 0.49939998984336853,
+ "v": 0.4050999879837036,
+ "px": 511.3855895996094,
+ "py": 414.8223876953125
+ },
+ {
+ "u": 0.49459999799728394,
+ "v": 0.4114999771118164,
+ "px": 506.47039794921875,
+ "py": 421.3759765625
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.41370001435279846,
+ "v": 0.33639997243881226,
+ "px": 423.6288146972656,
+ "py": 344.47357177734375
+ },
+ {
+ "u": 0.4068000018596649,
+ "v": 0.3367000222206116,
+ "px": 416.5632019042969,
+ "py": 344.78082275390625
+ },
+ {
+ "u": 0.39625000953674316,
+ "v": 0.33515000343322754,
+ "px": 405.760009765625,
+ "py": 343.193603515625
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.4203999936580658,
+ "v": 0.3330000042915344,
+ "px": 430.4895935058594,
+ "py": 340.99200439453125
+ },
+ {
+ "u": 0.42239999771118164,
+ "v": 0.2993500232696533,
+ "px": 432.53759765625,
+ "py": 306.534423828125
+ },
+ {
+ "u": 0.42239999771118164,
+ "v": 0.2993500232696533,
+ "px": 432.53759765625,
+ "py": 306.534423828125
+ },
+ {
+ "u": 0.40674999356269836,
+ "v": 0.29809999465942383,
+ "px": 416.5119934082031,
+ "py": 305.25439453125
+ },
+ {
+ "u": 0.3935999870300293,
+ "v": 0.2913999557495117,
+ "px": 403.04638671875,
+ "py": 298.3935546875
+ },
+ {
+ "u": 0.39424997568130493,
+ "v": 0.33945000171661377,
+ "px": 403.71197509765625,
+ "py": 347.5968017578125
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.40974998474121094,
+ "v": 0.42274999618530273,
+ "px": 419.583984375,
+ "py": 432.89599609375
+ },
+ {
+ "u": 0.4832000136375427,
+ "v": 0.4686000347137451,
+ "px": 494.79681396484375,
+ "py": 479.846435546875
+ },
+ {
+ "u": 0.48614999651908875,
+ "v": 0.5087000131607056,
+ "px": 497.8175964355469,
+ "py": 520.9088134765625
+ },
+ {
+ "u": 0.4652000069618225,
+ "v": 0.5018999576568604,
+ "px": 476.36480712890625,
+ "py": 513.945556640625
+ },
+ {
+ "u": 0.4486500024795532,
+ "v": 0.5059000253677368,
+ "px": 459.4176025390625,
+ "py": 518.0416259765625
+ },
+ {
+ "u": 0.47290000319480896,
+ "v": 0.5077999830245972,
+ "px": 484.2496032714844,
+ "py": 519.9871826171875
+ },
+ {
+ "u": 0.46140000224113464,
+ "v": 0.5115000009536743,
+ "px": 472.4736022949219,
+ "py": 523.7760009765625
+ },
+ {
+ "u": 0.43160000443458557,
+ "v": 0.5368000268936157,
+ "px": 441.9584045410156,
+ "py": 549.6832275390625
+ },
+ {
+ "u": 0.49390000104904175,
+ "v": 0.40539997816085815,
+ "px": 505.75360107421875,
+ "py": 415.12957763671875
+ },
+ {
+ "u": 0.4936000108718872,
+ "v": 0.39910000562667847,
+ "px": 505.4464111328125,
+ "py": 408.67840576171875
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.4540500044822693,
+ "v": 0.36582499742507935,
+ "px": 464.94720458984375,
+ "py": 374.60479736328125
+ },
+ {
+ "u": 0.4634000062942505,
+ "v": 0.4104999899864197,
+ "px": 474.5216064453125,
+ "py": 420.35198974609375
+ },
+ {
+ "u": 0.46209999918937683,
+ "v": 0.40679997205734253,
+ "px": 473.1903991699219,
+ "py": 416.56317138671875
+ },
+ {
+ "u": 0.37059998512268066,
+ "v": 0.40460002422332764,
+ "px": 379.494384765625,
+ "py": 414.3104248046875
+ },
+ {
+ "u": 0.4936000108718872,
+ "v": 0.39910000562667847,
+ "px": 505.4464111328125,
+ "py": 408.67840576171875
+ },
+ {
+ "u": 0.41100001335144043,
+ "v": 0.2632499933242798,
+ "px": 420.864013671875,
+ "py": 269.5679931640625
+ },
+ {
+ "u": 0.3919000029563904,
+ "v": 0.27300000190734863,
+ "px": 401.30560302734375,
+ "py": 279.552001953125
+ },
+ {
+ "u": 0.3885999917984009,
+ "v": 0.2498999834060669,
+ "px": 397.9263916015625,
+ "py": 255.8975830078125
+ },
+ {
+ "u": 0.4740000069141388,
+ "v": 0.28939998149871826,
+ "px": 485.3760070800781,
+ "py": 296.3455810546875
+ },
+ {
+ "u": 0.4366999864578247,
+ "v": 0.30984997749328613,
+ "px": 447.1807861328125,
+ "py": 317.286376953125
+ },
+ {
+ "u": 0.41404998302459717,
+ "v": 0.5131999850273132,
+ "px": 423.9871826171875,
+ "py": 525.5167846679688
+ },
+ {
+ "u": 0.37870001792907715,
+ "v": 0.48124998807907104,
+ "px": 387.788818359375,
+ "py": 492.79998779296875
+ },
+ {
+ "u": 0.47360000014305115,
+ "v": 0.41100001335144043,
+ "px": 484.9664001464844,
+ "py": 420.864013671875
+ },
+ {
+ "u": 0.4875999987125397,
+ "v": 0.4179500341415405,
+ "px": 499.3023986816406,
+ "py": 427.9808349609375
+ },
+ {
+ "u": 0.43459999561309814,
+ "v": 0.5211499929428101,
+ "px": 445.0303955078125,
+ "py": 533.6575927734375
+ },
+ {
+ "u": 0.43459999561309814,
+ "v": 0.5211499929428101,
+ "px": 445.0303955078125,
+ "py": 533.6575927734375
+ },
+ {
+ "u": 0.39010000228881836,
+ "v": 0.2595999836921692,
+ "px": 399.46240234375,
+ "py": 265.83038330078125
+ },
+ {
+ "u": 0.4641000032424927,
+ "v": 0.4138000011444092,
+ "px": 475.2384033203125,
+ "py": 423.731201171875
+ },
+ {
+ "u": 0.447299987077713,
+ "v": 0.272599995136261,
+ "px": 458.0351867675781,
+ "py": 279.14239501953125
+ },
+ {
+ "u": 0.43220001459121704,
+ "v": 0.26819998025894165,
+ "px": 442.57281494140625,
+ "py": 274.63677978515625
+ },
+ {
+ "u": 0.4419500231742859,
+ "v": 0.21029996871948242,
+ "px": 452.55682373046875,
+ "py": 215.34716796875
+ },
+ {
+ "u": 0.3885999917984009,
+ "v": 0.2498999834060669,
+ "px": 397.9263916015625,
+ "py": 255.8975830078125
+ },
+ {
+ "u": 0.43059998750686646,
+ "v": 0.24809998273849487,
+ "px": 440.93438720703125,
+ "py": 254.05438232421875
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.48694998025894165,
+ "v": 0.503250002861023,
+ "px": 498.63677978515625,
+ "py": 515.3280029296875
+ },
+ {
+ "u": 0.46369999647140503,
+ "v": 0.5067000389099121,
+ "px": 474.82879638671875,
+ "py": 518.86083984375
+ },
+ {
+ "u": 0.4486500024795532,
+ "v": 0.5059000253677368,
+ "px": 459.4176025390625,
+ "py": 518.0416259765625
+ },
+ {
+ "u": 0.47360000014305115,
+ "v": 0.41100001335144043,
+ "px": 484.9664001464844,
+ "py": 420.864013671875
+ },
+ {
+ "u": 0.43459999561309814,
+ "v": 0.5211499929428101,
+ "px": 445.0303955078125,
+ "py": 533.6575927734375
+ },
+ {
+ "u": 0.4412499964237213,
+ "v": 0.5146999955177307,
+ "px": 451.8399963378906,
+ "py": 527.0527954101562
+ },
+ {
+ "u": 0.43459999561309814,
+ "v": 0.5211499929428101,
+ "px": 445.0303955078125,
+ "py": 533.6575927734375
+ },
+ {
+ "u": 0.4887000024318695,
+ "v": 0.4057999849319458,
+ "px": 500.4288024902344,
+ "py": 415.5391845703125
+ },
+ {
+ "u": 0.46140000224113464,
+ "v": 0.5115000009536743,
+ "px": 472.4736022949219,
+ "py": 523.7760009765625
+ },
+ {
+ "u": 0.4722999930381775,
+ "v": 0.5101000070571899,
+ "px": 483.63519287109375,
+ "py": 522.3424072265625
+ },
+ {
+ "u": 0.48614999651908875,
+ "v": 0.5087000131607056,
+ "px": 497.8175964355469,
+ "py": 520.9088134765625
+ },
+ {
+ "u": 0.48360002040863037,
+ "v": 0.5436000227928162,
+ "px": 495.2064208984375,
+ "py": 556.6464233398438
+ },
+ {
+ "u": 0.48045000433921814,
+ "v": 0.5382000207901001,
+ "px": 491.9808044433594,
+ "py": 551.1168212890625
+ },
+ {
+ "u": 0.48475000262260437,
+ "v": 0.513700008392334,
+ "px": 496.3840026855469,
+ "py": 526.02880859375
+ },
+ {
+ "u": 0.4857500195503235,
+ "v": 0.510949969291687,
+ "px": 497.40802001953125,
+ "py": 523.2127685546875
+ },
+ {
+ "u": 0.4857500195503235,
+ "v": 0.510949969291687,
+ "px": 497.40802001953125,
+ "py": 523.2127685546875
+ },
+ {
+ "u": 0.4549500048160553,
+ "v": 0.5188499689102173,
+ "px": 465.8688049316406,
+ "py": 531.3023681640625
+ },
+ {
+ "u": 0.4549500048160553,
+ "v": 0.5188499689102173,
+ "px": 465.8688049316406,
+ "py": 531.3023681640625
+ },
+ {
+ "u": 0.4549500048160553,
+ "v": 0.5188499689102173,
+ "px": 465.8688049316406,
+ "py": 531.3023681640625
+ },
+ {
+ "u": 0.44769999384880066,
+ "v": 0.5260000228881836,
+ "px": 458.4447937011719,
+ "py": 538.6240234375
+ },
+ {
+ "u": 0.4334000051021576,
+ "v": 0.47130000591278076,
+ "px": 443.8016052246094,
+ "py": 482.6112060546875
+ },
+ {
+ "u": 0.3686999976634979,
+ "v": 0.4399750232696533,
+ "px": 377.5487976074219,
+ "py": 450.534423828125
+ },
+ {
+ "u": 0.4991999864578247,
+ "v": 0.41130000352859497,
+ "px": 511.1807861328125,
+ "py": 421.17120361328125
+ },
+ {
+ "u": 0.4412499964237213,
+ "v": 0.5146999955177307,
+ "px": 451.8399963378906,
+ "py": 527.0527954101562
+ },
+ {
+ "u": 0.4412499964237213,
+ "v": 0.5146999955177307,
+ "px": 451.8399963378906,
+ "py": 527.0527954101562
+ },
+ {
+ "u": 0.48159998655319214,
+ "v": 0.45819997787475586,
+ "px": 493.15838623046875,
+ "py": 469.19677734375
+ },
+ {
+ "u": 0.4501500129699707,
+ "v": 0.44840002059936523,
+ "px": 460.95361328125,
+ "py": 459.16162109375
+ },
+ {
+ "u": 0.48159998655319214,
+ "v": 0.45819997787475586,
+ "px": 493.15838623046875,
+ "py": 469.19677734375
+ },
+ {
+ "u": 0.4319000244140625,
+ "v": 0.3804749846458435,
+ "px": 442.265625,
+ "py": 389.60638427734375
+ },
+ {
+ "u": 0.3971499800682068,
+ "v": 0.4086500406265259,
+ "px": 406.68157958984375,
+ "py": 418.4576416015625
+ },
+ {
+ "u": 0.4537000060081482,
+ "v": 0.4169999957084656,
+ "px": 464.58880615234375,
+ "py": 427.00799560546875
+ },
+ {
+ "u": 0.4066750109195709,
+ "v": 0.22882497310638428,
+ "px": 416.4352111816406,
+ "py": 234.3167724609375
+ },
+ {
+ "u": 0.4066750109195709,
+ "v": 0.22882497310638428,
+ "px": 416.4352111816406,
+ "py": 234.3167724609375
+ },
+ {
+ "u": 0.41100001335144043,
+ "v": 0.2632499933242798,
+ "px": 420.864013671875,
+ "py": 269.5679931640625
+ },
+ {
+ "u": 0.4507000148296356,
+ "v": 0.5440000295639038,
+ "px": 461.5168151855469,
+ "py": 557.0560302734375
+ },
+ {
+ "u": 0.46209999918937683,
+ "v": 0.2759000062942505,
+ "px": 473.1903991699219,
+ "py": 282.5216064453125
+ },
+ {
+ "u": 0.47210001945495605,
+ "v": 0.23559999465942383,
+ "px": 483.430419921875,
+ "py": 241.25439453125
+ },
+ {
+ "u": 0.4565500020980835,
+ "v": 0.21085000038146973,
+ "px": 467.5072021484375,
+ "py": 215.910400390625
+ },
+ {
+ "u": 0.3970000147819519,
+ "v": 0.3331500291824341,
+ "px": 406.52801513671875,
+ "py": 341.1456298828125
+ },
+ {
+ "u": 0.39424997568130493,
+ "v": 0.33945000171661377,
+ "px": 403.71197509765625,
+ "py": 347.5968017578125
+ },
+ {
+ "u": 0.44419997930526733,
+ "v": 0.32130002975463867,
+ "px": 454.86077880859375,
+ "py": 329.01123046875
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.470550000667572,
+ "v": 0.3585624694824219,
+ "px": 481.84320068359375,
+ "py": 367.16796875
+ },
+ {
+ "u": 0.4811500012874603,
+ "v": 0.40654999017715454,
+ "px": 492.6976013183594,
+ "py": 416.30718994140625
+ },
+ {
+ "u": 0.37059998512268066,
+ "v": 0.40460002422332764,
+ "px": 379.494384765625,
+ "py": 414.3104248046875
+ },
+ {
+ "u": 0.37059998512268066,
+ "v": 0.40460002422332764,
+ "px": 379.494384765625,
+ "py": 414.3104248046875
+ },
+ {
+ "u": 0.3853999972343445,
+ "v": 0.3853999972343445,
+ "px": 394.64959716796875,
+ "py": 394.64959716796875
+ },
+ {
+ "u": 0.4012500047683716,
+ "v": 0.37839996814727783,
+ "px": 410.8800048828125,
+ "py": 387.4815673828125
+ },
+ {
+ "u": 0.4276999831199646,
+ "v": 0.3623499870300293,
+ "px": 437.96478271484375,
+ "py": 371.04638671875
+ },
+ {
+ "u": 0.43834999203681946,
+ "v": 0.35519999265670776,
+ "px": 448.8703918457031,
+ "py": 363.72479248046875
+ },
+ {
+ "u": 0.49207502603530884,
+ "v": 0.35455000400543213,
+ "px": 503.88482666015625,
+ "py": 363.0592041015625
+ },
+ {
+ "u": 0.37059998512268066,
+ "v": 0.40460002422332764,
+ "px": 379.494384765625,
+ "py": 414.3104248046875
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.49939998984336853,
+ "v": 0.4050999879837036,
+ "px": 511.3855895996094,
+ "py": 414.8223876953125
+ },
+ {
+ "u": 0.45739999413490295,
+ "v": 0.3970000147819519,
+ "px": 468.3775939941406,
+ "py": 406.52801513671875
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.4658750295639038,
+ "v": 0.33802497386932373,
+ "px": 477.0560302734375,
+ "py": 346.1375732421875
+ },
+ {
+ "u": 0.45159998536109924,
+ "v": 0.413100004196167,
+ "px": 462.4383850097656,
+ "py": 423.014404296875
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.47975000739097595,
+ "v": 0.40104997158050537,
+ "px": 491.2640075683594,
+ "py": 410.6751708984375
+ },
+ {
+ "u": 0.3686999976634979,
+ "v": 0.4399750232696533,
+ "px": 377.5487976074219,
+ "py": 450.534423828125
+ },
+ {
+ "u": 0.44419997930526733,
+ "v": 0.32130002975463867,
+ "px": 454.86077880859375,
+ "py": 329.01123046875
+ },
+ {
+ "u": 0.4875999987125397,
+ "v": 0.39969998598098755,
+ "px": 499.3023986816406,
+ "py": 409.29278564453125
+ },
+ {
+ "u": 0.4203000068664551,
+ "v": 0.5290499925613403,
+ "px": 430.38720703125,
+ "py": 541.7471923828125
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.37059998512268066,
+ "v": 0.40460002422332764,
+ "px": 379.494384765625,
+ "py": 414.3104248046875
+ },
+ {
+ "u": 0.37870001792907715,
+ "v": 0.48124998807907104,
+ "px": 387.788818359375,
+ "py": 492.79998779296875
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.4991999864578247,
+ "v": 0.41130000352859497,
+ "px": 511.1807861328125,
+ "py": 421.17120361328125
+ },
+ {
+ "u": 0.4447000026702881,
+ "v": 0.40619999170303345,
+ "px": 455.372802734375,
+ "py": 415.94879150390625
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.3970000147819519,
+ "v": 0.3331500291824341,
+ "px": 406.52801513671875,
+ "py": 341.1456298828125
+ },
+ {
+ "u": 0.40720000863075256,
+ "v": 0.33469998836517334,
+ "px": 416.9728088378906,
+ "py": 342.7327880859375
+ },
+ {
+ "u": 0.43459999561309814,
+ "v": 0.5211499929428101,
+ "px": 445.0303955078125,
+ "py": 533.6575927734375
+ },
+ {
+ "u": 0.3686999976634979,
+ "v": 0.4399750232696533,
+ "px": 377.5487976074219,
+ "py": 450.534423828125
+ },
+ {
+ "u": 0.46995002031326294,
+ "v": 0.5484499931335449,
+ "px": 481.22882080078125,
+ "py": 561.61279296875
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.49900001287460327,
+ "v": 0.25440001487731934,
+ "px": 510.97601318359375,
+ "py": 260.505615234375
+ },
+ {
+ "u": 0.524899959564209,
+ "v": 0.5491999983787537,
+ "px": 537.49755859375,
+ "py": 562.3807983398438
+ },
+ {
+ "u": 0.4140999913215637,
+ "v": 0.3342999815940857,
+ "px": 424.03839111328125,
+ "py": 342.32318115234375
+ },
+ {
+ "u": 0.4203999936580658,
+ "v": 0.3330000042915344,
+ "px": 430.4895935058594,
+ "py": 340.99200439453125
+ },
+ {
+ "u": 0.43380001187324524,
+ "v": 0.3198999762535095,
+ "px": 444.2112121582031,
+ "py": 327.57757568359375
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.4300000071525574,
+ "v": 0.31470000743865967,
+ "px": 440.32000732421875,
+ "py": 322.2528076171875
+ },
+ {
+ "u": 0.4187999963760376,
+ "v": 0.30390000343322754,
+ "px": 428.8511962890625,
+ "py": 311.193603515625
+ },
+ {
+ "u": 0.40625,
+ "v": 0.2994999885559082,
+ "px": 416.0,
+ "py": 306.68798828125
+ },
+ {
+ "u": 0.40625,
+ "v": 0.2994999885559082,
+ "px": 416.0,
+ "py": 306.68798828125
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.37880000472068787,
+ "v": 0.27129995822906494,
+ "px": 387.8912048339844,
+ "py": 277.8111572265625
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.4984999895095825,
+ "v": 0.4628000259399414,
+ "px": 510.4639892578125,
+ "py": 473.9072265625
+ },
+ {
+ "u": 0.44920000433921814,
+ "v": 0.4642000198364258,
+ "px": 459.9808044433594,
+ "py": 475.3408203125
+ },
+ {
+ "u": 0.47360000014305115,
+ "v": 0.41100001335144043,
+ "px": 484.9664001464844,
+ "py": 420.864013671875
+ },
+ {
+ "u": 0.4819999933242798,
+ "v": 0.4616999626159668,
+ "px": 493.5679931640625,
+ "py": 472.78076171875
+ },
+ {
+ "u": 0.4993000030517578,
+ "v": 0.30959999561309814,
+ "px": 511.283203125,
+ "py": 317.0303955078125
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.46995002031326294,
+ "v": 0.5484499931335449,
+ "px": 481.22882080078125,
+ "py": 561.61279296875
+ },
+ {
+ "u": 0.407150000333786,
+ "v": 0.5153000354766846,
+ "px": 416.9216003417969,
+ "py": 527.667236328125
+ },
+ {
+ "u": 0.4409500062465668,
+ "v": 0.31564998626708984,
+ "px": 451.5328063964844,
+ "py": 323.2255859375
+ },
+ {
+ "u": 0.4853000044822693,
+ "v": 0.3717000484466553,
+ "px": 496.94720458984375,
+ "py": 380.620849609375
+ },
+ {
+ "u": 0.524899959564209,
+ "v": 0.5491999983787537,
+ "px": 537.49755859375,
+ "py": 562.3807983398438
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.3686999976634979,
+ "v": 0.4399750232696533,
+ "px": 377.5487976074219,
+ "py": 450.534423828125
+ },
+ {
+ "u": 0.47110000252723694,
+ "v": 0.5130000114440918,
+ "px": 482.4064025878906,
+ "py": 525.31201171875
+ },
+ {
+ "u": 0.47110000252723694,
+ "v": 0.5130000114440918,
+ "px": 482.4064025878906,
+ "py": 525.31201171875
+ },
+ {
+ "u": 0.47110000252723694,
+ "v": 0.5130000114440918,
+ "px": 482.4064025878906,
+ "py": 525.31201171875
+ },
+ {
+ "u": 0.46549999713897705,
+ "v": 0.5415999889373779,
+ "px": 476.6719970703125,
+ "py": 554.598388671875
+ },
+ {
+ "u": 0.46995002031326294,
+ "v": 0.5484499931335449,
+ "px": 481.22882080078125,
+ "py": 561.61279296875
+ },
+ {
+ "u": 0.4412499964237213,
+ "v": 0.5146999955177307,
+ "px": 451.8399963378906,
+ "py": 527.0527954101562
+ },
+ {
+ "u": 0.4412499964237213,
+ "v": 0.5146999955177307,
+ "px": 451.8399963378906,
+ "py": 527.0527954101562
+ },
+ {
+ "u": 0.4412499964237213,
+ "v": 0.5146999955177307,
+ "px": 451.8399963378906,
+ "py": 527.0527954101562
+ },
+ {
+ "u": 0.42557501792907715,
+ "v": 0.5054500102996826,
+ "px": 435.788818359375,
+ "py": 517.580810546875
+ },
+ {
+ "u": 0.3686999976634979,
+ "v": 0.4399750232696533,
+ "px": 377.5487976074219,
+ "py": 450.534423828125
+ },
+ {
+ "u": 0.48399999737739563,
+ "v": 0.35500001907348633,
+ "px": 495.6159973144531,
+ "py": 363.52001953125
+ },
+ {
+ "u": 0.46490001678466797,
+ "v": 0.315250039100647,
+ "px": 476.0576171875,
+ "py": 322.8160400390625
+ },
+ {
+ "u": 0.4409500062465668,
+ "v": 0.31564998626708984,
+ "px": 451.5328063964844,
+ "py": 323.2255859375
+ },
+ {
+ "u": 0.4412499964237213,
+ "v": 0.5146999955177307,
+ "px": 451.8399963378906,
+ "py": 527.0527954101562
+ },
+ {
+ "u": 0.37870001792907715,
+ "v": 0.48124998807907104,
+ "px": 387.788818359375,
+ "py": 492.79998779296875
+ },
+ {
+ "u": 0.47940000891685486,
+ "v": 0.31139999628067017,
+ "px": 490.9056091308594,
+ "py": 318.87359619140625
+ },
+ {
+ "u": 0.45910000801086426,
+ "v": 0.5462000370025635,
+ "px": 470.118408203125,
+ "py": 559.308837890625
+ },
+ {
+ "u": 0.49970000982284546,
+ "v": 0.3870999813079834,
+ "px": 511.69281005859375,
+ "py": 396.390380859375
+ },
+ {
+ "u": 0.4927999973297119,
+ "v": 0.3709999918937683,
+ "px": 504.627197265625,
+ "py": 379.90399169921875
+ },
+ {
+ "u": 0.49985000491142273,
+ "v": 0.3714500069618225,
+ "px": 511.8464050292969,
+ "py": 380.36480712890625
+ },
+ {
+ "u": 0.47859999537467957,
+ "v": 0.3952000141143799,
+ "px": 490.0863952636719,
+ "py": 404.684814453125
+ },
+ {
+ "u": 0.49755001068115234,
+ "v": 0.5432000160217285,
+ "px": 509.4912109375,
+ "py": 556.23681640625
+ },
+ {
+ "u": 0.49755001068115234,
+ "v": 0.5432000160217285,
+ "px": 509.4912109375,
+ "py": 556.23681640625
+ },
+ {
+ "u": 0.46995002031326294,
+ "v": 0.5484499931335449,
+ "px": 481.22882080078125,
+ "py": 561.61279296875
+ },
+ {
+ "u": 0.4203000068664551,
+ "v": 0.5290499925613403,
+ "px": 430.38720703125,
+ "py": 541.7471923828125
+ },
+ {
+ "u": 0.42289999127388,
+ "v": 0.44849997758865356,
+ "px": 433.0495910644531,
+ "py": 459.26397705078125
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.39149999618530273,
+ "v": 0.44120001792907715,
+ "px": 400.89599609375,
+ "py": 451.788818359375
+ },
+ {
+ "u": 0.4083000123500824,
+ "v": 0.4632999897003174,
+ "px": 418.0992126464844,
+ "py": 474.419189453125
+ },
+ {
+ "u": 0.37747499346733093,
+ "v": 0.4671499729156494,
+ "px": 386.5343933105469,
+ "py": 478.361572265625
+ },
+ {
+ "u": 0.46995002031326294,
+ "v": 0.5484499931335449,
+ "px": 481.22882080078125,
+ "py": 561.61279296875
+ },
+ {
+ "u": 0.4602000117301941,
+ "v": 0.4017000198364258,
+ "px": 471.24481201171875,
+ "py": 411.3408203125
+ },
+ {
+ "u": 0.4203000068664551,
+ "v": 0.5290499925613403,
+ "px": 430.38720703125,
+ "py": 541.7471923828125
+ },
+ {
+ "u": 0.44440001249313354,
+ "v": 0.555400013923645,
+ "px": 455.06561279296875,
+ "py": 568.7296142578125
+ },
+ {
+ "u": 0.407150000333786,
+ "v": 0.5153000354766846,
+ "px": 416.9216003417969,
+ "py": 527.667236328125
+ },
+ {
+ "u": 0.37870001792907715,
+ "v": 0.48124998807907104,
+ "px": 387.788818359375,
+ "py": 492.79998779296875
+ },
+ {
+ "u": 0.407150000333786,
+ "v": 0.5153000354766846,
+ "px": 416.9216003417969,
+ "py": 527.667236328125
+ },
+ {
+ "u": 0.37870001792907715,
+ "v": 0.48124998807907104,
+ "px": 387.788818359375,
+ "py": 492.79998779296875
+ },
+ {
+ "u": 0.38989999890327454,
+ "v": 0.4843999743461609,
+ "px": 399.2575988769531,
+ "py": 496.02557373046875
+ },
+ {
+ "u": 0.4727250039577484,
+ "v": 0.37425005435943604,
+ "px": 484.0704040527344,
+ "py": 383.2320556640625
+ },
+ {
+ "u": 0.4887000024318695,
+ "v": 0.4057999849319458,
+ "px": 500.4288024902344,
+ "py": 415.5391845703125
+ },
+ {
+ "u": 0.47360000014305115,
+ "v": 0.41100001335144043,
+ "px": 484.9664001464844,
+ "py": 420.864013671875
+ },
+ {
+ "u": 0.4936000108718872,
+ "v": 0.39910000562667847,
+ "px": 505.4464111328125,
+ "py": 408.67840576171875
+ },
+ {
+ "u": 0.4551500082015991,
+ "v": 0.29464995861053467,
+ "px": 466.0736083984375,
+ "py": 301.7215576171875
+ },
+ {
+ "u": 0.43015000224113464,
+ "v": 0.28224998712539673,
+ "px": 440.4736022949219,
+ "py": 289.02398681640625
+ },
+ {
+ "u": 0.41132500767707825,
+ "v": 0.2768999934196472,
+ "px": 421.1968078613281,
+ "py": 283.54559326171875
+ },
+ {
+ "u": 0.39340001344680786,
+ "v": 0.2843000292778015,
+ "px": 402.84161376953125,
+ "py": 291.12322998046875
+ },
+ {
+ "u": 0.39340001344680786,
+ "v": 0.2843000292778015,
+ "px": 402.84161376953125,
+ "py": 291.12322998046875
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.37059998512268066,
+ "v": 0.40460002422332764,
+ "px": 379.494384765625,
+ "py": 414.3104248046875
+ },
+ {
+ "u": 0.39424997568130493,
+ "v": 0.33945000171661377,
+ "px": 403.71197509765625,
+ "py": 347.5968017578125
+ },
+ {
+ "u": 0.39424997568130493,
+ "v": 0.33945000171661377,
+ "px": 403.71197509765625,
+ "py": 347.5968017578125
+ },
+ {
+ "u": 0.4058000147342682,
+ "v": 0.3406999707221985,
+ "px": 415.5392150878906,
+ "py": 348.87677001953125
+ },
+ {
+ "u": 0.41929998993873596,
+ "v": 0.34289997816085815,
+ "px": 429.3631896972656,
+ "py": 351.12957763671875
+ },
+ {
+ "u": 0.4357999861240387,
+ "v": 0.3482999801635742,
+ "px": 446.2591857910156,
+ "py": 356.6591796875
+ },
+ {
+ "u": 0.4505000114440918,
+ "v": 0.3343999981880188,
+ "px": 461.31201171875,
+ "py": 342.42559814453125
+ },
+ {
+ "u": 0.37059998512268066,
+ "v": 0.40460002422332764,
+ "px": 379.494384765625,
+ "py": 414.3104248046875
+ },
+ {
+ "u": 0.4641000032424927,
+ "v": 0.4138000011444092,
+ "px": 475.2384033203125,
+ "py": 423.731201171875
+ },
+ {
+ "u": 0.4867999851703644,
+ "v": 0.38770002126693726,
+ "px": 498.4831848144531,
+ "py": 397.00482177734375
+ },
+ {
+ "u": 0.49390000104904175,
+ "v": 0.40539997816085815,
+ "px": 505.75360107421875,
+ "py": 415.12957763671875
+ },
+ {
+ "u": 0.49459999799728394,
+ "v": 0.4114999771118164,
+ "px": 506.47039794921875,
+ "py": 421.3759765625
+ },
+ {
+ "u": 0.49390000104904175,
+ "v": 0.40539997816085815,
+ "px": 505.75360107421875,
+ "py": 415.12957763671875
+ },
+ {
+ "u": 0.4560000002384186,
+ "v": 0.4203000068664551,
+ "px": 466.9440002441406,
+ "py": 430.38720703125
+ },
+ {
+ "u": 0.49459999799728394,
+ "v": 0.4114999771118164,
+ "px": 506.47039794921875,
+ "py": 421.3759765625
+ },
+ {
+ "u": 0.49459999799728394,
+ "v": 0.4114999771118164,
+ "px": 506.47039794921875,
+ "py": 421.3759765625
+ },
+ {
+ "u": 0.44419997930526733,
+ "v": 0.32130002975463867,
+ "px": 454.86077880859375,
+ "py": 329.01123046875
+ },
+ {
+ "u": 0.4657000005245209,
+ "v": 0.32464998960494995,
+ "px": 476.8768005371094,
+ "py": 332.44158935546875
+ },
+ {
+ "u": 0.4817500114440918,
+ "v": 0.33424997329711914,
+ "px": 493.31201171875,
+ "py": 342.27197265625
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.3928999900817871,
+ "v": 0.2978000044822693,
+ "px": 402.32958984375,
+ "py": 304.94720458984375
+ },
+ {
+ "u": 0.5060999989509583,
+ "v": 0.38690000772476196,
+ "px": 518.2463989257812,
+ "py": 396.18560791015625
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.5037999749183655,
+ "v": 0.41130000352859497,
+ "px": 515.8911743164062,
+ "py": 421.17120361328125
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.5853999853134155,
+ "v": 0.3343999981880188,
+ "px": 599.4495849609375,
+ "py": 342.42559814453125
+ },
+ {
+ "u": 0.5924000144004822,
+ "v": 0.33459997177124023,
+ "px": 606.6176147460938,
+ "py": 342.63037109375
+ },
+ {
+ "u": 0.6031500101089478,
+ "v": 0.3328999876976013,
+ "px": 617.6256103515625,
+ "py": 340.88958740234375
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.578499972820282,
+ "v": 0.3312000036239624,
+ "px": 592.3839721679688,
+ "py": 339.1488037109375
+ },
+ {
+ "u": 0.58965003490448,
+ "v": 0.2936999797821045,
+ "px": 603.8016357421875,
+ "py": 300.748779296875
+ },
+ {
+ "u": 0.5758000016212463,
+ "v": 0.298799991607666,
+ "px": 589.6192016601562,
+ "py": 305.97119140625
+ },
+ {
+ "u": 0.5913499593734741,
+ "v": 0.2973499894142151,
+ "px": 605.5423583984375,
+ "py": 304.48638916015625
+ },
+ {
+ "u": 0.6043499708175659,
+ "v": 0.29079997539520264,
+ "px": 618.8543701171875,
+ "py": 297.7791748046875
+ },
+ {
+ "u": 0.6053999662399292,
+ "v": 0.3370499610900879,
+ "px": 619.9295654296875,
+ "py": 345.13916015625
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.5879999995231628,
+ "v": 0.42089998722076416,
+ "px": 602.1119995117188,
+ "py": 431.0015869140625
+ },
+ {
+ "u": 0.5138000249862671,
+ "v": 0.4686499834060669,
+ "px": 526.1312255859375,
+ "py": 479.8975830078125
+ },
+ {
+ "u": 0.5093500018119812,
+ "v": 0.5088499784469604,
+ "px": 521.5744018554688,
+ "py": 521.0623779296875
+ },
+ {
+ "u": 0.5311999917030334,
+ "v": 0.5024999976158142,
+ "px": 543.9487915039062,
+ "py": 514.5599975585938
+ },
+ {
+ "u": 0.5471000075340271,
+ "v": 0.506600022315979,
+ "px": 560.2304077148438,
+ "py": 518.7584228515625
+ },
+ {
+ "u": 0.5227000117301941,
+ "v": 0.5081999897956848,
+ "px": 535.2448120117188,
+ "py": 520.3967895507812
+ },
+ {
+ "u": 0.5342000126838684,
+ "v": 0.5119999647140503,
+ "px": 547.0208129882812,
+ "py": 524.2879638671875
+ },
+ {
+ "u": 0.5630999803543091,
+ "v": 0.5382000207901001,
+ "px": 576.6143798828125,
+ "py": 551.1168212890625
+ },
+ {
+ "u": 0.504800021648407,
+ "v": 0.4050999879837036,
+ "px": 516.9152221679688,
+ "py": 414.8223876953125
+ },
+ {
+ "u": 0.5054000020027161,
+ "v": 0.3988000154495239,
+ "px": 517.5296020507812,
+ "py": 408.3712158203125
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.5453749895095825,
+ "v": 0.36457496881484985,
+ "px": 558.4639892578125,
+ "py": 373.32476806640625
+ },
+ {
+ "u": 0.5346999764442444,
+ "v": 0.4092000126838684,
+ "px": 547.5327758789062,
+ "py": 419.02081298828125
+ },
+ {
+ "u": 0.5360999703407288,
+ "v": 0.40549999475479126,
+ "px": 548.9663696289062,
+ "py": 415.23199462890625
+ },
+ {
+ "u": 0.6299999952316284,
+ "v": 0.40230000019073486,
+ "px": 645.1199951171875,
+ "py": 411.9552001953125
+ },
+ {
+ "u": 0.5054000020027161,
+ "v": 0.3988000154495239,
+ "px": 517.5296020507812,
+ "py": 408.3712158203125
+ },
+ {
+ "u": 0.5863499641418457,
+ "v": 0.2642500400543213,
+ "px": 600.42236328125,
+ "py": 270.592041015625
+ },
+ {
+ "u": 0.6054500341415405,
+ "v": 0.2735999822616577,
+ "px": 619.9808349609375,
+ "py": 280.1663818359375
+ },
+ {
+ "u": 0.6079999804496765,
+ "v": 0.2523999810218811,
+ "px": 622.5919799804688,
+ "py": 258.45758056640625
+ },
+ {
+ "u": 0.5242999792098999,
+ "v": 0.28930002450942993,
+ "px": 536.8831787109375,
+ "py": 296.24322509765625
+ },
+ {
+ "u": 0.5618000030517578,
+ "v": 0.3092000484466553,
+ "px": 575.283203125,
+ "py": 316.620849609375
+ },
+ {
+ "u": 0.5814499855041504,
+ "v": 0.5145999789237976,
+ "px": 595.40478515625,
+ "py": 526.9503784179688
+ },
+ {
+ "u": 0.6174999475479126,
+ "v": 0.482450008392334,
+ "px": 632.3199462890625,
+ "py": 494.02880859375
+ },
+ {
+ "u": 0.5246999859809875,
+ "v": 0.4099000096321106,
+ "px": 537.2927856445312,
+ "py": 419.73760986328125
+ },
+ {
+ "u": 0.5105500221252441,
+ "v": 0.4175499677658081,
+ "px": 522.80322265625,
+ "py": 427.5711669921875
+ },
+ {
+ "u": 0.560699999332428,
+ "v": 0.5222499966621399,
+ "px": 574.1567993164062,
+ "py": 534.7839965820312
+ },
+ {
+ "u": 0.560699999332428,
+ "v": 0.5222499966621399,
+ "px": 574.1567993164062,
+ "py": 534.7839965820312
+ },
+ {
+ "u": 0.6068999767303467,
+ "v": 0.26099997758865356,
+ "px": 621.465576171875,
+ "py": 267.26397705078125
+ },
+ {
+ "u": 0.5336999893188477,
+ "v": 0.41259998083114624,
+ "px": 546.5087890625,
+ "py": 422.50238037109375
+ },
+ {
+ "u": 0.550599992275238,
+ "v": 0.2728999853134155,
+ "px": 563.8143920898438,
+ "py": 279.4495849609375
+ },
+ {
+ "u": 0.565500020980835,
+ "v": 0.2688000202178955,
+ "px": 579.072021484375,
+ "py": 275.251220703125
+ },
+ {
+ "u": 0.5560500025749207,
+ "v": 0.2113499641418457,
+ "px": 569.3952026367188,
+ "py": 216.42236328125
+ },
+ {
+ "u": 0.6079999804496765,
+ "v": 0.2523999810218811,
+ "px": 622.5919799804688,
+ "py": 258.45758056640625
+ },
+ {
+ "u": 0.5667999982833862,
+ "v": 0.2491999864578247,
+ "px": 580.4031982421875,
+ "py": 255.1807861328125
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.5089499950408936,
+ "v": 0.5034500360488892,
+ "px": 521.164794921875,
+ "py": 515.5328369140625
+ },
+ {
+ "u": 0.5317999720573425,
+ "v": 0.5072000026702881,
+ "px": 544.5631713867188,
+ "py": 519.372802734375
+ },
+ {
+ "u": 0.5471000075340271,
+ "v": 0.506600022315979,
+ "px": 560.2304077148438,
+ "py": 518.7584228515625
+ },
+ {
+ "u": 0.5246999859809875,
+ "v": 0.4099000096321106,
+ "px": 537.2927856445312,
+ "py": 419.73760986328125
+ },
+ {
+ "u": 0.560699999332428,
+ "v": 0.5222499966621399,
+ "px": 574.1567993164062,
+ "py": 534.7839965820312
+ },
+ {
+ "u": 0.5542750358581543,
+ "v": 0.5155999660491943,
+ "px": 567.57763671875,
+ "py": 527.974365234375
+ },
+ {
+ "u": 0.560699999332428,
+ "v": 0.5222499966621399,
+ "px": 574.1567993164062,
+ "py": 534.7839965820312
+ },
+ {
+ "u": 0.5099999904632568,
+ "v": 0.4053000211715698,
+ "px": 522.239990234375,
+ "py": 415.0272216796875
+ },
+ {
+ "u": 0.5342000126838684,
+ "v": 0.5119999647140503,
+ "px": 547.0208129882812,
+ "py": 524.2879638671875
+ },
+ {
+ "u": 0.5231999754905701,
+ "v": 0.5105000138282776,
+ "px": 535.7567749023438,
+ "py": 522.7520141601562
+ },
+ {
+ "u": 0.5093500018119812,
+ "v": 0.5088499784469604,
+ "px": 521.5744018554688,
+ "py": 521.0623779296875
+ },
+ {
+ "u": 0.5114499926567078,
+ "v": 0.5439000129699707,
+ "px": 523.7247924804688,
+ "py": 556.95361328125
+ },
+ {
+ "u": 0.5146499872207642,
+ "v": 0.5386000275611877,
+ "px": 527.0015869140625,
+ "py": 551.5264282226562
+ },
+ {
+ "u": 0.510699987411499,
+ "v": 0.513949990272522,
+ "px": 522.956787109375,
+ "py": 526.2847900390625
+ },
+ {
+ "u": 0.5097500085830688,
+ "v": 0.5111500024795532,
+ "px": 521.9840087890625,
+ "py": 523.4176025390625
+ },
+ {
+ "u": 0.5097500085830688,
+ "v": 0.5111500024795532,
+ "px": 521.9840087890625,
+ "py": 523.4176025390625
+ },
+ {
+ "u": 0.5404999852180481,
+ "v": 0.5195499658584595,
+ "px": 553.4719848632812,
+ "py": 532.0191650390625
+ },
+ {
+ "u": 0.5404999852180481,
+ "v": 0.5195499658584595,
+ "px": 553.4719848632812,
+ "py": 532.0191650390625
+ },
+ {
+ "u": 0.5404999852180481,
+ "v": 0.5195499658584595,
+ "px": 553.4719848632812,
+ "py": 532.0191650390625
+ },
+ {
+ "u": 0.5475000143051147,
+ "v": 0.5270000100135803,
+ "px": 560.6400146484375,
+ "py": 539.6480102539062
+ },
+ {
+ "u": 0.5640000104904175,
+ "v": 0.4714999794960022,
+ "px": 577.5360107421875,
+ "py": 482.81597900390625
+ },
+ {
+ "u": 0.6282249689102173,
+ "v": 0.43872499465942383,
+ "px": 643.3023681640625,
+ "py": 449.25439453125
+ },
+ {
+ "u": 0.5542750358581543,
+ "v": 0.5155999660491943,
+ "px": 567.57763671875,
+ "py": 527.974365234375
+ },
+ {
+ "u": 0.5542750358581543,
+ "v": 0.5155999660491943,
+ "px": 567.57763671875,
+ "py": 527.974365234375
+ },
+ {
+ "u": 0.5155500173568726,
+ "v": 0.45819997787475586,
+ "px": 527.9232177734375,
+ "py": 469.19677734375
+ },
+ {
+ "u": 0.5472999811172485,
+ "v": 0.4479999542236328,
+ "px": 560.4351806640625,
+ "py": 458.751953125
+ },
+ {
+ "u": 0.5155500173568726,
+ "v": 0.45819997787475586,
+ "px": 527.9232177734375,
+ "py": 469.19677734375
+ },
+ {
+ "u": 0.567175030708313,
+ "v": 0.3786250352859497,
+ "px": 580.7872314453125,
+ "py": 387.7120361328125
+ },
+ {
+ "u": 0.6017749905586243,
+ "v": 0.406499981880188,
+ "px": 616.2175903320312,
+ "py": 416.2559814453125
+ },
+ {
+ "u": 0.5440999865531921,
+ "v": 0.4157000184059143,
+ "px": 557.1583862304688,
+ "py": 425.67681884765625
+ },
+ {
+ "u": 0.5902999639511108,
+ "v": 0.23102498054504395,
+ "px": 604.4671630859375,
+ "py": 236.569580078125
+ },
+ {
+ "u": 0.5902999639511108,
+ "v": 0.23102498054504395,
+ "px": 604.4671630859375,
+ "py": 236.569580078125
+ },
+ {
+ "u": 0.5863499641418457,
+ "v": 0.2642500400543213,
+ "px": 600.42236328125,
+ "py": 270.592041015625
+ },
+ {
+ "u": 0.5440000295639038,
+ "v": 0.545199990272522,
+ "px": 557.0560302734375,
+ "py": 558.2847900390625
+ },
+ {
+ "u": 0.5358999967575073,
+ "v": 0.2760000228881836,
+ "px": 548.7615966796875,
+ "py": 282.6240234375
+ },
+ {
+ "u": 0.5257999897003174,
+ "v": 0.23600000143051147,
+ "px": 538.419189453125,
+ "py": 241.66400146484375
+ },
+ {
+ "u": 0.5415999889373779,
+ "v": 0.2114499807357788,
+ "px": 554.598388671875,
+ "py": 216.5247802734375
+ },
+ {
+ "u": 0.6022499799728394,
+ "v": 0.3308999538421631,
+ "px": 616.7039794921875,
+ "py": 338.841552734375
+ },
+ {
+ "u": 0.6053999662399292,
+ "v": 0.3370499610900879,
+ "px": 619.9295654296875,
+ "py": 345.13916015625
+ },
+ {
+ "u": 0.5546000003814697,
+ "v": 0.32044994831085205,
+ "px": 567.910400390625,
+ "py": 328.1407470703125
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.5291250348091125,
+ "v": 0.3579999804496765,
+ "px": 541.8240356445312,
+ "py": 366.59197998046875
+ },
+ {
+ "u": 0.5174000263214111,
+ "v": 0.4056500196456909,
+ "px": 529.817626953125,
+ "py": 415.3856201171875
+ },
+ {
+ "u": 0.6299999952316284,
+ "v": 0.40230000019073486,
+ "px": 645.1199951171875,
+ "py": 411.9552001953125
+ },
+ {
+ "u": 0.6299999952316284,
+ "v": 0.40230000019073486,
+ "px": 645.1199951171875,
+ "py": 411.9552001953125
+ },
+ {
+ "u": 0.6151999831199646,
+ "v": 0.3829500079154968,
+ "px": 629.9647827148438,
+ "py": 392.14080810546875
+ },
+ {
+ "u": 0.5981000065803528,
+ "v": 0.3758000135421753,
+ "px": 612.4544067382812,
+ "py": 384.8192138671875
+ },
+ {
+ "u": 0.5715999603271484,
+ "v": 0.36045002937316895,
+ "px": 585.318359375,
+ "py": 369.100830078125
+ },
+ {
+ "u": 0.560949981212616,
+ "v": 0.35360002517700195,
+ "px": 574.4127807617188,
+ "py": 362.08642578125
+ },
+ {
+ "u": 0.5077500343322754,
+ "v": 0.3543499708175659,
+ "px": 519.93603515625,
+ "py": 362.8543701171875
+ },
+ {
+ "u": 0.6299999952316284,
+ "v": 0.40230000019073486,
+ "px": 645.1199951171875,
+ "py": 411.9552001953125
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.49939998984336853,
+ "v": 0.4050999879837036,
+ "px": 511.3855895996094,
+ "py": 414.8223876953125
+ },
+ {
+ "u": 0.5412999987602234,
+ "v": 0.39560002088546753,
+ "px": 554.2911987304688,
+ "py": 405.09442138671875
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.5335000157356262,
+ "v": 0.337399959564209,
+ "px": 546.3040161132812,
+ "py": 345.49755859375
+ },
+ {
+ "u": 0.5462999939918518,
+ "v": 0.4117000102996826,
+ "px": 559.4111938476562,
+ "py": 421.580810546875
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.5190500020980835,
+ "v": 0.4002000093460083,
+ "px": 531.5072021484375,
+ "py": 409.8048095703125
+ },
+ {
+ "u": 0.6282249689102173,
+ "v": 0.43872499465942383,
+ "px": 643.3023681640625,
+ "py": 449.25439453125
+ },
+ {
+ "u": 0.5546000003814697,
+ "v": 0.32044994831085205,
+ "px": 567.910400390625,
+ "py": 328.1407470703125
+ },
+ {
+ "u": 0.5113000273704529,
+ "v": 0.39899998903274536,
+ "px": 523.5712280273438,
+ "py": 408.57598876953125
+ },
+ {
+ "u": 0.5746999979019165,
+ "v": 0.5306000113487244,
+ "px": 588.4927978515625,
+ "py": 543.3344116210938
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.6299999952316284,
+ "v": 0.40230000019073486,
+ "px": 645.1199951171875,
+ "py": 411.9552001953125
+ },
+ {
+ "u": 0.6174999475479126,
+ "v": 0.482450008392334,
+ "px": 632.3199462890625,
+ "py": 494.02880859375
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.4991999864578247,
+ "v": 0.41130000352859497,
+ "px": 511.1807861328125,
+ "py": 421.17120361328125
+ },
+ {
+ "u": 0.5536999702453613,
+ "v": 0.40469998121261597,
+ "px": 566.98876953125,
+ "py": 414.41278076171875
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.6022499799728394,
+ "v": 0.3308999538421631,
+ "px": 616.7039794921875,
+ "py": 338.841552734375
+ },
+ {
+ "u": 0.5917999744415283,
+ "v": 0.3325999975204468,
+ "px": 606.003173828125,
+ "py": 340.5823974609375
+ },
+ {
+ "u": 0.560699999332428,
+ "v": 0.5222499966621399,
+ "px": 574.1567993164062,
+ "py": 534.7839965820312
+ },
+ {
+ "u": 0.6282249689102173,
+ "v": 0.43872499465942383,
+ "px": 643.3023681640625,
+ "py": 449.25439453125
+ },
+ {
+ "u": 0.524899959564209,
+ "v": 0.5491999983787537,
+ "px": 537.49755859375,
+ "py": 562.3807983398438
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.5849000215530396,
+ "v": 0.33240002393722534,
+ "px": 598.9376220703125,
+ "py": 340.37762451171875
+ },
+ {
+ "u": 0.578499972820282,
+ "v": 0.3312000036239624,
+ "px": 592.3839721679688,
+ "py": 339.1488037109375
+ },
+ {
+ "u": 0.5648999810218811,
+ "v": 0.3187999725341797,
+ "px": 578.4575805664062,
+ "py": 326.451171875
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.5685999989509583,
+ "v": 0.31379997730255127,
+ "px": 582.2463989257812,
+ "py": 321.3311767578125
+ },
+ {
+ "u": 0.5795000195503235,
+ "v": 0.30309998989105225,
+ "px": 593.4080200195312,
+ "py": 310.3743896484375
+ },
+ {
+ "u": 0.5919500589370728,
+ "v": 0.2986999750137329,
+ "px": 606.1568603515625,
+ "py": 305.8687744140625
+ },
+ {
+ "u": 0.5919500589370728,
+ "v": 0.2986999750137329,
+ "px": 606.1568603515625,
+ "py": 305.8687744140625
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.6182999610900879,
+ "v": 0.27209997177124023,
+ "px": 633.13916015625,
+ "py": 278.63037109375
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.5480999946594238,
+ "v": 0.4642999768257141,
+ "px": 561.25439453125,
+ "py": 475.44317626953125
+ },
+ {
+ "u": 0.5246999859809875,
+ "v": 0.4099000096321106,
+ "px": 537.2927856445312,
+ "py": 419.73760986328125
+ },
+ {
+ "u": 0.5151000022888184,
+ "v": 0.461650013923645,
+ "px": 527.46240234375,
+ "py": 472.7296142578125
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.524899959564209,
+ "v": 0.5491999983787537,
+ "px": 537.49755859375,
+ "py": 562.3807983398438
+ },
+ {
+ "u": 0.5883499979972839,
+ "v": 0.5170000195503235,
+ "px": 602.4703979492188,
+ "py": 529.4080200195312
+ },
+ {
+ "u": 0.5576499700546265,
+ "v": 0.31484997272491455,
+ "px": 571.0335693359375,
+ "py": 322.4063720703125
+ },
+ {
+ "u": 0.5145000219345093,
+ "v": 0.37160003185272217,
+ "px": 526.8480224609375,
+ "py": 380.5184326171875
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.6282249689102173,
+ "v": 0.43872499465942383,
+ "px": 643.3023681640625,
+ "py": 449.25439453125
+ },
+ {
+ "u": 0.524399995803833,
+ "v": 0.5133999586105347,
+ "px": 536.985595703125,
+ "py": 525.7215576171875
+ },
+ {
+ "u": 0.524399995803833,
+ "v": 0.5133999586105347,
+ "px": 536.985595703125,
+ "py": 525.7215576171875
+ },
+ {
+ "u": 0.524399995803833,
+ "v": 0.5133999586105347,
+ "px": 536.985595703125,
+ "py": 525.7215576171875
+ },
+ {
+ "u": 0.5295000076293945,
+ "v": 0.5422999858856201,
+ "px": 542.2080078125,
+ "py": 555.315185546875
+ },
+ {
+ "u": 0.524899959564209,
+ "v": 0.5491999983787537,
+ "px": 537.49755859375,
+ "py": 562.3807983398438
+ },
+ {
+ "u": 0.5542750358581543,
+ "v": 0.5155999660491943,
+ "px": 567.57763671875,
+ "py": 527.974365234375
+ },
+ {
+ "u": 0.5542750358581543,
+ "v": 0.5155999660491943,
+ "px": 567.57763671875,
+ "py": 527.974365234375
+ },
+ {
+ "u": 0.5542750358581543,
+ "v": 0.5155999660491943,
+ "px": 567.57763671875,
+ "py": 527.974365234375
+ },
+ {
+ "u": 0.5880500078201294,
+ "v": 0.4878499507904053,
+ "px": 602.1632080078125,
+ "py": 499.558349609375
+ },
+ {
+ "u": 0.6282249689102173,
+ "v": 0.43872499465942383,
+ "px": 643.3023681640625,
+ "py": 449.25439453125
+ },
+ {
+ "u": 0.5158250331878662,
+ "v": 0.35500001907348633,
+ "px": 528.204833984375,
+ "py": 363.52001953125
+ },
+ {
+ "u": 0.5338500142097473,
+ "v": 0.3148999810218811,
+ "px": 546.6624145507812,
+ "py": 322.45758056640625
+ },
+ {
+ "u": 0.5576499700546265,
+ "v": 0.31484997272491455,
+ "px": 571.0335693359375,
+ "py": 322.4063720703125
+ },
+ {
+ "u": 0.5542750358581543,
+ "v": 0.5155999660491943,
+ "px": 567.57763671875,
+ "py": 527.974365234375
+ },
+ {
+ "u": 0.6174999475479126,
+ "v": 0.482450008392334,
+ "px": 632.3199462890625,
+ "py": 494.02880859375
+ },
+ {
+ "u": 0.5192999839782715,
+ "v": 0.31120002269744873,
+ "px": 531.76318359375,
+ "py": 318.6688232421875
+ },
+ {
+ "u": 0.5357000231742859,
+ "v": 0.5471999645233154,
+ "px": 548.5568237304688,
+ "py": 560.332763671875
+ },
+ {
+ "u": 0.5069999694824219,
+ "v": 0.3712500333786011,
+ "px": 519.16796875,
+ "py": 380.1600341796875
+ },
+ {
+ "u": 0.5204000473022461,
+ "v": 0.3942999839782715,
+ "px": 532.8896484375,
+ "py": 403.76318359375
+ },
+ {
+ "u": 0.524899959564209,
+ "v": 0.5491999983787537,
+ "px": 537.49755859375,
+ "py": 562.3807983398438
+ },
+ {
+ "u": 0.5746999979019165,
+ "v": 0.5306000113487244,
+ "px": 588.4927978515625,
+ "py": 543.3344116210938
+ },
+ {
+ "u": 0.5745999813079834,
+ "v": 0.4480999708175659,
+ "px": 588.390380859375,
+ "py": 458.8543701171875
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.6058499813079834,
+ "v": 0.4402499794960022,
+ "px": 620.390380859375,
+ "py": 450.81597900390625
+ },
+ {
+ "u": 0.5889999866485596,
+ "v": 0.4635000228881836,
+ "px": 603.135986328125,
+ "py": 474.6240234375
+ },
+ {
+ "u": 0.6186749935150146,
+ "v": 0.46742498874664307,
+ "px": 633.523193359375,
+ "py": 478.6431884765625
+ },
+ {
+ "u": 0.524899959564209,
+ "v": 0.5491999983787537,
+ "px": 537.49755859375,
+ "py": 562.3807983398438
+ },
+ {
+ "u": 0.5382999777793884,
+ "v": 0.40039998292922974,
+ "px": 551.2191772460938,
+ "py": 410.00958251953125
+ },
+ {
+ "u": 0.5746999979019165,
+ "v": 0.5306000113487244,
+ "px": 588.4927978515625,
+ "py": 543.3344116210938
+ },
+ {
+ "u": 0.5498999953269958,
+ "v": 0.5570999979972839,
+ "px": 563.0975952148438,
+ "py": 570.4703979492188
+ },
+ {
+ "u": 0.5883499979972839,
+ "v": 0.5170000195503235,
+ "px": 602.4703979492188,
+ "py": 529.4080200195312
+ },
+ {
+ "u": 0.6174999475479126,
+ "v": 0.482450008392334,
+ "px": 632.3199462890625,
+ "py": 494.02880859375
+ },
+ {
+ "u": 0.5883499979972839,
+ "v": 0.5170000195503235,
+ "px": 602.4703979492188,
+ "py": 529.4080200195312
+ },
+ {
+ "u": 0.6174999475479126,
+ "v": 0.482450008392334,
+ "px": 632.3199462890625,
+ "py": 494.02880859375
+ },
+ {
+ "u": 0.6057999730110168,
+ "v": 0.48500001430511475,
+ "px": 620.3391723632812,
+ "py": 496.6400146484375
+ },
+ {
+ "u": 0.5255500078201294,
+ "v": 0.38260000944137573,
+ "px": 538.1632080078125,
+ "py": 391.78240966796875
+ },
+ {
+ "u": 0.5099999904632568,
+ "v": 0.4053000211715698,
+ "px": 522.239990234375,
+ "py": 415.0272216796875
+ },
+ {
+ "u": 0.5246999859809875,
+ "v": 0.4099000096321106,
+ "px": 537.2927856445312,
+ "py": 419.73760986328125
+ },
+ {
+ "u": 0.5054000020027161,
+ "v": 0.3988000154495239,
+ "px": 517.5296020507812,
+ "py": 408.3712158203125
+ },
+ {
+ "u": 0.543150007724762,
+ "v": 0.2944999933242798,
+ "px": 556.1856079101562,
+ "py": 301.5679931640625
+ },
+ {
+ "u": 0.567799985408783,
+ "v": 0.28235000371932983,
+ "px": 581.4271850585938,
+ "py": 289.12640380859375
+ },
+ {
+ "u": 0.5863000154495239,
+ "v": 0.2772499918937683,
+ "px": 600.3712158203125,
+ "py": 283.90399169921875
+ },
+ {
+ "u": 0.6043000221252441,
+ "v": 0.2839999794960022,
+ "px": 618.80322265625,
+ "py": 290.81597900390625
+ },
+ {
+ "u": 0.6043000221252441,
+ "v": 0.2839999794960022,
+ "px": 618.80322265625,
+ "py": 290.81597900390625
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.6299999952316284,
+ "v": 0.40230000019073486,
+ "px": 645.1199951171875,
+ "py": 411.9552001953125
+ },
+ {
+ "u": 0.6053999662399292,
+ "v": 0.3370499610900879,
+ "px": 619.9295654296875,
+ "py": 345.13916015625
+ },
+ {
+ "u": 0.6053999662399292,
+ "v": 0.3370499610900879,
+ "px": 619.9295654296875,
+ "py": 345.13916015625
+ },
+ {
+ "u": 0.593500018119812,
+ "v": 0.3384000062942505,
+ "px": 607.7440185546875,
+ "py": 346.5216064453125
+ },
+ {
+ "u": 0.5860000252723694,
+ "v": 0.3377000093460083,
+ "px": 600.0640258789062,
+ "py": 345.8048095703125
+ },
+ {
+ "u": 0.5634999871253967,
+ "v": 0.3467000126838684,
+ "px": 577.0239868164062,
+ "py": 355.02081298828125
+ },
+ {
+ "u": 0.5486000180244446,
+ "v": 0.33340001106262207,
+ "px": 561.7664184570312,
+ "py": 341.401611328125
+ },
+ {
+ "u": 0.6299999952316284,
+ "v": 0.40230000019073486,
+ "px": 645.1199951171875,
+ "py": 411.9552001953125
+ },
+ {
+ "u": 0.5336999893188477,
+ "v": 0.41259998083114624,
+ "px": 546.5087890625,
+ "py": 422.50238037109375
+ },
+ {
+ "u": 0.512499988079071,
+ "v": 0.3873000144958496,
+ "px": 524.7999877929688,
+ "py": 396.59521484375
+ },
+ {
+ "u": 0.504800021648407,
+ "v": 0.4050999879837036,
+ "px": 516.9152221679688,
+ "py": 414.8223876953125
+ },
+ {
+ "u": 0.5037999749183655,
+ "v": 0.41130000352859497,
+ "px": 515.8911743164062,
+ "py": 421.17120361328125
+ },
+ {
+ "u": 0.504800021648407,
+ "v": 0.4050999879837036,
+ "px": 516.9152221679688,
+ "py": 414.8223876953125
+ },
+ {
+ "u": 0.5414000153541565,
+ "v": 0.4189000129699707,
+ "px": 554.3936157226562,
+ "py": 428.95361328125
+ },
+ {
+ "u": 0.5037999749183655,
+ "v": 0.41130000352859497,
+ "px": 515.8911743164062,
+ "py": 421.17120361328125
+ },
+ {
+ "u": 0.5037999749183655,
+ "v": 0.41130000352859497,
+ "px": 515.8911743164062,
+ "py": 421.17120361328125
+ },
+ {
+ "u": 0.5546000003814697,
+ "v": 0.32044994831085205,
+ "px": 567.910400390625,
+ "py": 328.1407470703125
+ },
+ {
+ "u": 0.5333000421524048,
+ "v": 0.3242499828338623,
+ "px": 546.0992431640625,
+ "py": 332.031982421875
+ },
+ {
+ "u": 0.517549991607666,
+ "v": 0.3339499831199646,
+ "px": 529.97119140625,
+ "py": 341.96478271484375
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ },
+ {
+ "u": 0.6051999926567078,
+ "v": 0.29680001735687256,
+ "px": 619.7247924804688,
+ "py": 303.9232177734375
+ }
+ ],
+ "face_oval_indices": [
+ 10,
+ 338,
+ 297,
+ 332,
+ 284,
+ 251,
+ 389,
+ 356,
+ 454,
+ 323,
+ 361,
+ 288,
+ 397,
+ 365,
+ 379,
+ 378,
+ 400,
+ 377,
+ 152,
+ 148,
+ 176,
+ 149,
+ 150,
+ 136,
+ 172,
+ 58,
+ 132,
+ 93,
+ 234,
+ 127,
+ 162,
+ 21,
+ 54,
+ 103,
+ 67,
+ 109
+ ],
+ "skin_sample_indices": [
+ 116,
+ 117,
+ 118,
+ 119,
+ 120,
+ 121,
+ 50,
+ 345,
+ 346,
+ 347,
+ 348,
+ 349,
+ 350,
+ 280,
+ 10,
+ 9,
+ 8,
+ 107,
+ 336
+ ],
+ "canonical_norm": [
+ [
+ -0.0,
+ -0.305426,
+ 0.20368
+ ],
+ [
+ -0.0,
+ -0.050393,
+ 0.371062
+ ],
+ [
+ -0.0,
+ -0.158039,
+ 0.212492
+ ],
+ [
+ -0.051904,
+ 0.182564,
+ 0.276858
+ ],
+ [
+ -0.0,
+ 0.02386,
+ 0.383478
+ ],
+ [
+ -0.0,
+ 0.11659,
+ 0.345024
+ ],
+ [
+ -0.0,
+ 0.352385,
+ 0.182325
+ ],
+ [
+ -0.475831,
+ 0.364064,
+ -0.098372
+ ],
+ [
+ -0.0,
+ 0.525326,
+ 0.125953
+ ],
+ [
+ -0.0,
+ 0.622319,
+ 0.137196
+ ],
+ [
+ -0.0,
+ 1.0,
+ 0.036089
+ ],
+ [
+ -0.0,
+ -0.339036,
+ 0.190861
+ ],
+ [
+ -0.0,
+ -0.362697,
+ 0.157801
+ ],
+ [
+ -0.0,
+ -0.371215,
+ 0.118649
+ ],
+ [
+ -0.0,
+ -0.432521,
+ 0.139378
+ ],
+ [
+ -0.0,
+ -0.455252,
+ 0.153329
+ ],
+ [
+ -0.0,
+ -0.485906,
+ 0.161383
+ ],
+ [
+ -0.0,
+ -0.524566,
+ 0.153999
+ ],
+ [
+ -0.0,
+ -0.612336,
+ 0.102079
+ ],
+ [
+ -0.0,
+ -0.092262,
+ 0.330405
+ ],
+ [
+ -0.046554,
+ -0.088386,
+ 0.256057
+ ],
+ [
+ -0.792995,
+ 0.68372,
+ -0.454156
+ ],
+ [
+ -0.29409,
+ 0.303454,
+ -0.034777
+ ],
+ [
+ -0.35783,
+ 0.297851,
+ -0.040502
+ ],
+ [
+ -0.422361,
+ 0.303846,
+ -0.057369
+ ],
+ [
+ -0.499632,
+ 0.346757,
+ -0.112304
+ ],
+ [
+ -0.242139,
+ 0.32068,
+ -0.034363
+ ],
+ [
+ -0.358934,
+ 0.436369,
+ -0.004827
+ ],
+ [
+ -0.299143,
+ 0.43429,
+ -0.00747
+ ],
+ [
+ -0.419009,
+ 0.429809,
+ -0.020872
+ ],
+ [
+ -0.465531,
+ 0.417925,
+ -0.049161
+ ],
+ [
+ -0.566333,
+ 0.2921,
+ -0.154715
+ ],
+ [
+ -0.253592,
+ -0.755109,
+ 0.025827
+ ],
+ [
+ -0.497399,
+ 0.373724,
+ -0.110262
+ ],
+ [
+ -0.807156,
+ 0.328863,
+ -0.457118
+ ],
+ [
+ -0.648876,
+ 0.338544,
+ -0.218714
+ ],
+ [
+ -0.318289,
+ -0.004971,
+ 0.030673
+ ],
+ [
+ -0.079597,
+ -0.296806,
+ 0.192217
+ ],
+ [
+ -0.067802,
+ -0.363397,
+ 0.143872
+ ],
+ [
+ -0.160168,
+ -0.316004,
+ 0.149607
+ ],
+ [
+ -0.214239,
+ -0.349814,
+ 0.097331
+ ],
+ [
+ -0.12654,
+ -0.368921,
+ 0.115312
+ ],
+ [
+ -0.174928,
+ -0.381097,
+ 0.076446
+ ],
+ [
+ -0.296492,
+ -0.484125,
+ 0.003302
+ ],
+ [
+ -0.047778,
+ -0.046732,
+ 0.358188
+ ],
+ [
+ -0.055536,
+ 0.022463,
+ 0.367119
+ ],
+ [
+ -0.587736,
+ 0.509947,
+ -0.089034
+ ],
+ [
+ -0.192287,
+ 0.184718,
+ 0.044684
+ ],
+ [
+ -0.179973,
+ -0.029769,
+ 0.185185
+ ],
+ [
+ -0.184742,
+ 0.007336,
+ 0.159131
+ ],
+ [
+ -0.53316,
+ -0.00281,
+ -0.06985
+ ],
+ [
+ -0.053512,
+ 0.108769,
+ 0.329154
+ ],
+ [
+ -0.417865,
+ 0.580056,
+ 0.043799
+ ],
+ [
+ -0.513369,
+ 0.556988,
+ -0.012361
+ ],
+ [
+ -0.702526,
+ 0.815808,
+ -0.305779
+ ],
+ [
+ -0.136598,
+ 0.539101,
+ 0.105957
+ ],
+ [
+ -0.245406,
+ 0.42254,
+ -0.017721
+ ],
+ [
+ -0.347121,
+ -0.411329,
+ -0.007055
+ ],
+ [
+ -0.751792,
+ -0.46007,
+ -0.660576
+ ],
+ [
+ -0.133564,
+ -0.070524,
+ 0.176632
+ ],
+ [
+ -0.081646,
+ -0.102624,
+ 0.187313
+ ],
+ [
+ -0.274798,
+ -0.41017,
+ 0.013976
+ ],
+ [
+ -0.246674,
+ -0.405906,
+ 0.000395
+ ],
+ [
+ -0.557818,
+ 0.612975,
+ -0.045534
+ ],
+ [
+ -0.178145,
+ -0.065032,
+ 0.145217
+ ],
+ [
+ -0.29587,
+ 0.581894,
+ 0.085318
+ ],
+ [
+ -0.308819,
+ 0.646372,
+ 0.095883
+ ],
+ [
+ -0.394258,
+ 0.971381,
+ -0.048086
+ ],
+ [
+ -0.626497,
+ 0.715121,
+ -0.160514
+ ],
+ [
+ -0.34279,
+ 0.810294,
+ 0.041509
+ ],
+ [
+ -0.640057,
+ 0.551678,
+ -0.148588
+ ],
+ [
+ -0.713162,
+ 0.611087,
+ -0.287225
+ ],
+ [
+ -0.075264,
+ -0.336933,
+ 0.176639
+ ],
+ [
+ -0.141254,
+ -0.348084,
+ 0.140835
+ ],
+ [
+ -0.193837,
+ -0.366553,
+ 0.094159
+ ],
+ [
+ -0.11676,
+ -0.088221,
+ 0.168209
+ ],
+ [
+ -0.259698,
+ -0.408653,
+ 0.011097
+ ],
+ [
+ -0.230118,
+ -0.425279,
+ 0.040491
+ ],
+ [
+ -0.240885,
+ -0.402752,
+ -0.013523
+ ],
+ [
+ -0.105935,
+ -0.040144,
+ 0.263286
+ ],
+ [
+ -0.164365,
+ -0.375904,
+ 0.049891
+ ],
+ [
+ -0.114602,
+ -0.370702,
+ 0.085892
+ ],
+ [
+ -0.059679,
+ -0.371079,
+ 0.109556
+ ],
+ [
+ -0.086116,
+ -0.606268,
+ 0.092515
+ ],
+ [
+ -0.078271,
+ -0.516369,
+ 0.14425
+ ],
+ [
+ -0.074924,
+ -0.478097,
+ 0.151109
+ ],
+ [
+ -0.07059,
+ -0.449605,
+ 0.144369
+ ],
+ [
+ -0.06525,
+ -0.429789,
+ 0.132118
+ ],
+ [
+ -0.171977,
+ -0.419185,
+ 0.065617
+ ],
+ [
+ -0.180752,
+ -0.425085,
+ 0.073243
+ ],
+ [
+ -0.193445,
+ -0.441055,
+ 0.077811
+ ],
+ [
+ -0.205704,
+ -0.464557,
+ 0.074374
+ ],
+ [
+ -0.264958,
+ -0.271844,
+ 0.079337
+ ],
+ [
+ -0.84382,
+ -0.041714,
+ -0.737316
+ ],
+ [
+ -0.0,
+ -0.117201,
+ 0.273256
+ ],
+ [
+ -0.20436,
+ -0.416537,
+ 0.026857
+ ],
+ [
+ -0.215877,
+ -0.417913,
+ 0.037825
+ ],
+ [
+ -0.066841,
+ -0.14961,
+ 0.191032
+ ],
+ [
+ -0.15726,
+ -0.116104,
+ 0.121067
+ ],
+ [
+ -0.074114,
+ -0.127865,
+ 0.190731
+ ],
+ [
+ -0.262059,
+ 0.139699,
+ 0.015141
+ ],
+ [
+ -0.372258,
+ 0.087411,
+ -0.005047
+ ],
+ [
+ -0.193123,
+ -0.027156,
+ 0.124677
+ ],
+ [
+ -0.574299,
+ 0.913162,
+ -0.167654
+ ],
+ [
+ -0.507779,
+ 0.782745,
+ -0.053203
+ ],
+ [
+ -0.446013,
+ 0.647324,
+ 0.034386
+ ],
+ [
+ -0.242742,
+ -0.532992,
+ 0.033218
+ ],
+ [
+ -0.156142,
+ 0.636413,
+ 0.129451
+ ],
+ [
+ -0.181188,
+ 0.813994,
+ 0.085267
+ ],
+ [
+ -0.211608,
+ 0.997158,
+ 0.012981
+ ],
+ [
+ -0.469426,
+ 0.325752,
+ -0.087699
+ ],
+ [
+ -0.641442,
+ 0.233623,
+ -0.193242
+ ],
+ [
+ -0.208083,
+ 0.339239,
+ -0.03533
+ ],
+ [
+ -0.558122,
+ 0.419669,
+ -0.120282
+ ],
+ [
+ -0.145808,
+ 0.234151,
+ 0.075197
+ ],
+ [
+ -0.146087,
+ 0.000409,
+ 0.25251
+ ],
+ [
+ -0.723318,
+ 0.180523,
+ -0.27624
+ ],
+ [
+ -0.588334,
+ 0.181496,
+ -0.132538
+ ],
+ [
+ -0.495886,
+ 0.156467,
+ -0.071195
+ ],
+ [
+ -0.369277,
+ 0.172079,
+ -0.032018
+ ],
+ [
+ -0.271886,
+ 0.20227,
+ -0.013418
+ ],
+ [
+ -0.203702,
+ 0.239913,
+ 0.00729
+ ],
+ [
+ -0.063013,
+ 0.333862,
+ 0.157506
+ ],
+ [
+ -0.709106,
+ 0.016464,
+ -0.254838
+ ],
+ [
+ -0.625147,
+ 0.434596,
+ -0.164589
+ ],
+ [
+ -0.027145,
+ -0.087984,
+ 0.325851
+ ],
+ [
+ -0.180265,
+ 0.113643,
+ 0.082394
+ ],
+ [
+ -0.866291,
+ 0.340273,
+ -0.689638
+ ],
+ [
+ -0.15564,
+ 0.282773,
+ 0.032448
+ ],
+ [
+ -0.199793,
+ -0.03377,
+ 0.077365
+ ],
+ [
+ -0.522583,
+ 0.373777,
+ -0.120258
+ ],
+ [
+ -0.149243,
+ 0.043932,
+ 0.216831
+ ],
+ [
+ -0.813462,
+ -0.247754,
+ -0.717305
+ ],
+ [
+ -0.207696,
+ 0.364914,
+ -0.044871
+ ],
+ [
+ -0.103308,
+ 0.083855,
+ 0.28115
+ ],
+ [
+ -0.559462,
+ -0.610714,
+ -0.253568
+ ],
+ [
+ -0.568936,
+ -0.727455,
+ -0.385341
+ ],
+ [
+ -0.800975,
+ -0.015146,
+ -0.473362
+ ],
+ [
+ -0.653716,
+ -0.511465,
+ -0.361915
+ ],
+ [
+ -0.766065,
+ 0.485483,
+ -0.384224
+ ],
+ [
+ -0.269958,
+ -0.848314,
+ -0.004448
+ ],
+ [
+ -0.020128,
+ -0.113381,
+ 0.270114
+ ],
+ [
+ -0.235355,
+ 0.057337,
+ 0.045552
+ ],
+ [
+ -0.716874,
+ 0.325843,
+ -0.290676
+ ],
+ [
+ -0.410605,
+ 0.339731,
+ -0.058595
+ ],
+ [
+ -0.355461,
+ 0.33236,
+ -0.042879
+ ],
+ [
+ -0.2457,
+ -0.438777,
+ 0.035893
+ ],
+ [
+ -0.697553,
+ -0.141862,
+ -0.279186
+ ],
+ [
+ -0.144651,
+ -0.964341,
+ -0.007262
+ ],
+ [
+ -0.359205,
+ -0.879017,
+ -0.151816
+ ],
+ [
+ -0.455228,
+ -0.818583,
+ -0.249921
+ ],
+ [
+ -0.0,
+ 0.807972,
+ 0.097149
+ ],
+ [
+ -0.0,
+ -0.976363,
+ 0.011806
+ ],
+ [
+ -0.304762,
+ 0.334769,
+ -0.042717
+ ],
+ [
+ -0.256031,
+ 0.344065,
+ -0.051617
+ ],
+ [
+ -0.223569,
+ 0.354991,
+ -0.052563
+ ],
+ [
+ -0.685824,
+ 0.455986,
+ -0.237234
+ ],
+ [
+ -0.256031,
+ 0.398619,
+ -0.042955
+ ],
+ [
+ -0.304762,
+ 0.407044,
+ -0.032132
+ ],
+ [
+ -0.355461,
+ 0.407304,
+ -0.031549
+ ],
+ [
+ -0.410605,
+ 0.403229,
+ -0.048627
+ ],
+ [
+ -0.449574,
+ 0.395358,
+ -0.075629
+ ],
+ [
+ -0.845338,
+ 0.535146,
+ -0.576277
+ ],
+ [
+ -0.449574,
+ 0.353553,
+ -0.080337
+ ],
+ [
+ -0.0,
+ -0.206474,
+ 0.198395
+ ],
+ [
+ -0.198722,
+ -0.224598,
+ 0.117937
+ ],
+ [
+ -0.136743,
+ -0.056612,
+ 0.200655
+ ],
+ [
+ -0.081839,
+ -0.208123,
+ 0.185314
+ ],
+ [
+ -0.0,
+ 0.441639,
+ 0.120499
+ ],
+ [
+ -0.462651,
+ -0.707099,
+ -0.166364
+ ],
+ [
+ -0.370523,
+ -0.781406,
+ -0.086819
+ ],
+ [
+ -0.146976,
+ -0.890956,
+ 0.060805
+ ],
+ [
+ -0.664621,
+ -0.620615,
+ -0.53595
+ ],
+ [
+ -0.223569,
+ 0.382658,
+ -0.046423
+ ],
+ [
+ -0.100853,
+ 0.214073,
+ 0.178479
+ ],
+ [
+ -0.0,
+ -0.904969,
+ 0.081948
+ ],
+ [
+ -0.258326,
+ -0.928346,
+ -0.061522
+ ],
+ [
+ -0.778025,
+ -0.197288,
+ -0.479976
+ ],
+ [
+ -0.122935,
+ -0.423166,
+ 0.107601
+ ],
+ [
+ -0.132143,
+ -0.436727,
+ 0.115302
+ ],
+ [
+ -0.1405,
+ -0.459987,
+ 0.120615
+ ],
+ [
+ -0.148249,
+ -0.495632,
+ 0.11703
+ ],
+ [
+ -0.173009,
+ -0.575389,
+ 0.067007
+ ],
+ [
+ -0.218584,
+ -0.392411,
+ 0.030514
+ ],
+ [
+ -0.236938,
+ -0.387175,
+ 0.044318
+ ],
+ [
+ -0.255682,
+ -0.377565,
+ 0.047377
+ ],
+ [
+ -0.318874,
+ -0.334438,
+ 0.036476
+ ],
+ [
+ -0.590558,
+ -0.174812,
+ -0.145191
+ ],
+ [
+ -0.105917,
+ 0.289103,
+ 0.116109
+ ],
+ [
+ -0.147029,
+ 0.423054,
+ 0.008104
+ ],
+ [
+ -0.199145,
+ 0.395654,
+ -0.031037
+ ],
+ [
+ -0.206429,
+ -0.3829,
+ 0.009878
+ ],
+ [
+ -0.608196,
+ -0.375248,
+ -0.229253
+ ],
+ [
+ -0.085749,
+ 0.431693,
+ 0.078593
+ ],
+ [
+ -0.216891,
+ -0.664335,
+ 0.040513
+ ],
+ [
+ -0.0,
+ 0.194205,
+ 0.292635
+ ],
+ [
+ -0.057794,
+ 0.252848,
+ 0.222572
+ ],
+ [
+ -0.0,
+ 0.269048,
+ 0.241411
+ ],
+ [
+ -0.139493,
+ 0.101445,
+ 0.170288
+ ],
+ [
+ -0.0,
+ -0.812887,
+ 0.114363
+ ],
+ [
+ -0.0,
+ -0.706524,
+ 0.111265
+ ],
+ [
+ -0.111636,
+ -0.699746,
+ 0.091809
+ ],
+ [
+ -0.367949,
+ -0.526512,
+ -0.040636
+ ],
+ [
+ -0.258623,
+ -0.09955,
+ 0.048233
+ ],
+ [
+ -0.299864,
+ -0.608078,
+ -0.007028
+ ],
+ [
+ -0.428825,
+ -0.096315,
+ -0.002376
+ ],
+ [
+ -0.33137,
+ -0.178758,
+ 0.031547
+ ],
+ [
+ -0.490803,
+ -0.224525,
+ -0.057627
+ ],
+ [
+ -0.13619,
+ -0.800834,
+ 0.090658
+ ],
+ [
+ -0.17256,
+ 0.060369,
+ 0.116583
+ ],
+ [
+ -0.43391,
+ -0.600268,
+ -0.094861
+ ],
+ [
+ -0.345039,
+ -0.6862,
+ -0.038573
+ ],
+ [
+ -0.419247,
+ -0.428174,
+ -0.048389
+ ],
+ [
+ -0.681806,
+ -0.283004,
+ -0.30045
+ ],
+ [
+ -0.513413,
+ -0.453367,
+ -0.131542
+ ],
+ [
+ -0.736526,
+ -0.365267,
+ -0.45744
+ ],
+ [
+ -0.390747,
+ -0.281866,
+ -0.003219
+ ],
+ [
+ -0.140469,
+ 0.165444,
+ 0.128502
+ ],
+ [
+ -0.12599,
+ -0.028771,
+ 0.266252
+ ],
+ [
+ -0.161454,
+ -0.052173,
+ 0.195359
+ ],
+ [
+ -0.103269,
+ 0.01649,
+ 0.318235
+ ],
+ [
+ -0.196391,
+ 0.470514,
+ 0.018877
+ ],
+ [
+ -0.294532,
+ 0.491179,
+ 0.023009
+ ],
+ [
+ -0.379054,
+ 0.492091,
+ 0.016789
+ ],
+ [
+ -0.455993,
+ 0.486881,
+ -0.009275
+ ],
+ [
+ -0.517207,
+ 0.464425,
+ -0.057355
+ ],
+ [
+ -0.578612,
+ 0.359377,
+ -0.166487
+ ],
+ [
+ -0.816419,
+ 0.161062,
+ -0.470758
+ ],
+ [
+ -0.526596,
+ 0.260392,
+ -0.11741
+ ],
+ [
+ -0.45554,
+ 0.240905,
+ -0.076304
+ ],
+ [
+ -0.365824,
+ 0.240215,
+ -0.047775
+ ],
+ [
+ -0.282783,
+ 0.256623,
+ -0.032839
+ ],
+ [
+ -0.220502,
+ 0.283607,
+ -0.022061
+ ],
+ [
+ -0.176718,
+ 0.310395,
+ -0.008276
+ ],
+ [
+ -0.857462,
+ 0.150989,
+ -0.737825
+ ],
+ [
+ -0.1563,
+ -0.074254,
+ 0.16462
+ ],
+ [
+ -0.098995,
+ 0.149379,
+ 0.232067
+ ],
+ [
+ -0.085822,
+ -0.032624,
+ 0.326571
+ ],
+ [
+ -0.051488,
+ -0.073579,
+ 0.294072
+ ],
+ [
+ -0.083755,
+ -0.043807,
+ 0.295287
+ ],
+ [
+ -0.138328,
+ -0.101713,
+ 0.147851
+ ],
+ [
+ -0.043331,
+ -0.082069,
+ 0.31312
+ ],
+ [
+ -0.035793,
+ -0.104215,
+ 0.262883
+ ],
+ [
+ -0.183441,
+ 0.361676,
+ -0.03303
+ ],
+ [
+ -0.140481,
+ 0.351701,
+ 0.005016
+ ],
+ [
+ -0.115388,
+ 0.34225,
+ 0.051115
+ ],
+ [
+ -0.475831,
+ 0.385841,
+ -0.094388
+ ],
+ [
+ -0.506813,
+ 0.401248,
+ -0.091661
+ ],
+ [
+ 0.051904,
+ 0.182564,
+ 0.276858
+ ],
+ [
+ 0.475831,
+ 0.364064,
+ -0.098372
+ ],
+ [
+ 0.046554,
+ -0.088386,
+ 0.256057
+ ],
+ [
+ 0.792995,
+ 0.68372,
+ -0.454156
+ ],
+ [
+ 0.29409,
+ 0.303454,
+ -0.034777
+ ],
+ [
+ 0.35783,
+ 0.297851,
+ -0.040502
+ ],
+ [
+ 0.422361,
+ 0.303846,
+ -0.057369
+ ],
+ [
+ 0.499632,
+ 0.346757,
+ -0.112304
+ ],
+ [
+ 0.242139,
+ 0.32068,
+ -0.034363
+ ],
+ [
+ 0.358934,
+ 0.436369,
+ -0.004827
+ ],
+ [
+ 0.299143,
+ 0.43429,
+ -0.00747
+ ],
+ [
+ 0.419009,
+ 0.429809,
+ -0.020872
+ ],
+ [
+ 0.465531,
+ 0.417925,
+ -0.049161
+ ],
+ [
+ 0.566333,
+ 0.2921,
+ -0.154715
+ ],
+ [
+ 0.253592,
+ -0.755109,
+ 0.025827
+ ],
+ [
+ 0.497399,
+ 0.373724,
+ -0.110262
+ ],
+ [
+ 0.807156,
+ 0.328863,
+ -0.457118
+ ],
+ [
+ 0.648876,
+ 0.338544,
+ -0.218714
+ ],
+ [
+ 0.318289,
+ -0.004971,
+ 0.030673
+ ],
+ [
+ 0.079597,
+ -0.296806,
+ 0.192217
+ ],
+ [
+ 0.067802,
+ -0.363397,
+ 0.143872
+ ],
+ [
+ 0.160168,
+ -0.316004,
+ 0.149607
+ ],
+ [
+ 0.214238,
+ -0.349814,
+ 0.097331
+ ],
+ [
+ 0.12654,
+ -0.368921,
+ 0.115312
+ ],
+ [
+ 0.174928,
+ -0.381097,
+ 0.076446
+ ],
+ [
+ 0.296492,
+ -0.484125,
+ 0.003302
+ ],
+ [
+ 0.047778,
+ -0.046732,
+ 0.358188
+ ],
+ [
+ 0.055536,
+ 0.022463,
+ 0.367119
+ ],
+ [
+ 0.587736,
+ 0.509947,
+ -0.089034
+ ],
+ [
+ 0.192286,
+ 0.184718,
+ 0.044684
+ ],
+ [
+ 0.179973,
+ -0.029769,
+ 0.185185
+ ],
+ [
+ 0.184742,
+ 0.007336,
+ 0.159131
+ ],
+ [
+ 0.53316,
+ -0.00281,
+ -0.06985
+ ],
+ [
+ 0.053512,
+ 0.108769,
+ 0.329154
+ ],
+ [
+ 0.417865,
+ 0.580056,
+ 0.043799
+ ],
+ [
+ 0.513369,
+ 0.556988,
+ -0.012361
+ ],
+ [
+ 0.702526,
+ 0.815808,
+ -0.305779
+ ],
+ [
+ 0.136598,
+ 0.539101,
+ 0.105957
+ ],
+ [
+ 0.245406,
+ 0.42254,
+ -0.017721
+ ],
+ [
+ 0.347121,
+ -0.411329,
+ -0.007055
+ ],
+ [
+ 0.751792,
+ -0.46007,
+ -0.660576
+ ],
+ [
+ 0.133564,
+ -0.070524,
+ 0.176632
+ ],
+ [
+ 0.081646,
+ -0.102624,
+ 0.187313
+ ],
+ [
+ 0.274798,
+ -0.41017,
+ 0.013976
+ ],
+ [
+ 0.246674,
+ -0.405906,
+ 0.000395
+ ],
+ [
+ 0.557818,
+ 0.612975,
+ -0.045534
+ ],
+ [
+ 0.178144,
+ -0.065032,
+ 0.145217
+ ],
+ [
+ 0.29587,
+ 0.581894,
+ 0.085318
+ ],
+ [
+ 0.308819,
+ 0.646372,
+ 0.095883
+ ],
+ [
+ 0.394258,
+ 0.971381,
+ -0.048086
+ ],
+ [
+ 0.626497,
+ 0.715121,
+ -0.160514
+ ],
+ [
+ 0.34279,
+ 0.810294,
+ 0.041509
+ ],
+ [
+ 0.640057,
+ 0.551678,
+ -0.148588
+ ],
+ [
+ 0.713162,
+ 0.611087,
+ -0.287225
+ ],
+ [
+ 0.075264,
+ -0.336933,
+ 0.176639
+ ],
+ [
+ 0.141254,
+ -0.348084,
+ 0.140835
+ ],
+ [
+ 0.193837,
+ -0.366553,
+ 0.094159
+ ],
+ [
+ 0.11676,
+ -0.088221,
+ 0.168209
+ ],
+ [
+ 0.259698,
+ -0.408653,
+ 0.011097
+ ],
+ [
+ 0.230118,
+ -0.425279,
+ 0.040491
+ ],
+ [
+ 0.240885,
+ -0.402752,
+ -0.013523
+ ],
+ [
+ 0.105935,
+ -0.040144,
+ 0.263286
+ ],
+ [
+ 0.164365,
+ -0.375904,
+ 0.049891
+ ],
+ [
+ 0.114602,
+ -0.370702,
+ 0.085892
+ ],
+ [
+ 0.059679,
+ -0.371079,
+ 0.109556
+ ],
+ [
+ 0.086116,
+ -0.606268,
+ 0.092515
+ ],
+ [
+ 0.078271,
+ -0.516369,
+ 0.14425
+ ],
+ [
+ 0.074924,
+ -0.478097,
+ 0.151109
+ ],
+ [
+ 0.07059,
+ -0.449605,
+ 0.144369
+ ],
+ [
+ 0.06525,
+ -0.429789,
+ 0.132118
+ ],
+ [
+ 0.171977,
+ -0.419185,
+ 0.065617
+ ],
+ [
+ 0.180752,
+ -0.425085,
+ 0.073243
+ ],
+ [
+ 0.193445,
+ -0.441055,
+ 0.077811
+ ],
+ [
+ 0.205704,
+ -0.464557,
+ 0.074374
+ ],
+ [
+ 0.264958,
+ -0.271844,
+ 0.079337
+ ],
+ [
+ 0.84382,
+ -0.041714,
+ -0.737316
+ ],
+ [
+ 0.20436,
+ -0.416537,
+ 0.026857
+ ],
+ [
+ 0.215877,
+ -0.417913,
+ 0.037825
+ ],
+ [
+ 0.066841,
+ -0.14961,
+ 0.191032
+ ],
+ [
+ 0.15726,
+ -0.116104,
+ 0.121067
+ ],
+ [
+ 0.074114,
+ -0.127865,
+ 0.190731
+ ],
+ [
+ 0.262059,
+ 0.139699,
+ 0.015141
+ ],
+ [
+ 0.372258,
+ 0.087411,
+ -0.005047
+ ],
+ [
+ 0.193123,
+ -0.027156,
+ 0.124677
+ ],
+ [
+ 0.574299,
+ 0.913162,
+ -0.167654
+ ],
+ [
+ 0.507779,
+ 0.782745,
+ -0.053203
+ ],
+ [
+ 0.446013,
+ 0.647324,
+ 0.034386
+ ],
+ [
+ 0.242742,
+ -0.532992,
+ 0.033218
+ ],
+ [
+ 0.156142,
+ 0.636413,
+ 0.129451
+ ],
+ [
+ 0.181188,
+ 0.813994,
+ 0.085267
+ ],
+ [
+ 0.211608,
+ 0.997158,
+ 0.012981
+ ],
+ [
+ 0.469426,
+ 0.325752,
+ -0.087699
+ ],
+ [
+ 0.641442,
+ 0.233623,
+ -0.193242
+ ],
+ [
+ 0.208083,
+ 0.339239,
+ -0.03533
+ ],
+ [
+ 0.558122,
+ 0.419669,
+ -0.120282
+ ],
+ [
+ 0.145808,
+ 0.234151,
+ 0.075197
+ ],
+ [
+ 0.146087,
+ 0.000409,
+ 0.25251
+ ],
+ [
+ 0.723318,
+ 0.180523,
+ -0.27624
+ ],
+ [
+ 0.588334,
+ 0.181496,
+ -0.132538
+ ],
+ [
+ 0.495886,
+ 0.156467,
+ -0.071195
+ ],
+ [
+ 0.369277,
+ 0.172079,
+ -0.032018
+ ],
+ [
+ 0.271886,
+ 0.20227,
+ -0.013418
+ ],
+ [
+ 0.203702,
+ 0.239913,
+ 0.00729
+ ],
+ [
+ 0.063013,
+ 0.333862,
+ 0.157506
+ ],
+ [
+ 0.709106,
+ 0.016464,
+ -0.254838
+ ],
+ [
+ 0.625147,
+ 0.434596,
+ -0.164589
+ ],
+ [
+ 0.027145,
+ -0.087984,
+ 0.325851
+ ],
+ [
+ 0.180265,
+ 0.113643,
+ 0.082394
+ ],
+ [
+ 0.866291,
+ 0.340273,
+ -0.689638
+ ],
+ [
+ 0.15564,
+ 0.282773,
+ 0.032448
+ ],
+ [
+ 0.199793,
+ -0.03377,
+ 0.077365
+ ],
+ [
+ 0.522583,
+ 0.373777,
+ -0.120258
+ ],
+ [
+ 0.149243,
+ 0.043932,
+ 0.216831
+ ],
+ [
+ 0.813462,
+ -0.247754,
+ -0.717305
+ ],
+ [
+ 0.207696,
+ 0.364914,
+ -0.044871
+ ],
+ [
+ 0.103308,
+ 0.083855,
+ 0.28115
+ ],
+ [
+ 0.559462,
+ -0.610714,
+ -0.253568
+ ],
+ [
+ 0.568936,
+ -0.727455,
+ -0.385341
+ ],
+ [
+ 0.800975,
+ -0.015146,
+ -0.473362
+ ],
+ [
+ 0.653716,
+ -0.511465,
+ -0.361915
+ ],
+ [
+ 0.766065,
+ 0.485483,
+ -0.384224
+ ],
+ [
+ 0.269958,
+ -0.848314,
+ -0.004448
+ ],
+ [
+ 0.020128,
+ -0.113381,
+ 0.270114
+ ],
+ [
+ 0.235355,
+ 0.057337,
+ 0.045552
+ ],
+ [
+ 0.716874,
+ 0.325843,
+ -0.290676
+ ],
+ [
+ 0.410605,
+ 0.339731,
+ -0.058595
+ ],
+ [
+ 0.355461,
+ 0.33236,
+ -0.042879
+ ],
+ [
+ 0.2457,
+ -0.438777,
+ 0.035893
+ ],
+ [
+ 0.697553,
+ -0.141862,
+ -0.279186
+ ],
+ [
+ 0.144651,
+ -0.964341,
+ -0.007262
+ ],
+ [
+ 0.359205,
+ -0.879017,
+ -0.151816
+ ],
+ [
+ 0.455228,
+ -0.818583,
+ -0.249921
+ ],
+ [
+ 0.304762,
+ 0.334769,
+ -0.042717
+ ],
+ [
+ 0.256031,
+ 0.344065,
+ -0.051617
+ ],
+ [
+ 0.223569,
+ 0.354991,
+ -0.052563
+ ],
+ [
+ 0.685824,
+ 0.455986,
+ -0.237234
+ ],
+ [
+ 0.256031,
+ 0.398619,
+ -0.042955
+ ],
+ [
+ 0.304762,
+ 0.407044,
+ -0.032132
+ ],
+ [
+ 0.355461,
+ 0.407304,
+ -0.031549
+ ],
+ [
+ 0.410605,
+ 0.403229,
+ -0.048627
+ ],
+ [
+ 0.449574,
+ 0.395358,
+ -0.075629
+ ],
+ [
+ 0.845338,
+ 0.535146,
+ -0.576277
+ ],
+ [
+ 0.449574,
+ 0.353553,
+ -0.080337
+ ],
+ [
+ 0.198722,
+ -0.224598,
+ 0.117937
+ ],
+ [
+ 0.136743,
+ -0.056612,
+ 0.200655
+ ],
+ [
+ 0.081839,
+ -0.208123,
+ 0.185314
+ ],
+ [
+ 0.462651,
+ -0.707099,
+ -0.166364
+ ],
+ [
+ 0.370523,
+ -0.781406,
+ -0.086819
+ ],
+ [
+ 0.146976,
+ -0.890956,
+ 0.060805
+ ],
+ [
+ 0.664621,
+ -0.620615,
+ -0.53595
+ ],
+ [
+ 0.223569,
+ 0.382658,
+ -0.046423
+ ],
+ [
+ 0.100853,
+ 0.214073,
+ 0.178479
+ ],
+ [
+ 0.258326,
+ -0.928346,
+ -0.061522
+ ],
+ [
+ 0.778025,
+ -0.197288,
+ -0.479976
+ ],
+ [
+ 0.122935,
+ -0.423166,
+ 0.107601
+ ],
+ [
+ 0.132143,
+ -0.436727,
+ 0.115302
+ ],
+ [
+ 0.1405,
+ -0.459987,
+ 0.120615
+ ],
+ [
+ 0.148249,
+ -0.495632,
+ 0.11703
+ ],
+ [
+ 0.173009,
+ -0.575389,
+ 0.067007
+ ],
+ [
+ 0.218584,
+ -0.392411,
+ 0.030514
+ ],
+ [
+ 0.236938,
+ -0.387175,
+ 0.044318
+ ],
+ [
+ 0.255682,
+ -0.377565,
+ 0.047377
+ ],
+ [
+ 0.318873,
+ -0.334438,
+ 0.036476
+ ],
+ [
+ 0.590558,
+ -0.174812,
+ -0.145191
+ ],
+ [
+ 0.105917,
+ 0.289103,
+ 0.116109
+ ],
+ [
+ 0.147029,
+ 0.423054,
+ 0.008104
+ ],
+ [
+ 0.199145,
+ 0.395654,
+ -0.031037
+ ],
+ [
+ 0.206429,
+ -0.3829,
+ 0.009878
+ ],
+ [
+ 0.608196,
+ -0.375248,
+ -0.229253
+ ],
+ [
+ 0.085749,
+ 0.431693,
+ 0.078593
+ ],
+ [
+ 0.216891,
+ -0.664335,
+ 0.040513
+ ],
+ [
+ 0.057794,
+ 0.252848,
+ 0.222572
+ ],
+ [
+ 0.139493,
+ 0.101445,
+ 0.170288
+ ],
+ [
+ 0.111636,
+ -0.699746,
+ 0.091809
+ ],
+ [
+ 0.367949,
+ -0.526512,
+ -0.040636
+ ],
+ [
+ 0.258623,
+ -0.09955,
+ 0.048233
+ ],
+ [
+ 0.299864,
+ -0.608078,
+ -0.007028
+ ],
+ [
+ 0.428825,
+ -0.096315,
+ -0.002376
+ ],
+ [
+ 0.33137,
+ -0.178758,
+ 0.031547
+ ],
+ [
+ 0.490803,
+ -0.224525,
+ -0.057627
+ ],
+ [
+ 0.13619,
+ -0.800834,
+ 0.090658
+ ],
+ [
+ 0.172559,
+ 0.060369,
+ 0.116583
+ ],
+ [
+ 0.43391,
+ -0.600268,
+ -0.094861
+ ],
+ [
+ 0.345039,
+ -0.6862,
+ -0.038573
+ ],
+ [
+ 0.419247,
+ -0.428174,
+ -0.048389
+ ],
+ [
+ 0.681806,
+ -0.283004,
+ -0.30045
+ ],
+ [
+ 0.513413,
+ -0.453367,
+ -0.131542
+ ],
+ [
+ 0.736526,
+ -0.365267,
+ -0.45744
+ ],
+ [
+ 0.390747,
+ -0.281866,
+ -0.003219
+ ],
+ [
+ 0.140469,
+ 0.165444,
+ 0.128502
+ ],
+ [
+ 0.12599,
+ -0.028771,
+ 0.266252
+ ],
+ [
+ 0.161454,
+ -0.052173,
+ 0.195359
+ ],
+ [
+ 0.103269,
+ 0.01649,
+ 0.318235
+ ],
+ [
+ 0.196391,
+ 0.470514,
+ 0.018877
+ ],
+ [
+ 0.294532,
+ 0.491179,
+ 0.023009
+ ],
+ [
+ 0.379054,
+ 0.492091,
+ 0.016789
+ ],
+ [
+ 0.455993,
+ 0.486881,
+ -0.009275
+ ],
+ [
+ 0.517207,
+ 0.464425,
+ -0.057355
+ ],
+ [
+ 0.578612,
+ 0.359377,
+ -0.166487
+ ],
+ [
+ 0.816419,
+ 0.161062,
+ -0.470758
+ ],
+ [
+ 0.526596,
+ 0.260392,
+ -0.11741
+ ],
+ [
+ 0.45554,
+ 0.240905,
+ -0.076304
+ ],
+ [
+ 0.365824,
+ 0.240215,
+ -0.047775
+ ],
+ [
+ 0.282783,
+ 0.256623,
+ -0.032839
+ ],
+ [
+ 0.220502,
+ 0.283607,
+ -0.022061
+ ],
+ [
+ 0.176718,
+ 0.310395,
+ -0.008276
+ ],
+ [
+ 0.857462,
+ 0.150989,
+ -0.737825
+ ],
+ [
+ 0.1563,
+ -0.074254,
+ 0.16462
+ ],
+ [
+ 0.098995,
+ 0.149379,
+ 0.232067
+ ],
+ [
+ 0.085822,
+ -0.032624,
+ 0.326571
+ ],
+ [
+ 0.051488,
+ -0.073579,
+ 0.294072
+ ],
+ [
+ 0.083755,
+ -0.043807,
+ 0.295287
+ ],
+ [
+ 0.138328,
+ -0.101713,
+ 0.147851
+ ],
+ [
+ 0.043331,
+ -0.082069,
+ 0.31312
+ ],
+ [
+ 0.035793,
+ -0.104215,
+ 0.262883
+ ],
+ [
+ 0.183441,
+ 0.361676,
+ -0.03303
+ ],
+ [
+ 0.14048,
+ 0.351701,
+ 0.005016
+ ],
+ [
+ 0.115388,
+ 0.34225,
+ 0.051115
+ ],
+ [
+ 0.475831,
+ 0.385841,
+ -0.094388
+ ],
+ [
+ 0.506813,
+ 0.401248,
+ -0.091661
+ ]
+ ],
+ "landmark_vtx": [
+ 418,
+ 1101,
+ 816,
+ 1245,
+ 1150,
+ 1150,
+ 1607,
+ 1788,
+ 1939,
+ 1970,
+ 2086,
+ 418,
+ 384,
+ 384,
+ 371,
+ 371,
+ 371,
+ 247,
+ 247,
+ 1101,
+ 1032,
+ 1920,
+ 1478,
+ 1470,
+ 1472,
+ 1788,
+ 1528,
+ 1877,
+ 1877,
+ 1850,
+ 1855,
+ 1434,
+ 214,
+ 1788,
+ 1920,
+ 1788,
+ 1059,
+ 768,
+ 388,
+ 438,
+ 409,
+ 403,
+ 373,
+ 271,
+ 1102,
+ 1149,
+ 1920,
+ 1331,
+ 1108,
+ 1137,
+ 1162,
+ 1149,
+ 1976,
+ 1928,
+ 1984,
+ 1932,
+ 1840,
+ 349,
+ 695,
+ 1094,
+ 1011,
+ 329,
+ 329,
+ 1961,
+ 1077,
+ 1972,
+ 1978,
+ 2077,
+ 1984,
+ 2017,
+ 1920,
+ 1920,
+ 422,
+ 407,
+ 409,
+ 1094,
+ 329,
+ 354,
+ 329,
+ 1107,
+ 373,
+ 383,
+ 388,
+ 245,
+ 260,
+ 361,
+ 375,
+ 375,
+ 339,
+ 339,
+ 339,
+ 310,
+ 743,
+ 924,
+ 1024,
+ 354,
+ 354,
+ 828,
+ 879,
+ 828,
+ 1273,
+ 1142,
+ 1062,
+ 2038,
+ 2038,
+ 1976,
+ 249,
+ 1963,
+ 2050,
+ 2081,
+ 1494,
+ 1434,
+ 1705,
+ 1788,
+ 1361,
+ 1113,
+ 1162,
+ 1162,
+ 1249,
+ 1284,
+ 1335,
+ 1363,
+ 1398,
+ 1162,
+ 1920,
+ 1101,
+ 1193,
+ 1920,
+ 1474,
+ 1111,
+ 1788,
+ 1156,
+ 924,
+ 1705,
+ 1158,
+ 296,
+ 214,
+ 1162,
+ 695,
+ 1920,
+ 214,
+ 1024,
+ 1164,
+ 1920,
+ 1494,
+ 1488,
+ 329,
+ 924,
+ 230,
+ 214,
+ 214,
+ 2030,
+ 229,
+ 1502,
+ 1528,
+ 1703,
+ 1920,
+ 1751,
+ 1842,
+ 1836,
+ 1836,
+ 1788,
+ 1920,
+ 1788,
+ 797,
+ 789,
+ 1094,
+ 806,
+ 1871,
+ 214,
+ 214,
+ 230,
+ 341,
+ 1770,
+ 1317,
+ 229,
+ 214,
+ 924,
+ 367,
+ 367,
+ 367,
+ 251,
+ 230,
+ 354,
+ 354,
+ 354,
+ 391,
+ 924,
+ 1383,
+ 1820,
+ 1770,
+ 354,
+ 695,
+ 1854,
+ 242,
+ 1241,
+ 1323,
+ 1325,
+ 1195,
+ 247,
+ 247,
+ 230,
+ 296,
+ 881,
+ 214,
+ 922,
+ 815,
+ 805,
+ 230,
+ 1166,
+ 296,
+ 214,
+ 341,
+ 695,
+ 341,
+ 695,
+ 628,
+ 1298,
+ 1107,
+ 1094,
+ 1149,
+ 1916,
+ 1930,
+ 1934,
+ 1893,
+ 1893,
+ 1788,
+ 1162,
+ 1434,
+ 1434,
+ 1438,
+ 1426,
+ 1389,
+ 1498,
+ 1162,
+ 1077,
+ 1239,
+ 1102,
+ 1032,
+ 1102,
+ 1026,
+ 1032,
+ 1032,
+ 1705,
+ 1682,
+ 1566,
+ 1788,
+ 1788,
+ 1244,
+ 1787,
+ 1031,
+ 1919,
+ 1477,
+ 1469,
+ 1471,
+ 1787,
+ 1527,
+ 1874,
+ 1876,
+ 1849,
+ 1856,
+ 1433,
+ 215,
+ 1787,
+ 1919,
+ 1787,
+ 1060,
+ 769,
+ 387,
+ 437,
+ 408,
+ 402,
+ 372,
+ 272,
+ 1103,
+ 1148,
+ 1919,
+ 1330,
+ 1109,
+ 1136,
+ 1161,
+ 1148,
+ 1975,
+ 1927,
+ 1983,
+ 1931,
+ 1839,
+ 348,
+ 696,
+ 1093,
+ 1010,
+ 328,
+ 328,
+ 1960,
+ 1076,
+ 1971,
+ 1977,
+ 2076,
+ 1983,
+ 2016,
+ 1919,
+ 1919,
+ 421,
+ 406,
+ 408,
+ 1093,
+ 328,
+ 353,
+ 328,
+ 1106,
+ 372,
+ 382,
+ 387,
+ 246,
+ 261,
+ 360,
+ 374,
+ 374,
+ 338,
+ 338,
+ 338,
+ 309,
+ 744,
+ 923,
+ 353,
+ 353,
+ 829,
+ 878,
+ 829,
+ 1272,
+ 1143,
+ 1061,
+ 2037,
+ 2037,
+ 1975,
+ 248,
+ 1962,
+ 2049,
+ 2080,
+ 1493,
+ 1433,
+ 1704,
+ 1787,
+ 1360,
+ 1112,
+ 1161,
+ 1161,
+ 1248,
+ 1283,
+ 1334,
+ 1362,
+ 1399,
+ 1161,
+ 1919,
+ 1101,
+ 1192,
+ 1919,
+ 1473,
+ 1110,
+ 1787,
+ 1155,
+ 923,
+ 1704,
+ 1157,
+ 297,
+ 215,
+ 1161,
+ 696,
+ 1919,
+ 215,
+ 1024,
+ 1163,
+ 1919,
+ 1493,
+ 1487,
+ 328,
+ 923,
+ 229,
+ 215,
+ 215,
+ 1501,
+ 1527,
+ 1702,
+ 1919,
+ 1750,
+ 1841,
+ 1835,
+ 1835,
+ 1787,
+ 1919,
+ 1787,
+ 790,
+ 1093,
+ 807,
+ 215,
+ 215,
+ 229,
+ 340,
+ 1769,
+ 1318,
+ 215,
+ 923,
+ 366,
+ 366,
+ 366,
+ 250,
+ 229,
+ 353,
+ 353,
+ 353,
+ 522,
+ 923,
+ 1382,
+ 1819,
+ 1769,
+ 353,
+ 696,
+ 1853,
+ 241,
+ 1324,
+ 1194,
+ 229,
+ 297,
+ 880,
+ 215,
+ 921,
+ 814,
+ 804,
+ 229,
+ 1165,
+ 297,
+ 215,
+ 340,
+ 696,
+ 340,
+ 696,
+ 627,
+ 1256,
+ 1106,
+ 1093,
+ 1148,
+ 1915,
+ 1929,
+ 1933,
+ 1892,
+ 1892,
+ 1787,
+ 1161,
+ 1433,
+ 1433,
+ 1437,
+ 1445,
+ 1388,
+ 1497,
+ 1161,
+ 1076,
+ 1240,
+ 1103,
+ 1031,
+ 1103,
+ 1025,
+ 1031,
+ 1031,
+ 1704,
+ 1681,
+ 1565,
+ 1787,
+ 1787
+ ],
+ "head_face_scale": 0.10362709
+}
\ No newline at end of file
diff --git a/workers/avatar-reconstruction/glb_ops.py b/workers/avatar-reconstruction/glb_ops.py
index 6c42cbee4..096254ba5 100644
--- a/workers/avatar-reconstruction/glb_ops.py
+++ b/workers/avatar-reconstruction/glb_ops.py
@@ -176,6 +176,73 @@ def set_material_base_color(
return True
+# ── geometry (stride-aware) ─────────────────────────────────────────────────────
+#
+# The Wolf3D_Head buffer is INTERLEAVED: POSITION / NORMAL / TEXCOORD_0 /
+# JOINTS_0 / WEIGHTS_0 share one bufferView with a 52-byte stride, so each
+# attribute's values sit every 52 bytes, not contiguously. A stride-unaware read
+# (the previous implementation) returns jumbled bytes — POSITION[1] would land on
+# NORMAL[0], etc. Every accessor read/write below honours bufferView.byteStride.
+
+_COMPONENT_DTYPE = {
+ 5120: np.int8, 5121: np.uint8, 5122: np.int16,
+ 5123: np.uint16, 5125: np.uint32, 5126: np.float32,
+}
+_TYPE_NCOMP = {"SCALAR": 1, "VEC2": 2, "VEC3": 3, "VEC4": 4, "MAT2": 4, "MAT3": 9, "MAT4": 16}
+
+
+def _read_accessor(glb: pygltflib.GLTF2, blob: bytes, acc_idx: int) -> np.ndarray:
+ """Stride-aware read of accessor acc_idx into an (count, ncomp) array."""
+ acc = glb.accessors[acc_idx]
+ bv = glb.bufferViews[acc.bufferView]
+ dtype = np.dtype(_COMPONENT_DTYPE[acc.componentType])
+ ncomp = _TYPE_NCOMP[acc.type]
+ item = dtype.itemsize * ncomp
+ stride = bv.byteStride or item
+ base = (bv.byteOffset or 0) + (acc.byteOffset or 0)
+ if stride == item:
+ # Tightly packed — a single vectorised read is correct and fast.
+ flat = np.frombuffer(blob[base : base + acc.count * item], dtype=dtype)
+ out = flat.reshape(acc.count, ncomp)
+ else:
+ # Interleaved — gather one vertex at a time honouring the stride.
+ out = np.empty((acc.count, ncomp), dtype=dtype)
+ for i in range(acc.count):
+ off = base + i * stride
+ out[i] = np.frombuffer(blob[off : off + item], dtype=dtype)
+ return out if ncomp > 1 else out.reshape(-1)
+
+
+def _write_accessor(glb: pygltflib.GLTF2, blob: bytearray, acc_idx: int, data: np.ndarray) -> None:
+ """
+ Stride-aware in-place overwrite of accessor acc_idx. `data` must have the same
+ count and component layout; only the value bytes are replaced, so an
+ interleaved buffer's other attributes (normals, joints, weights) are
+ untouched. Caller is responsible for updating accessor.min/max when relevant.
+ """
+ acc = glb.accessors[acc_idx]
+ bv = glb.bufferViews[acc.bufferView]
+ dtype = np.dtype(_COMPONENT_DTYPE[acc.componentType])
+ ncomp = _TYPE_NCOMP[acc.type]
+ item = dtype.itemsize * ncomp
+ stride = bv.byteStride or item
+ base = (bv.byteOffset or 0) + (acc.byteOffset or 0)
+ d = np.ascontiguousarray(data.reshape(acc.count, ncomp), dtype=dtype)
+ if stride == item:
+ blob[base : base + acc.count * item] = d.tobytes()
+ else:
+ for i in range(acc.count):
+ off = base + i * stride
+ blob[off : off + item] = d[i].tobytes()
+
+
+def _find_head_prim(glb: pygltflib.GLTF2):
+ mesh = next((m for m in glb.meshes if m.name == "Wolf3D_Head"), None)
+ if mesh is None:
+ raise ValueError("Wolf3D_Head mesh not found in GLB")
+ return mesh.primitives[0]
+
+
def get_head_mesh_data(glb: pygltflib.GLTF2) -> tuple[np.ndarray, np.ndarray, np.ndarray]:
"""
Return (positions, uvs, face_indices) for the Wolf3D_Head mesh.
@@ -183,34 +250,59 @@ def get_head_mesh_data(glb: pygltflib.GLTF2) -> tuple[np.ndarray, np.ndarray, np
uvs: (N, 2) float32 — TEXCOORD_0
faces: (F, 3) int32
"""
- mesh = next((m for m in glb.meshes if m.name == "Wolf3D_Head"), None)
- if mesh is None:
- raise ValueError("Wolf3D_Head mesh not found in GLB")
-
- prim = mesh.primitives[0]
+ prim = _find_head_prim(glb)
blob = glb.binary_blob()
+ positions = _read_accessor(glb, blob, prim.attributes.POSITION).astype(np.float32)
+ uvs = _read_accessor(glb, blob, prim.attributes.TEXCOORD_0).astype(np.float32)
+ faces = _read_accessor(glb, blob, prim.indices).reshape(-1, 3).astype(np.int32)
+ return positions, uvs, faces
- def read_accessor(acc_idx: int) -> np.ndarray:
- acc = glb.accessors[acc_idx]
- bv = glb.bufferViews[acc.bufferView]
- start = bv.byteOffset + (acc.byteOffset or 0)
- type_map = {
- "SCALAR": 1, "VEC2": 2, "VEC3": 3, "VEC4": 4,
- "MAT2": 4, "MAT3": 9, "MAT4": 16,
- }
- n_components = type_map[acc.type]
- component_map = {
- 5120: np.int8, 5121: np.uint8, 5122: np.int16,
- 5123: np.uint16, 5125: np.uint32, 5126: np.float32,
- }
- dtype = component_map[acc.componentType]
- n_items = acc.count * n_components
- data = np.frombuffer(blob[start : start + n_items * np.dtype(dtype).itemsize], dtype=dtype)
- return data.reshape(acc.count, n_components) if n_components > 1 else data
-
- positions = read_accessor(prim.attributes.POSITION).astype(np.float32)
- uvs = read_accessor(prim.attributes.TEXCOORD_0).astype(np.float32)
- indices_raw = read_accessor(prim.indices)
- faces = indices_raw.reshape(-1, 3).astype(np.int32)
- return positions, uvs, faces
+def recompute_vertex_normals(positions: np.ndarray, faces: np.ndarray) -> np.ndarray:
+ """Area-weighted vertex normals for a triangle mesh — (N, 3) float32, unit length."""
+ normals = np.zeros_like(positions, dtype=np.float32)
+ v0, v1, v2 = positions[faces[:, 0]], positions[faces[:, 1]], positions[faces[:, 2]]
+ face_normals = np.cross(v1 - v0, v2 - v0) # magnitude ∝ triangle area
+ for k in range(3):
+ np.add.at(normals, faces[:, k], face_normals)
+ lengths = np.linalg.norm(normals, axis=1, keepdims=True)
+ lengths[lengths == 0] = 1.0
+ return (normals / lengths).astype(np.float32)
+
+
+def set_head_geometry(
+ glb: pygltflib.GLTF2,
+ positions: np.ndarray,
+ faces: np.ndarray | None = None,
+ recompute_normals: bool = True,
+) -> None:
+ """
+ Overwrite the Wolf3D_Head base geometry with morphed `positions` (N, 3).
+
+ Vertex count and order are unchanged, so JOINTS_0/WEIGHTS_0 skinning and all
+ morph targets (the 52 ARKit blendshapes + visemes, stored as deltas relative
+ to the base) remain valid and attached. Updates the POSITION accessor min/max
+ and, unless disabled, recomputes and writes vertex normals. In-place on the
+ binary blob — no bufferView offsets shift because the byte size is identical.
+ """
+ prim = _find_head_prim(glb)
+ pos = np.ascontiguousarray(positions, dtype=np.float32)
+ acc = glb.accessors[prim.attributes.POSITION]
+ if pos.shape[0] != acc.count:
+ raise ValueError(
+ f"position count {pos.shape[0]} != head vertex count {acc.count}; "
+ "fixed-topology morph requires an unchanged vertex count"
+ )
+
+ blob = bytearray(glb.binary_blob())
+ _write_accessor(glb, blob, prim.attributes.POSITION, pos)
+ acc.min = pos.min(axis=0).tolist()
+ acc.max = pos.max(axis=0).tolist()
+
+ if recompute_normals and prim.attributes.NORMAL is not None:
+ if faces is None:
+ faces = _read_accessor(glb, blob, prim.indices).reshape(-1, 3).astype(np.int64)
+ normals = recompute_vertex_normals(pos, faces.astype(np.int64))
+ _write_accessor(glb, blob, prim.attributes.NORMAL, normals)
+
+ glb.set_binary_blob(bytes(blob))
diff --git a/workers/avatar-reconstruction/precompute_uv.py b/workers/avatar-reconstruction/precompute_uv.py
index 59fb72cb1..144eeb2e1 100644
--- a/workers/avatar-reconstruction/precompute_uv.py
+++ b/workers/avatar-reconstruction/precompute_uv.py
@@ -157,9 +157,10 @@ def precompute(glb_path: Path = TEMPLATE_GLB, out_path: Path = OUTPUT_JSON) -> N
canon_norm, _, _ = _normalise(canonical)
face_mask = _filter_face_vertices(positions)
+ face_indices = np.where(face_mask)[0] # subset idx → full head vertex idx
face_positions = positions[face_mask]
face_uvs = uvs[face_mask]
- face_norm, _, _ = _normalise(face_positions)
+ face_norm, _, head_face_scale = _normalise(face_positions)
# KD-tree on normalised Wolf3D face vertices.
tree = cKDTree(face_norm)
@@ -169,14 +170,16 @@ def precompute(glb_path: Path = TEMPLATE_GLB, out_path: Path = OUTPUT_JSON) -> N
print(f" Mean NN distance: {distances.mean():.4f} Max: {distances.max():.4f}")
- # Convert UV coords → pixel coords.
- # glTF UV convention: (0,0) = top-left, (1,1) = bottom-right.
+ # Convert UV coords → pixel coords, and record the FULL-mesh vertex index each
+ # landmark maps to (nn_indices are into the filtered face subset).
landmarks = []
+ landmark_vtx = []
for i, nn_idx in enumerate(nn_indices):
u, v = float(face_uvs[nn_idx, 0]), float(face_uvs[nn_idx, 1])
px = u * tex_w
py = v * tex_h
landmarks.append({"u": u, "v": v, "px": px, "py": py})
+ landmark_vtx.append(int(face_indices[nn_idx]))
result = {
"texture_width": tex_w,
@@ -184,6 +187,15 @@ def precompute(glb_path: Path = TEMPLATE_GLB, out_path: Path = OUTPUT_JSON) -> N
"landmarks": landmarks,
"face_oval_indices": FACE_OVAL_INDICES,
"skin_sample_indices": SKIN_SAMPLE_INDICES,
+ # ── geometry morph (Phase 2) ────────────────────────────────────────────
+ # canonical_norm: neutral MediaPipe face in unit-cube space (the reference
+ # the person's landmarks are aligned against).
+ # landmark_vtx: full-mesh head vertex each landmark drives.
+ # head_face_scale: metres-per-normalised-unit, to carry canonical-space
+ # identity displacements into head/metre space.
+ "canonical_norm": [[round(float(c), 6) for c in v] for v in canon_norm],
+ "landmark_vtx": landmark_vtx,
+ "head_face_scale": round(float(head_face_scale), 8),
}
out_path.write_text(json.dumps(result, indent=2))
diff --git a/workers/avatar-reconstruction/test_face_geometry.py b/workers/avatar-reconstruction/test_face_geometry.py
new file mode 100644
index 000000000..ae8247d44
--- /dev/null
+++ b/workers/avatar-reconstruction/test_face_geometry.py
@@ -0,0 +1,125 @@
+"""
+Unit tests for the face-geometry identity morph (pure numpy, no GPU/MediaPipe).
+
+Run: python3 test_face_geometry.py (asserts; exits non-zero on failure)
+
+Synthetic-landmark strategy: the morph aligns detected landmarks to the neutral
+canonical model with a similarity transform, so we can hand it canonical points
+put through ANY rotation/scale/translation plus a known local deformation, and it
+must recover that deformation (frame-invariant by construction) — no photo needed.
+"""
+
+import sys
+
+import numpy as np
+
+import glb_ops
+import face_geometry as fg
+
+
+def _load():
+ glb = glb_ops.load_glb(open("templates/default.glb", "rb").read())
+ base, _, faces = glb_ops.get_head_mesh_data(glb)
+ fmap = fg.FaceMap.load()
+ assert fmap is not None, "face_uv_map.json missing geometry fields — run precompute_uv.py"
+ return glb, base.astype(np.float64), faces, fmap
+
+
+def _random_similarity(seed):
+ rng = np.random.default_rng(seed)
+ # proper rotation
+ A = rng.normal(size=(3, 3))
+ Q, _ = np.linalg.qr(A)
+ if np.linalg.det(Q) < 0:
+ Q[:, 0] *= -1
+ s = float(rng.uniform(0.5, 2.0))
+ t = rng.normal(size=3) * 3.0
+ return s, Q, t
+
+
+def test_umeyama_recovers_transform():
+ _, base, _, fmap = _load()
+ canon = fmap.canonical_norm
+ s, R, t = _random_similarity(1)
+ moved = (s * (R @ canon.T)).T + t
+ s2, R2, t2 = fg.umeyama(canon, moved)
+ recon = (s2 * (R2 @ canon.T)).T + t2
+ err = np.abs(recon - moved).max()
+ assert err < 1e-9, f"umeyama reconstruction error {err}"
+ print("ok umeyama recovers similarity transform")
+
+
+def test_identity_no_morph():
+ """Detected == canonical (up to a rigid pose) ⇒ zero identity residual ⇒ head unchanged."""
+ _, base, _, fmap = _load()
+ s, R, t = _random_similarity(2)
+ detected = (s * (R @ fmap.canonical_norm.T)).T + t # neutral face, arbitrary pose
+ morphed = fg.morph_head_to_landmarks(base, fmap, detected, strength=0.75)
+ err = np.abs(morphed - base).max()
+ assert err < 1e-6, f"neutral face should not move the head, got max move {err}"
+ print(f"ok neutral face leaves head unchanged (max move {err:.2e})")
+
+
+def test_wider_face_widens_head():
+ """A face stretched 25% in X ⇒ the head's face region gets wider; back stays put."""
+ _, base, _, fmap = _load()
+ canon = fmap.canonical_norm.copy()
+ wide = canon.copy()
+ wide[:, 0] *= 1.25 # 25% wider identity
+ s, R, t = _random_similarity(3)
+ detected = (s * (R @ wide.T)).T + t
+ morphed = fg.morph_head_to_landmarks(base, fmap, detected, strength=1.0)
+
+ # Face-region vertices = those near a control point (front, +Z hemisphere).
+ front = base[:, 2] > np.median(base[:, 2])
+ cx = base[:, 0].mean()
+ base_spread = np.abs(base[front, 0] - cx).mean()
+ morph_spread = np.abs(morphed[front, 0] - cx).mean()
+ assert morph_spread > base_spread * 1.02, (
+ f"face did not widen: base {base_spread:.4f} → morph {morph_spread:.4f}"
+ )
+
+ # Back-of-head vertices (behind the face) must be essentially untouched by the mask.
+ back = base[:, 2] < np.percentile(base[:, 2], 15)
+ back_move = np.linalg.norm(morphed[back] - base[back], axis=1).max()
+ assert back_move < 0.01, f"back of head moved too much: {back_move:.4f}"
+ print(f"ok wider face widens front ({base_spread:.4f}→{morph_spread:.4f}), back frozen ({back_move:.2e})")
+
+
+def test_outlier_clamped():
+ """A single wild landmark must not blow up the mesh (displacement clamp)."""
+ _, base, _, fmap = _load()
+ detected = fmap.canonical_norm.copy()
+ detected[fmap.stable_indices[0]] += np.array([5.0, 5.0, 5.0]) # absurd outlier
+ morphed = fg.morph_head_to_landmarks(base, fmap, detected, strength=1.0)
+ move = np.linalg.norm(morphed - base, axis=1).max()
+ clamp = 0.18 * fmap.head_face_scale
+ assert move <= clamp * 1.5 + 1e-6, f"outlier not clamped: max move {move:.4f} vs clamp {clamp:.4f}"
+ assert np.isfinite(morphed).all(), "non-finite vertices after morph"
+ print(f"ok outlier landmark clamped (max move {move:.4f} ≤ ~{clamp:.4f})")
+
+
+def test_roundtrip_through_glb():
+ """Morph → write via glb_ops → reload: rig + 67 blendshapes survive, mesh valid."""
+ glb, base, faces, fmap = _load()
+ wide = fmap.canonical_norm.copy(); wide[:, 1] *= 1.15 # taller face
+ morphed = fg.morph_head_to_landmarks(base, fmap, wide, strength=0.9)
+ glb_ops.set_head_geometry(glb, morphed, faces=faces)
+ out = glb_ops.save_glb(glb)
+ g2 = glb_ops.load_glb(out)
+ prim = glb_ops._find_head_prim(g2)
+ pos2, _, _ = glb_ops.get_head_mesh_data(g2)
+ assert len(prim.targets) == 67, "blendshapes lost"
+ assert prim.attributes.JOINTS_0 is not None and prim.attributes.WEIGHTS_0 is not None, "skinning lost"
+ assert np.isfinite(pos2).all() and len(out) > 100_000, "invalid GLB"
+ print("ok morph survives GLB write/reload with rig + 67 blendshapes intact")
+
+
+if __name__ == "__main__":
+ tests = [v for k, v in sorted(globals().items()) if k.startswith("test_")]
+ try:
+ for t in tests:
+ t()
+ except AssertionError as e:
+ print("FAIL:", e); sys.exit(1)
+ print(f"\nall {len(tests)} face-geometry tests passed")