37 lowpoly medieval models for Vibe3D · a market, a forge, a windmill https://medieval.crt.fyi/
Find a file
CRT b3b4188216 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-20 23:15:58 +00:00
my-registry Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
scripts Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
src Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
.gitattributes Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
.gitignore Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
bun.lock Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
index.html Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +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 Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
package.json Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
README.md Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
REFERENCE.md Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
tsconfig.json Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
viewer.html Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
vite.config.ts Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +00:00
vite.viewer.config.ts Initial commit: @medieval-kit registry and viewer 2026-08-20 23:15:58 +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(), and a wireframe overlay.

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.

Verify

bun run typecheck
bun run verify

verify runs 64 checks against the installed sources without a browser: geometry validity, winding, coplanar-face (z-fighting) detection, stable root and anchor identity across configure(), deterministic seeding, material ownership, and idempotent disposal.

Two of those deserve a note, because both were written after a real bug:

  • Winding is checked two ways, because two kinds of geometry need two measures. Bodies of revolution use radial alignment — every radial face on the outer shell must point away from the axis. Closed solids use signed volume: Σ a·(b×c)/6 is positive only when the winding faces outward.
  • 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.

Layout

my-registry/
  models/core/          shared palette, RNG, geometry vocabulary, part slots
  models/<model-id>/    one procedural model per folder
  build.ts              compiles models/ into dist/registry.json
src/
  viewer.ts             the model inspector
  lib/vibe3d/           Vibe3D contracts installed by `vibe3d init`
  models/               installed model source (owned, editable)
scripts/
  verify-model.ts       browser-free conformance checks
  zfight.ts             coplanar overlap detection
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.