89c0fbe1f6
The deploy pipeline runs from the working tree, so a wave of shipped features
had never been committed. This snapshots git to what's actually running.
SEO impression recovery (live + verified):
- Duplicate /a/{id} now 301-redirect to their canonical twin instead of 404
(a hard 404 silently dropped already-indexed URLs and tanked impressions).
- Dedup representative selection reworked: accepted/serveable -> established
rep (URL stability) -> quality score, so an accepted page never retires to a
rejected rep and an indexed canonical doesn't churn when a newer twin arrives.
- HEAD /a/{id} returns the same status as GET (api_route GET+HEAD) instead of
falling through to the static mount and 404ing.
- `dedup --force-recluster`: cycle-locked, model-free re-cluster to re-apply the
policy to the existing corpus (shared cycle_lock context manager).
- CLI honors GOODNEWS_DB for its default --db (was silently ignored).
Publishing Desk (admin tool to post highlights to X via Web Intents):
- publishing.py queue/rank/handle-resolution; admin UI; full searchable emoji
picker (bundled data, no CDN) for the blurb editor.
Play games + site:
- Bloom (word-wheel), Memory Match, daily ritual set, Zen Den (dev-gated).
- English-only language gate; source prospecting; paywall + dedup hardening.
Tests: full suite green (349). Ignores tightened (node_modules, data/*.db).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
47 lines
1.9 KiB
JavaScript
47 lines
1.9 KiB
JavaScript
import { NodeIO } from '@gltf-transform/core';
|
|
import { ALL_EXTENSIONS } from '@gltf-transform/extensions';
|
|
|
|
const input = process.argv[2];
|
|
const io = new NodeIO().registerExtensions(ALL_EXTENSIONS);
|
|
const doc = await io.read(input);
|
|
const root = doc.getRoot();
|
|
|
|
const skin = root.listSkins()[0];
|
|
const joints = skin.listJoints();
|
|
const isFinJoint = joints.map((n) => !n.getName().startsWith('Spine'));
|
|
console.log(`skin joints: ${joints.length} (fin joints: ${isFinJoint.filter(Boolean).length}, body/Spine: ${isFinJoint.filter((x) => !x).length})`);
|
|
|
|
const mesh = root.listMeshes()[0];
|
|
const prims = mesh.listPrimitives();
|
|
console.log(`meshes: ${root.listMeshes().length}, primitives: ${prims.length}`);
|
|
const prim = prims[0];
|
|
const pos = prim.getAttribute('POSITION');
|
|
const jA = prim.getAttribute('JOINTS_0');
|
|
const wA = prim.getAttribute('WEIGHTS_0');
|
|
const idx = prim.getIndices();
|
|
console.log(`semantics: ${prim.listSemantics().join(', ')}`);
|
|
console.log(`vertices: ${pos.getCount()}, indices: ${idx.getCount()} (${idx.getCount() / 3} tris)`);
|
|
|
|
const vcount = pos.getCount();
|
|
const vIsFin = new Uint8Array(vcount);
|
|
const j = [0, 0, 0, 0], w = [0, 0, 0, 0];
|
|
for (let i = 0; i < vcount; i++) {
|
|
jA.getElement(i, j);
|
|
wA.getElement(i, w);
|
|
let fin = 0, tot = 0;
|
|
for (let k = 0; k < 4; k++) { tot += w[k]; if (isFinJoint[j[k]]) fin += w[k]; }
|
|
vIsFin[i] = tot > 0 && fin / tot >= 0.5 ? 1 : 0;
|
|
}
|
|
let finV = 0;
|
|
for (let i = 0; i < vcount; i++) finV += vIsFin[i];
|
|
|
|
const arr = idx.getArray();
|
|
let bodyT = 0, finT = 0, mixed = 0;
|
|
for (let t = 0; t < arr.length; t += 3) {
|
|
const votes = vIsFin[arr[t]] + vIsFin[arr[t + 1]] + vIsFin[arr[t + 2]];
|
|
if (votes >= 2) finT++; else bodyT++;
|
|
if (votes === 1 || votes === 2) mixed++;
|
|
}
|
|
console.log(`fin vertices: ${finV}/${vcount} (${(100 * finV / vcount).toFixed(1)}%)`);
|
|
console.log(`triangles → body: ${bodyT}, fin: ${finT}, (boundary/mixed tris: ${mixed})`);
|