Commit graph

4 commits

Author SHA1 Message Date
CRT
75909a6219 Fix the log pile's axis, and finish translating the repo
The pile was the model I had been told twice was wrong and had twice failed
to find anything wrong with. A reference photograph of a real woodstack
found it in one look: ours was five long sticks lying across each other,
and the reference was forty short logs nested into courses.

The cause was a single rotation. `latheGeometry` builds along Y, and the
logs were turned with `rotateZ(PI/2)`, which sends +Y to -X -- so every log
lay along the X axis. That is the same axis the layout spaces them along.
Each log was 0.62 m long and its neighbour's centre was 0.13 m away, so
every log ran through roughly five of its neighbours. `restingHeight` was
right the whole time; it was solving tangency for an orientation the
geometry did not actually have. Rotating about X instead sends +Y to +Z,
which is the axis the solver assumes, and the pile immediately settles into
courses that rest on each other.

Nothing in the check suite could see this. Support saw one connected mass
and passed it, which is exactly what a heap of interpenetrating logs looks
like to a connectivity test.

Two smaller things the same photograph showed. The file header claims the
sawn ends are "far lighter than the bark" and that the pale discs are the
first thing you see; at +0.07 lightness they were a slightly different
brown, so the offset now delivers what the comment promises. And twelve
logs read as some firewood rather than as a stack, so the default is denser.

Also: .gitignore and .gitattributes were still entirely in Turkish. The
earlier translation sweep matched on file extension and never looked at
extensionless files. src/viewer.css tripped the scan too, but that was 80
occurrences of the CSS `var()` function, not Turkish.

27 models, 17393 triangles, all checks pass, 0 floating cases.
2026-08-21 19:34:44 +07:00
CRT
50c7fc60b9 Translate the whole repository to English
The kit is going public, so everything a reader sees is now English:
27 model sources, the core vocabulary, meta.ts (titles, descriptions and
every slider label), the viewer UI, all script output, REFERENCE.md and
the READMEs.

Rules applied: only comments, doc comments and human-facing strings were
touched. Identifiers, numbers, logic, registry item ids, part names and
material slot names are unchanged — those are a published contract and
were already English.

Verified rather than assumed: for all 53 changed .ts files the code
skeleton (source with comments stripped and string contents replaced by a
placeholder) is byte-identical before and after. Full gate is green —
typecheck, registry conformance, ~510 model checks, GLB round trip and a
production build.

Also fixed here:
- index.html and viewer.html were missed by the translation pass because
  the file list only covered .ts/.md/.css. Both had lang="tr" and Turkish
  titles.
- The viewer formatted triangle counts with toLocaleString('tr-TR'), which
  prints 15.425 rather than 15,425.
- REFERENCE.md's model table header did not match what
  scripts/catalog-table.ts emits, so the next regeneration would have
  silently changed it. Aligned to the generator.
- Removed scripts/probe.ts and scripts/zdiag.ts; they were throwaway
  diagnostics that got committed by accident.
2026-08-21 14:35:13 +07:00
CRT
a3300ff233 Kit'i 26 modele çıkar, doğrulamayı ve inceleyiciyi genişlet
Modeller (13 → 26): chest, bench, torch, lantern, bell, sign, hay bale,
sack, broom, tankard, book, phial, coin pouch. Kürek, çapa ve yaba
render'lara bakılarak yeniden yazıldı.

core:
- createKitModel artık tipli `actions` ve `update(dt)` taşıyor
- BuiltPart.extras: bir parça birden çok materyal yuvası kullanabiliyor
  (sandığın kapağı = meşe tahta + demir kayış, birlikte dönmek zorunda)
- BuiltPart.origin: parça başına dönme merkezi (menteşe, sarkaç)
- bendGeometry / roughenGeometry / mottleGeometry
- 5 yeni materyal yuvası: steel, brass, straw, cloth, leather, glass
- bandGeometry({ inner }) — serbest halkalar kapalı katı olabilsin

my-registry/meta.ts: katalog metadata'sı artık build.ts ve viewer için
tek kaynak. Doğrulama modelle metadata'nın uyuştuğunu denetliyor ve bu
eklendiği gün dört modelde gerçek bir sapma yakaladı.

Doğrulama (~500 kontrol):
- metadata uyumu, eylem semantiği, kare hızı bağımsızlığı
- scripts/render.ts: tarayıcısız yazılım rasterleyici. Bütün doğrulama
  geometrikti; "bu kürek küreğe benzemiyor" diyebilmek için modele
  bakmak gerekiyordu
- scripts/verify-glb.ts: dışa aktar → geri oku → karşılaştır

GLB dışa aktarımı: viewer düğmesi ve toplu CLI aynı kodu kullanıyor.

Viewer:
- parça paneli (solo/izole) ve materyal yuvası paneli (canlı renk override)
- kit görünümü: 26 model tek sahnede, ölçek ve ton tutarlılığı için
- configure() sonrası gölge bayraklarının düşmesi düzeltildi
2026-08-21 09:44:58 +07:00
CRT
98cfbab180 Initial commit: @medieval-kit registry and viewer
A lowpoly medieval procedural model library for Vibe3D, plus the model
inspector used to build it.

Registry (@medieval-kit, published as @medieval-kit/registry):
- core: deterministic mulberry32 RNG, slot-based vertex-coloured materials,
  a geometry vocabulary (box, prism, stave, band, head, flip), and the
  stable-anchor part slots the Vibe3D protocol requires
- wooden-barrel: 806 tris, 13 separate staves, iron hoops, recessed heads
- wooden-crate: 360 tris, plank rows on corner posts, forged straps
- iron-brazier: 423 tris, typed actions, per-frame flame flicker, own light

The kit declares no renderer capabilities, so it runs on WebGLRenderer as
well as WebGPURenderer. Colour variation lives in vertex attributes rather
than in materials, so each model keeps one draw call per material.

Verification (bun run verify) covers 64 checks without a browser: geometry
validity, winding by two measures (radial alignment for bodies of
revolution, signed volume for closed solids), coplanar-face detection for
z-fighting, stable root and anchor identity across configure(),
deterministic seeding, material ownership, and idempotent disposal.
2026-08-21 06:15:58 +07:00