37 lowpoly medieval models for Vibe3D · a market, a forge, a windmill https://medieval.crt.fyi/
Find a file
CRT 5230feb053 Build the hoe's blade as a dished sheet instead of a bent box
The blade was a `chamferedBoxGeometry` put through `bendGeometry`. That has
four levels in Y, and once the blade was deep enough to look like a hoe the
bend had to work a 50-degree arc across those four: the cutting edge came
out as a row of steps rather than a curve. `dishedSheetGeometry` exists for
exactly this and is what the shovel's blade already uses -- one seamless
concave surface, curved at every level. It also removes the last
bend-a-box from this model, which is the pattern the helper now refuses.

The blade is deeper and properly wedged. A hoe is narrow where the neck
carries it and wide where it meets the ground, and at 0.115 of the tool's
length with sides nearly parallel it read as a tab riveted to a stick.

Two mistakes on the way, both mine, both caught by looking:

I lowered `neckSweep` from 112 to 95 after reading a render in which the
blade happened to sit edge-on to the camera, and mistook foreshortening for
a wrong angle. Reverted.

Then `curve` was written as `-0.34 * dish`. It is an absolute rise in
metres, not a ratio, so that asked for 340 mm across a 230 mm blade --
seven times its own half-width -- and the sheet came out as a pair of
wings. The shovel scales it by its own blade width and this now does the
same. The dish sliders on the two models run over different ranges, so the
coefficient differs; the quantity does not.

One thing deliberately NOT changed. The reference generated for this model
is a plain strap hoe, while this one is a gooseneck -- a curved forged neck
carrying the blade ahead of the shaft axis, as its description says. Both
are period-correct, and pulling the model towards the photograph there
would be redesigning it rather than fixing it. The blade's depth and wedge
are a different matter: those are true of a hoe whichever neck it hangs on.

27 models, 18759 triangles, all checks pass, 0 floating cases, build clean.
2026-08-23 04:57:59 +00:00
my-registry Build the hoe's blade as a dished sheet instead of a bent box 2026-08-23 04:57:59 +00:00
scripts Build the hoe's blade as a dished sheet instead of a bent box 2026-08-23 04:57:59 +00:00
src Build the hoe's blade as a dished sheet instead of a bent box 2026-08-23 04:57:59 +00:00
.gitattributes Fix the log pile's axis, and finish translating the repo 2026-08-21 12:34:44 +00:00
.gitignore Fix the log pile's axis, and finish translating the repo 2026-08-21 12:34:44 +00:00
bun.lock Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
index.html Translate the whole repository to English 2026-08-21 07:35:13 +00:00
LICENSE Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
models.json Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
models.lock.json Build the hoe's blade as a dished sheet instead of a bent box 2026-08-23 04:57:59 +00:00
package.json Kit'i 26 modele çıkar, doğrulamayı ve inceleyiciyi genişlet 2026-08-21 02:44:58 +00:00
README.md Translate the whole repository to English 2026-08-21 07:35:13 +00:00
REFERENCE.md Translate the whole repository to English 2026-08-21 07:35:13 +00:00
tsconfig.json Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
viewer.html Translate the whole repository to English 2026-08-21 07:35:13 +00:00
vite.config.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00
vite.viewer.config.ts Translate the whole repository to English 2026-08-21 07:35:13 +00:00

medieval-kit

A lowpoly medieval model library for Vibe3D, plus the viewer used to build it.

Vibe3D is a source-first model registry for Three.js: you install the TypeScript that generates a model into your own project rather than depending on an opaque package. This repository holds one such registry.

  • my-registry/ — the @medieval-kit registry, published to npm as @medieval-kit/registry.
  • src/ — a demo app that installs from both @medieval-kit and the first-party @scifi-kit, so the two can be inspected side by side.

Run the viewer

Requires Bun and a browser with WebGPU (the @scifi-kit model in the demo uses TSL node materials; the medieval kit itself does not).

bun install
bun run registry:build
bun run dev

Open /viewer.html for the model inspector: registry-grouped catalogue, live triangle counts, configuration sliders wired to configure(), a wireframe overlay, and per-model GLB download.

Use the kit in your own project

bunx vibe3d init
bunx vibe3d add @medieval-kit/wooden-barrel

See my-registry/README.md for the model list, configuration fields, and runtime contract.

Export to GLB

bun run export:glb                       # every model into glb/
bun scripts/export-glb.ts --one wooden-chest

The viewer's download button and this command share one implementation (src/glb.ts), so they produce byte-identical files. Colour travels as COLOR_0 vertex data and baseColorFactor stays white — the files carry no textures at all.

Verify

bun run typecheck
bun run verify        # geometry, protocol, metadata, actions
bun run verify:glb    # export every model, read it back, compare
bun run render        # renders/_sheet.png — actually look at the models

verify runs ~500 browser-free checks against the installed sources: geometry validity, winding, coplanar-face (z-fighting) detection, bounding-box limits, stable root and anchor identity across configure(), deterministic seeding, material ownership, idempotent disposal, action semantics, and agreement between each model and its published metadata.

Four of those deserve a note, because each was written after a real bug:

  • Winding is checked three ways, because no single measure is sufficient. Bodies of revolution use radial alignment — every radial face on the outer shell must point away from the axis, measured in height bands. Closed solids use signed volume: Σ a·(b×c)/6 is positive only when the winding faces outward. And edge balance catches a single flipped face, which signed volume misses — flipping one face took the volume from 0.058 to 0.039, still positive.
  • Z-fighting is checked by looking for triangles that share a plane, share a normal direction, and overlap in area. Edge contact between neighbouring boards is fine and is not flagged; genuine coplanar overlap is.
  • Metadata agreement verifies that every declared control key is a real config field, that declared part names match the model's actual parts, and — most importantly — that no mesh uses an undeclared material slot. A missing declaration is a material the consumer cannot reach through materials.override(). This check found real drift in four models the day it was added: a steel slot had been used but never declared.
  • Frame-rate independence for animated models: the same elapsed time is stepped at two different frame rates and the results must agree. A naive lerp fails this.

Every check was mutation-tested: sabotage the code, confirm the check fails, restore, confirm it passes. A passing test is not evidence that it works.

render closed the one gap all of the above left open. Every check was geometric — triangle counts, winding, coplanarity, bounds. All of them caught real bugs, and none of them could say "this shovel does not look like a shovel." The renderer is a small software rasteriser: no browser, no GPU. The shovel was rewritten a fourth time, the hoe a third and the hay bale a second because of what those PNGs showed.

Layout

my-registry/
  models/core/          shared palette, RNG, geometry vocabulary, part slots
  models/<model-id>/    one procedural model per folder
  meta.ts               single source for catalogue metadata
  build.ts              compiles models/ into dist/registry.json
  drafts/               kept in the tree, kept out of the build
src/
  lib/vibe3d/           Vibe3D contracts installed by `vibe3d init`
  models/               installed model source (owned, editable)
  viewer.ts             the model inspector
  glb.ts                GLB export, shared by the viewer and the CLI
  catalog.ts            viewer catalogue, derived from meta.ts
scripts/
  verify-model.ts       browser-free conformance checks
  verify-glb.ts         export/re-import round trip
  zfight.ts             coplanar overlap detection
  render.ts             offline software rasteriser → PNG contact sheet
  export-glb.ts         batch GLB export
models.json             which registries this project resolves
models.lock.json        install receipt; `vibe3d diff` compares against it

src/models/ is generated by vibe3d add but committed on purpose: it is the demo's own source, and keeping it in the tree is what makes vibe3d diff meaningful.

Released under the MIT License.