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.
This commit is contained in:
CRTkafa 2026-08-21 12:34:44 +00:00
parent 74068b13f5
commit 694c83f221
5 changed files with 88 additions and 50 deletions

8
.gitattributes vendored
View file

@ -1,9 +1,9 @@
# Depoda her zaman LF sakla, checkout'ta platformun yerel biçimini ver.
# Bu olmadan Windows'ta yapılan commit'ler CRLF ile girer ve Linux/macOS'taki
# katkıcılar dosyaların tamamını değişmiş görür.
# Always store LF in the repository, hand out the platform's native form on
# checkout. Without this, commits made on Windows go in with CRLF and every
# contributor on Linux or macOS sees the whole file as modified.
* text=auto eol=lf
# İkili dosyalar dönüştürülmemeli.
# Binary files must not be converted.
*.png binary
*.jpg binary
*.webp binary

20
.gitignore vendored
View file

@ -1,13 +1,13 @@
node_modules/
# Derleme çıktıları. `my-registry/dist/registry.json` build script'inden üretilir;
# depoya konmaz, `bun run registry:build` ile yeniden kurulur.
# Build output. `my-registry/dist/registry.json` is produced by the build
# script; it is not committed, and `bun run registry:build` rebuilds it.
dist/
dist-viewer/
# `bun run render` ve `bun run export:glb` çıktıları. İkisi de kaynaktan
# yeniden üretiliyor; depoda tutmak birkaç megabaytlık ikili dosyayı her
# değişiklikte yeniden yazmak demek olurdu.
# Output of `bun run render` and `bun run export:glb`. Both are regenerated
# from source, and keeping them here would mean rewriting several megabytes
# of binaries on every change.
renders/
glb/
@ -16,11 +16,15 @@ glb/
*.tsbuildinfo
.DS_Store
# Ajan/araç durumu
# Agent and tool state
.omc/
.claude/settings.local.json
# models.lock.json KASITLI OLARAK dahil edilir: kurulu kaynağın hangi sürümden
# geldiğini kaydeder ve `vibe3d diff` onunla yerel değişiklikleri bulur.
# models.lock.json is INTENTIONALLY tracked: it records which version the
# installed source came from, and `vibe3d diff` uses it to find local edits.
scripts/probe.ts
scripts/zdiag.ts
# Reference images. They belong to the (private) studio repo, not to the
# registry that consumers clone.
references/

View file

@ -67,7 +67,7 @@
"address": "@medieval-kit/wooden-barrel",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.723Z",
"installedAt": "2026-08-21T12:33:48.709Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-barrel\\model.ts",
@ -82,7 +82,7 @@
"address": "@medieval-kit/core",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.704Z",
"installedAt": "2026-08-21T12:33:48.690Z",
"files": [
{
"path": "src\\models\\medieval-kit\\core\\geometry.ts",
@ -129,7 +129,7 @@
"address": "@medieval-kit/wooden-crate",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.728Z",
"installedAt": "2026-08-21T12:33:48.714Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-crate\\model.ts",
@ -144,7 +144,7 @@
"address": "@medieval-kit/kit",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.734Z",
"installedAt": "2026-08-21T12:33:48.720Z",
"files": [],
"dependencies": []
},
@ -152,7 +152,7 @@
"address": "@medieval-kit/iron-anvil",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.711Z",
"installedAt": "2026-08-21T12:33:48.698Z",
"files": [
{
"path": "src\\models\\medieval-kit\\iron-anvil\\model.ts",
@ -167,7 +167,7 @@
"address": "@medieval-kit/wooden-bucket",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.726Z",
"installedAt": "2026-08-21T12:33:48.712Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-bucket\\model.ts",
@ -182,7 +182,7 @@
"address": "@medieval-kit/wooden-fence",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.729Z",
"installedAt": "2026-08-21T12:33:48.715Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-fence\\model.ts",
@ -197,7 +197,7 @@
"address": "@medieval-kit/wooden-hoe",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.730Z",
"installedAt": "2026-08-21T12:33:48.716Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-hoe\\model.ts",
@ -212,7 +212,7 @@
"address": "@medieval-kit/wooden-ladder",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.731Z",
"installedAt": "2026-08-21T12:33:48.717Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-ladder\\model.ts",
@ -227,7 +227,7 @@
"address": "@medieval-kit/wooden-pitchfork",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.732Z",
"installedAt": "2026-08-21T12:33:48.718Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-pitchfork\\model.ts",
@ -242,7 +242,7 @@
"address": "@medieval-kit/wooden-shovel",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.733Z",
"installedAt": "2026-08-21T12:33:48.719Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-shovel\\model.ts",
@ -257,7 +257,7 @@
"address": "@medieval-kit/wooden-stool",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.734Z",
"installedAt": "2026-08-21T12:33:48.720Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-stool\\model.ts",
@ -272,7 +272,7 @@
"address": "@medieval-kit/cart-wheel",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.707Z",
"installedAt": "2026-08-21T12:33:48.693Z",
"files": [
{
"path": "src\\models\\medieval-kit\\cart-wheel\\model.ts",
@ -287,11 +287,11 @@
"address": "@medieval-kit/log-pile",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.716Z",
"installedAt": "2026-08-21T12:33:48.702Z",
"files": [
{
"path": "src\\models\\medieval-kit\\log-pile\\model.ts",
"sourceHash": "a0e626ed6efaeb510addc8d3b0827966b46ea44b8d93f27f486a08ecfcddcbfb"
"sourceHash": "0cae2e57ac46fedf3ad63211901671c0ace45520b893f5443c3be23008751369"
}
],
"dependencies": [
@ -302,7 +302,7 @@
"address": "@medieval-kit/trestle-table",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.721Z",
"installedAt": "2026-08-21T12:33:48.707Z",
"files": [
{
"path": "src\\models\\medieval-kit\\trestle-table\\model.ts",
@ -317,7 +317,7 @@
"address": "@medieval-kit/wooden-chest",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.727Z",
"installedAt": "2026-08-21T12:33:48.713Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-chest\\model.ts",
@ -332,7 +332,7 @@
"address": "@medieval-kit/hay-bale",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.710Z",
"installedAt": "2026-08-21T12:33:48.697Z",
"files": [
{
"path": "src\\models\\medieval-kit\\hay-bale\\model.ts",
@ -347,7 +347,7 @@
"address": "@medieval-kit/pitch-torch",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.717Z",
"installedAt": "2026-08-21T12:33:48.704Z",
"files": [
{
"path": "src\\models\\medieval-kit\\pitch-torch\\model.ts",
@ -362,7 +362,7 @@
"address": "@medieval-kit/wooden-bench",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.725Z",
"installedAt": "2026-08-21T12:33:48.710Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wooden-bench\\model.ts",
@ -377,7 +377,7 @@
"address": "@medieval-kit/linen-sack",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.715Z",
"installedAt": "2026-08-21T12:33:48.701Z",
"files": [
{
"path": "src\\models\\medieval-kit\\linen-sack\\model.ts",
@ -392,7 +392,7 @@
"address": "@medieval-kit/oak-tankard",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.717Z",
"installedAt": "2026-08-21T12:33:48.703Z",
"files": [
{
"path": "src\\models\\medieval-kit\\oak-tankard\\model.ts",
@ -407,7 +407,7 @@
"address": "@medieval-kit/straw-broom",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.719Z",
"installedAt": "2026-08-21T12:33:48.705Z",
"files": [
{
"path": "src\\models\\medieval-kit\\straw-broom\\model.ts",
@ -422,7 +422,7 @@
"address": "@medieval-kit/bronze-bell",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.706Z",
"installedAt": "2026-08-21T12:33:48.692Z",
"files": [
{
"path": "src\\models\\medieval-kit\\bronze-bell\\model.ts",
@ -437,7 +437,7 @@
"address": "@medieval-kit/iron-lantern",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.712Z",
"installedAt": "2026-08-21T12:33:48.698Z",
"files": [
{
"path": "src\\models\\medieval-kit\\iron-lantern\\model.ts",
@ -452,7 +452,7 @@
"address": "@medieval-kit/tavern-sign",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.720Z",
"installedAt": "2026-08-21T12:33:48.706Z",
"files": [
{
"path": "src\\models\\medieval-kit\\tavern-sign\\model.ts",
@ -467,7 +467,7 @@
"address": "@medieval-kit/coin-pouch",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.708Z",
"installedAt": "2026-08-21T12:33:48.694Z",
"files": [
{
"path": "src\\models\\medieval-kit\\coin-pouch\\model.ts",
@ -482,7 +482,7 @@
"address": "@medieval-kit/glass-phial",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.709Z",
"installedAt": "2026-08-21T12:33:48.696Z",
"files": [
{
"path": "src\\models\\medieval-kit\\glass-phial\\model.ts",
@ -497,7 +497,7 @@
"address": "@medieval-kit/leather-book",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.714Z",
"installedAt": "2026-08-21T12:33:48.700Z",
"files": [
{
"path": "src\\models\\medieval-kit\\leather-book\\model.ts",
@ -512,7 +512,7 @@
"address": "@medieval-kit/wicker-basket",
"source": "file:my-registry/dist/registry.json",
"version": "workspace",
"installedAt": "2026-08-21T12:22:32.722Z",
"installedAt": "2026-08-21T12:33:48.708Z",
"files": [
{
"path": "src\\models\\medieval-kit\\wicker-basket\\model.ts",

View file

@ -47,8 +47,11 @@ export interface LogPileConfig {
}
export const logPileDefaults: LogPileConfig = {
rows: 3,
perRow: 5,
// Denser than it was. Twelve logs read as "some firewood"; a stack is the
// thing that makes a wall look lived-against, and that needs enough logs
// for the ends to form a pattern rather than a row.
rows: 4,
perRow: 7,
logLength: 0.62,
logRadius: 0.065,
variation: 0.22,
@ -97,7 +100,11 @@ export function createModel(overrides: Partial<LogPileConfig> = {}) {
}
const endTint = (): Color => {
tint.copy(MEDIEVAL_PALETTE.oakEnd)
tint.offsetHSL(jitter(random, 0.012), jitter(random, 0.05), 0.07 + jitter(random, 0.05))
// +0.07 did not deliver what the file header promises. A sawn end is
// dramatically paler than bark -- in a reference photograph the pale
// discs are the first thing the eye lands on -- and at this offset the
// ends were merely a slightly different brown.
tint.offsetHSL(jitter(random, 0.012), -0.06 + jitter(random, 0.04), 0.19 + jitter(random, 0.05))
return tint
}
@ -165,7 +172,17 @@ export function createModel(overrides: Partial<LogPileConfig> = {}) {
const tilt = jitter(random, 0.04)
for (const [target, geometry] of [[bark, body], [ends, capA], [ends, capB]] as const) {
geometry.rotateY(roll)
geometry.rotateZ(Math.PI / 2)
// About X, NOT about Z.
//
// `latheGeometry` builds along Y. Rotating +90 degrees about Z
// sends +Y to -X, so every log lay along the X axis -- which is
// the very 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 straight through about five of its neighbours. The tangent
// solve above was correct the whole time; it was solving for an
// orientation the geometry did not have. Rotating about X sends
// +Y to +Z, which is the axis `restingHeight` assumes.
geometry.rotateX(Math.PI / 2)
geometry.rotateY(tilt)
geometry.translate(log.x, log.y, jitter(random, config.logLength * 0.015))
target.push(geometry)

View file

@ -47,8 +47,11 @@ export interface LogPileConfig {
}
export const logPileDefaults: LogPileConfig = {
rows: 3,
perRow: 5,
// Denser than it was. Twelve logs read as "some firewood"; a stack is the
// thing that makes a wall look lived-against, and that needs enough logs
// for the ends to form a pattern rather than a row.
rows: 4,
perRow: 7,
logLength: 0.62,
logRadius: 0.065,
variation: 0.22,
@ -97,7 +100,11 @@ export function createModel(overrides: Partial<LogPileConfig> = {}) {
}
const endTint = (): Color => {
tint.copy(MEDIEVAL_PALETTE.oakEnd)
tint.offsetHSL(jitter(random, 0.012), jitter(random, 0.05), 0.07 + jitter(random, 0.05))
// +0.07 did not deliver what the file header promises. A sawn end is
// dramatically paler than bark -- in a reference photograph the pale
// discs are the first thing the eye lands on -- and at this offset the
// ends were merely a slightly different brown.
tint.offsetHSL(jitter(random, 0.012), -0.06 + jitter(random, 0.04), 0.19 + jitter(random, 0.05))
return tint
}
@ -165,7 +172,17 @@ export function createModel(overrides: Partial<LogPileConfig> = {}) {
const tilt = jitter(random, 0.04)
for (const [target, geometry] of [[bark, body], [ends, capA], [ends, capB]] as const) {
geometry.rotateY(roll)
geometry.rotateZ(Math.PI / 2)
// About X, NOT about Z.
//
// `latheGeometry` builds along Y. Rotating +90 degrees about Z
// sends +Y to -X, so every log lay along the X axis -- which is
// the very 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 straight through about five of its neighbours. The tangent
// solve above was correct the whole time; it was solving for an
// orientation the geometry did not have. Rotating about X sends
// +Y to +Z, which is the axis `restingHeight` assumes.
geometry.rotateX(Math.PI / 2)
geometry.rotateY(tilt)
geometry.translate(log.x, log.y, jitter(random, config.logLength * 0.015))
target.push(geometry)