diff --git a/models.lock.json b/models.lock.json index 409df10..c39f39d 100644 --- a/models.lock.json +++ b/models.lock.json @@ -67,7 +67,7 @@ "address": "@medieval-kit/wooden-barrel", "source": "file:my-registry/dist/registry.json", "version": "workspace", - "installedAt": "2026-08-22T06:39:18.810Z", + "installedAt": "2026-08-22T07:01:18.787Z", "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-22T06:39:18.791Z", + "installedAt": "2026-08-22T07:01:18.769Z", "files": [ { "path": "src\\models\\medieval-kit\\core\\geometry.ts", @@ -94,7 +94,7 @@ }, { "path": "src\\models\\medieval-kit\\core\\materials.ts", - "sourceHash": "4d99833f7a5912c7273bdf1da7a1ca2783e46beb0b27c0904af3d5d967ed3943" + "sourceHash": "3bb775f0c90186daeb1afc8aa1a662b5b1b693dc3764cf3de235e978ff3e72b7" }, { "path": "src\\models\\medieval-kit\\core\\random.ts", @@ -129,7 +129,7 @@ "address": "@medieval-kit/wooden-crate", "source": "file:my-registry/dist/registry.json", "version": "workspace", - "installedAt": "2026-08-22T06:39:18.814Z", + "installedAt": "2026-08-22T07:01:18.791Z", "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-22T06:39:18.820Z", + "installedAt": "2026-08-22T07:01:18.797Z", "files": [], "dependencies": [] }, @@ -152,7 +152,7 @@ "address": "@medieval-kit/iron-anvil", "source": "file:my-registry/dist/registry.json", "version": "workspace", - "installedAt": "2026-08-22T06:39:18.798Z", + "installedAt": "2026-08-22T07:01:18.776Z", "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-22T06:39:18.812Z", + "installedAt": "2026-08-22T07:01:18.789Z", "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-22T06:39:18.815Z", + "installedAt": "2026-08-22T07:01:18.792Z", "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-22T06:39:18.816Z", + "installedAt": "2026-08-22T07:01:18.793Z", "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-22T06:39:18.817Z", + "installedAt": "2026-08-22T07:01:18.794Z", "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-22T06:39:18.818Z", + "installedAt": "2026-08-22T07:01:18.795Z", "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-22T06:39:18.819Z", + "installedAt": "2026-08-22T07:01:18.796Z", "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-22T06:39:18.820Z", + "installedAt": "2026-08-22T07:01:18.797Z", "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-22T06:39:18.793Z", + "installedAt": "2026-08-22T07:01:18.772Z", "files": [ { "path": "src\\models\\medieval-kit\\cart-wheel\\model.ts", @@ -287,7 +287,7 @@ "address": "@medieval-kit/log-pile", "source": "file:my-registry/dist/registry.json", "version": "workspace", - "installedAt": "2026-08-22T06:39:18.802Z", + "installedAt": "2026-08-22T07:01:18.779Z", "files": [ { "path": "src\\models\\medieval-kit\\log-pile\\model.ts", @@ -302,7 +302,7 @@ "address": "@medieval-kit/trestle-table", "source": "file:my-registry/dist/registry.json", "version": "workspace", - "installedAt": "2026-08-22T06:39:18.807Z", + "installedAt": "2026-08-22T07:01:18.784Z", "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-22T06:39:18.813Z", + "installedAt": "2026-08-22T07:01:18.790Z", "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-22T06:39:18.797Z", + "installedAt": "2026-08-22T07:01:18.775Z", "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-22T06:39:18.805Z", + "installedAt": "2026-08-22T07:01:18.782Z", "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-22T06:39:18.811Z", + "installedAt": "2026-08-22T07:01:18.788Z", "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-22T06:39:18.801Z", + "installedAt": "2026-08-22T07:01:18.779Z", "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-22T06:39:18.804Z", + "installedAt": "2026-08-22T07:01:18.781Z", "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-22T06:39:18.805Z", + "installedAt": "2026-08-22T07:01:18.783Z", "files": [ { "path": "src\\models\\medieval-kit\\straw-broom\\model.ts", @@ -422,11 +422,11 @@ "address": "@medieval-kit/bronze-bell", "source": "file:my-registry/dist/registry.json", "version": "workspace", - "installedAt": "2026-08-22T06:39:18.792Z", + "installedAt": "2026-08-22T07:01:18.771Z", "files": [ { "path": "src\\models\\medieval-kit\\bronze-bell\\model.ts", - "sourceHash": "7136a7681afb7beec8ce8c738238d5eb0c609a9726e1f7c4f3cd21fa8af15b3b" + "sourceHash": "6ea3b9369617738a64b4da3c5176b8ffee0bab1f21477094c57e5e56f2f4b8ae" } ], "dependencies": [ @@ -437,7 +437,7 @@ "address": "@medieval-kit/iron-lantern", "source": "file:my-registry/dist/registry.json", "version": "workspace", - "installedAt": "2026-08-22T06:39:18.799Z", + "installedAt": "2026-08-22T07:01:18.777Z", "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-22T06:39:18.806Z", + "installedAt": "2026-08-22T07:01:18.784Z", "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-22T06:39:18.794Z", + "installedAt": "2026-08-22T07:01:18.773Z", "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-22T06:39:18.796Z", + "installedAt": "2026-08-22T07:01:18.774Z", "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-22T06:39:18.800Z", + "installedAt": "2026-08-22T07:01:18.778Z", "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-22T06:39:18.809Z", + "installedAt": "2026-08-22T07:01:18.785Z", "files": [ { "path": "src\\models\\medieval-kit\\wicker-basket\\model.ts", diff --git a/my-registry/models/bronze-bell/model.ts b/my-registry/models/bronze-bell/model.ts index f9f6473..05bc684 100644 --- a/my-registry/models/bronze-bell/model.ts +++ b/my-registry/models/bronze-bell/model.ts @@ -109,8 +109,8 @@ export function createModel(overrides: Partial = {}) { ] // The bell is a SHELL: an outside, an inside, and a lip joining the two // at the mouth. Closed on top (the crown is solid), open at the mouth. - const skirt = latheGeometry(bellProfile, 12, [0, 0, 0], tint('brass', -0.06, 0.7), { - colourTop: tint('brass', 0.05, 0.7), + const skirt = latheGeometry(bellProfile, 12, [0, 0, 0], tint('bronze', -0.06, 0.7), { + colourTop: tint('bronze', 0.05, 0.7), capBottom: false, // mouth OPEN: the inside of the bell must show capTop: true, }) @@ -123,7 +123,7 @@ export function createModel(overrides: Partial = {}) { radius: level.radius * 0.88, })) const inner = flipGeometry(latheGeometry( - innerProfile, 12, [0, 0, 0], tint('brass', -0.24, 0.5), + innerProfile, 12, [0, 0, 0], tint('bronze', -0.24, 0.5), { capBottom: false, capTop: false }, )) // Mouth lip: the hoop joining the inner and outer shell. Without it a gap @@ -131,7 +131,7 @@ export function createModel(overrides: Partial = {}) { const lipY = -half + config.height * 0.02 const lip = bandGeometry( radius * 0.995, lipY, config.height * 0.035, - radius * 0.115, 12, tint('brass', -0.12, 0.6), + radius * 0.115, 12, tint('bronze', -0.12, 0.6), ) // Crown: the ears that fasten the bell to the yoke. @@ -144,7 +144,7 @@ export function createModel(overrides: Partial = {}) { config.height * 0.16, radius * 0.03, [0, 0, 0], - tint('brass', 0.08, 0.6), + tint('bronze', 0.08, 0.6), ) ear.translate(Math.sin(a) * radius * 0.17, half + config.height * 0.05, Math.cos(a) * radius * 0.17) crown.push(ear) @@ -172,14 +172,21 @@ export function createModel(overrides: Partial = {}) { // of its own, so it just stands in model space. const beamLength = config.diameter * config.yoke const beamY = pivotY + radius * 0.2 + // Where the uprights stand. Computed here, before the beam, because the + // beam has to REACH them: decoupling the two (so the frame could not + // close onto the bell at a short yoke) left the rail shorter than the + // gap it spans at the bottom of the slider, and the two A-frames came + // apart into separate objects with nothing joining them. + const standX = Math.max(beamLength * 0.4, radius * 1.3) + const beamSpan = Math.max(beamLength, standX * 2.2) // The rail is ALREADY built horizontal: the first two arguments of // `chamferedBoxGeometry` are the X–Z footprint, the third the Y height. // I had put a `rotateZ` here and it stood the rail upright, sticking out // of the top of the bell like a post — the price of misremembering which // axis the helper counts as "height". const beam = chamferedBoxGeometry( - [beamLength, radius * 0.24], - [beamLength * 0.98, radius * 0.21], + [beamSpan, radius * 0.24], + [beamSpan * 0.98, radius * 0.21], radius * 0.3, radius * 0.04, [0, beamY, 0], @@ -196,10 +203,28 @@ export function createModel(overrides: Partial = {}) { // // Consumers who want the bare bell for their own tower hide // `parts.frame` — that is what semantic parts are for. - const standFoot = -half - config.height * 0.16 + // The frame stands CLEAR of the bell, in both axes. + // + // The uprights were at beamLength * 0.34, which at the default yoke is + // 0.165 against a bell radius of 0.18: half-width included, they spanned + // 0.147 to 0.183 and ran straight through the bell's mouth. Nothing in + // the check suite objects -- the support test sees one connected mass, + // which is exactly what a post driven through a bell looks like -- but a + // bell cannot swing through its own frame. The width is now the larger of + // the yoke's reach and the bell's radius plus a margin, so shortening the + // yoke slider cannot close the frame onto the bell. + // + // And the foot sat at height * 0.16 below the mouth, leaving 24 mm + // between the sill and the lip. A bell hangs clear of its sill; at that + // gap it read as resting on it. + const standFoot = -half - config.height * 0.36 const legY = (beamY + standFoot) / 2 const legHeight = beamY - standFoot const framePieces: BufferGeometry[] = [] + const braceRise = legHeight * 0.44 + const braceRun = radius * 0.62 + const braceLength = Math.hypot(braceRun, braceRise) + for (const side of [-1, 1]) { // The upright reaches PAST the rail it carries, so the joint is a real // overlap rather than two faces meeting. @@ -211,7 +236,7 @@ export function createModel(overrides: Partial = {}) { // flickered against each other. legHeight + radius * 0.22, radius * 0.03, - [side * beamLength * 0.34, legY + radius * 0.19, 0], + [side * standX, legY + radius * 0.19, 0], tint('oak', -0.04), tint('oak', 0.03), )) @@ -223,30 +248,39 @@ export function createModel(overrides: Partial = {}) { [radius * 0.22, radius * 1.34], radius * 0.22, radius * 0.03, - [side * beamLength * 0.34, standFoot + radius * 0.11, 0], + [side * standX, standFoot + radius * 0.11, 0], tint('oak', -0.1), )) - // Brace from sill to upright: the diagonal that stops the frame - // folding over, and the only non-vertical line in the silhouette. - const braceLength = Math.hypot(beamLength * 0.2, legHeight * 0.42) - const brace = chamferedBoxGeometry( - [radius * 0.13, radius * 0.2], - [radius * 0.1, radius * 0.16], - braceLength, - radius * 0.025, - [0, 0, 0], - tint('oak', -0.07), - ) - brace.rotateZ(-side * Math.atan2(beamLength * 0.2, legHeight * 0.42)) - // Outboard of the uprights, not in front of them. Sitting at +Z put - // the diagonal straight across the bell's silhouette, which is the one - // thing in the model that has to read cleanly. - brace.translate( - side * (beamLength * 0.34 + beamLength * 0.09), - standFoot + legHeight * 0.21 + radius * 0.1, - 0, - ) - framePieces.push(brace) + + // Braces: a pair per upright, in the plane of that upright's own + // A-frame, running fore and aft to the ends of its sill. + // + // They used to be single diagonals tilted about Z -- across the model, + // in the same plane as the bell -- which meant they had to be shoved + // either in front of the bell (a diagonal drawn straight over the one + // silhouette that has to read cleanly) or outboard of the uprights, + // where they connect to nothing and stick out like broken sticks. + // Neither is what a bell frame does. Real frames are two A-frames, one + // at each end of the beam, braced fore-and-aft in their own planes, + // with the bell swinging in the gap between them. Tilting about X + // instead of Z puts them there, and the bell is never in the way. + for (const dir of [-1, 1]) { + const brace = chamferedBoxGeometry( + [radius * 0.13, radius * 0.2], + [radius * 0.1, radius * 0.16], + braceLength, + radius * 0.025, + [0, 0, 0], + tint('oak', -0.07), + ) + brace.rotateX(-dir * Math.atan2(braceRun, braceRise)) + brace.translate( + side * standX, + standFoot + radius * 0.11 + braceRise / 2, + dir * braceRun / 2, + ) + framePieces.push(brace) + } } // Bearings: the two iron ears carrying the rail. They carry it from ABOVE diff --git a/my-registry/models/core/materials.ts b/my-registry/models/core/materials.ts index 99cbafa..e463473 100644 --- a/my-registry/models/core/materials.ts +++ b/my-registry/models/core/materials.ts @@ -56,6 +56,22 @@ export interface MedievalPalette { readonly steel: Color /** Bronze — bells, mortars, coins. */ readonly brass: Color + /** + * Bell bronze that has stood outside. + * + * Separate from `brass` because they are not the same colour and the models + * that use each are not the same models. Fresh bronze on a coin or a book's + * corner boss is the yellow `brass` is; a bell that has hung in weather for a + * century is dark and grey. Measured against a reference photograph the bell + * sits at hue 33, saturation 0.34, value 0.33, against 39 / 0.56 / 0.56 for + * the brass we were painting it with. + * + * This is a PALETTE entry, not a slot: the mesh still resolves through the + * `brass` material. The palette carries colour, the slot carries material, + * and keeping them separate is what lets one model recolour without dragging + * the coin pouch and the book's fittings along with it. + */ + readonly bronze: Color /** Dry straw. */ readonly straw: Color /** Straw tips bleached by the sun. */ @@ -114,6 +130,7 @@ export const MEDIEVAL_PALETTE: MedievalPalette = { iron: new Color(0x40464d), steel: new Color(0x8d979f), brass: new Color(0xa9843f), + bronze: new Color(0x63523e), straw: new Color(0xc2a049), strawPale: new Color(0xdcc182), cloth: new Color(0xb9a888), diff --git a/src/models/medieval-kit/bronze-bell/model.ts b/src/models/medieval-kit/bronze-bell/model.ts index f9f6473..05bc684 100644 --- a/src/models/medieval-kit/bronze-bell/model.ts +++ b/src/models/medieval-kit/bronze-bell/model.ts @@ -109,8 +109,8 @@ export function createModel(overrides: Partial = {}) { ] // The bell is a SHELL: an outside, an inside, and a lip joining the two // at the mouth. Closed on top (the crown is solid), open at the mouth. - const skirt = latheGeometry(bellProfile, 12, [0, 0, 0], tint('brass', -0.06, 0.7), { - colourTop: tint('brass', 0.05, 0.7), + const skirt = latheGeometry(bellProfile, 12, [0, 0, 0], tint('bronze', -0.06, 0.7), { + colourTop: tint('bronze', 0.05, 0.7), capBottom: false, // mouth OPEN: the inside of the bell must show capTop: true, }) @@ -123,7 +123,7 @@ export function createModel(overrides: Partial = {}) { radius: level.radius * 0.88, })) const inner = flipGeometry(latheGeometry( - innerProfile, 12, [0, 0, 0], tint('brass', -0.24, 0.5), + innerProfile, 12, [0, 0, 0], tint('bronze', -0.24, 0.5), { capBottom: false, capTop: false }, )) // Mouth lip: the hoop joining the inner and outer shell. Without it a gap @@ -131,7 +131,7 @@ export function createModel(overrides: Partial = {}) { const lipY = -half + config.height * 0.02 const lip = bandGeometry( radius * 0.995, lipY, config.height * 0.035, - radius * 0.115, 12, tint('brass', -0.12, 0.6), + radius * 0.115, 12, tint('bronze', -0.12, 0.6), ) // Crown: the ears that fasten the bell to the yoke. @@ -144,7 +144,7 @@ export function createModel(overrides: Partial = {}) { config.height * 0.16, radius * 0.03, [0, 0, 0], - tint('brass', 0.08, 0.6), + tint('bronze', 0.08, 0.6), ) ear.translate(Math.sin(a) * radius * 0.17, half + config.height * 0.05, Math.cos(a) * radius * 0.17) crown.push(ear) @@ -172,14 +172,21 @@ export function createModel(overrides: Partial = {}) { // of its own, so it just stands in model space. const beamLength = config.diameter * config.yoke const beamY = pivotY + radius * 0.2 + // Where the uprights stand. Computed here, before the beam, because the + // beam has to REACH them: decoupling the two (so the frame could not + // close onto the bell at a short yoke) left the rail shorter than the + // gap it spans at the bottom of the slider, and the two A-frames came + // apart into separate objects with nothing joining them. + const standX = Math.max(beamLength * 0.4, radius * 1.3) + const beamSpan = Math.max(beamLength, standX * 2.2) // The rail is ALREADY built horizontal: the first two arguments of // `chamferedBoxGeometry` are the X–Z footprint, the third the Y height. // I had put a `rotateZ` here and it stood the rail upright, sticking out // of the top of the bell like a post — the price of misremembering which // axis the helper counts as "height". const beam = chamferedBoxGeometry( - [beamLength, radius * 0.24], - [beamLength * 0.98, radius * 0.21], + [beamSpan, radius * 0.24], + [beamSpan * 0.98, radius * 0.21], radius * 0.3, radius * 0.04, [0, beamY, 0], @@ -196,10 +203,28 @@ export function createModel(overrides: Partial = {}) { // // Consumers who want the bare bell for their own tower hide // `parts.frame` — that is what semantic parts are for. - const standFoot = -half - config.height * 0.16 + // The frame stands CLEAR of the bell, in both axes. + // + // The uprights were at beamLength * 0.34, which at the default yoke is + // 0.165 against a bell radius of 0.18: half-width included, they spanned + // 0.147 to 0.183 and ran straight through the bell's mouth. Nothing in + // the check suite objects -- the support test sees one connected mass, + // which is exactly what a post driven through a bell looks like -- but a + // bell cannot swing through its own frame. The width is now the larger of + // the yoke's reach and the bell's radius plus a margin, so shortening the + // yoke slider cannot close the frame onto the bell. + // + // And the foot sat at height * 0.16 below the mouth, leaving 24 mm + // between the sill and the lip. A bell hangs clear of its sill; at that + // gap it read as resting on it. + const standFoot = -half - config.height * 0.36 const legY = (beamY + standFoot) / 2 const legHeight = beamY - standFoot const framePieces: BufferGeometry[] = [] + const braceRise = legHeight * 0.44 + const braceRun = radius * 0.62 + const braceLength = Math.hypot(braceRun, braceRise) + for (const side of [-1, 1]) { // The upright reaches PAST the rail it carries, so the joint is a real // overlap rather than two faces meeting. @@ -211,7 +236,7 @@ export function createModel(overrides: Partial = {}) { // flickered against each other. legHeight + radius * 0.22, radius * 0.03, - [side * beamLength * 0.34, legY + radius * 0.19, 0], + [side * standX, legY + radius * 0.19, 0], tint('oak', -0.04), tint('oak', 0.03), )) @@ -223,30 +248,39 @@ export function createModel(overrides: Partial = {}) { [radius * 0.22, radius * 1.34], radius * 0.22, radius * 0.03, - [side * beamLength * 0.34, standFoot + radius * 0.11, 0], + [side * standX, standFoot + radius * 0.11, 0], tint('oak', -0.1), )) - // Brace from sill to upright: the diagonal that stops the frame - // folding over, and the only non-vertical line in the silhouette. - const braceLength = Math.hypot(beamLength * 0.2, legHeight * 0.42) - const brace = chamferedBoxGeometry( - [radius * 0.13, radius * 0.2], - [radius * 0.1, radius * 0.16], - braceLength, - radius * 0.025, - [0, 0, 0], - tint('oak', -0.07), - ) - brace.rotateZ(-side * Math.atan2(beamLength * 0.2, legHeight * 0.42)) - // Outboard of the uprights, not in front of them. Sitting at +Z put - // the diagonal straight across the bell's silhouette, which is the one - // thing in the model that has to read cleanly. - brace.translate( - side * (beamLength * 0.34 + beamLength * 0.09), - standFoot + legHeight * 0.21 + radius * 0.1, - 0, - ) - framePieces.push(brace) + + // Braces: a pair per upright, in the plane of that upright's own + // A-frame, running fore and aft to the ends of its sill. + // + // They used to be single diagonals tilted about Z -- across the model, + // in the same plane as the bell -- which meant they had to be shoved + // either in front of the bell (a diagonal drawn straight over the one + // silhouette that has to read cleanly) or outboard of the uprights, + // where they connect to nothing and stick out like broken sticks. + // Neither is what a bell frame does. Real frames are two A-frames, one + // at each end of the beam, braced fore-and-aft in their own planes, + // with the bell swinging in the gap between them. Tilting about X + // instead of Z puts them there, and the bell is never in the way. + for (const dir of [-1, 1]) { + const brace = chamferedBoxGeometry( + [radius * 0.13, radius * 0.2], + [radius * 0.1, radius * 0.16], + braceLength, + radius * 0.025, + [0, 0, 0], + tint('oak', -0.07), + ) + brace.rotateX(-dir * Math.atan2(braceRun, braceRise)) + brace.translate( + side * standX, + standFoot + radius * 0.11 + braceRise / 2, + dir * braceRun / 2, + ) + framePieces.push(brace) + } } // Bearings: the two iron ears carrying the rail. They carry it from ABOVE diff --git a/src/models/medieval-kit/core/materials.ts b/src/models/medieval-kit/core/materials.ts index f9a87d2..a944c1f 100644 --- a/src/models/medieval-kit/core/materials.ts +++ b/src/models/medieval-kit/core/materials.ts @@ -56,6 +56,22 @@ export interface MedievalPalette { readonly steel: Color /** Bronze — bells, mortars, coins. */ readonly brass: Color + /** + * Bell bronze that has stood outside. + * + * Separate from `brass` because they are not the same colour and the models + * that use each are not the same models. Fresh bronze on a coin or a book's + * corner boss is the yellow `brass` is; a bell that has hung in weather for a + * century is dark and grey. Measured against a reference photograph the bell + * sits at hue 33, saturation 0.34, value 0.33, against 39 / 0.56 / 0.56 for + * the brass we were painting it with. + * + * This is a PALETTE entry, not a slot: the mesh still resolves through the + * `brass` material. The palette carries colour, the slot carries material, + * and keeping them separate is what lets one model recolour without dragging + * the coin pouch and the book's fittings along with it. + */ + readonly bronze: Color /** Dry straw. */ readonly straw: Color /** Straw tips bleached by the sun. */ @@ -114,6 +130,7 @@ export const MEDIEVAL_PALETTE: MedievalPalette = { iron: new Color(0x40464d), steel: new Color(0x8d979f), brass: new Color(0xa9843f), + bronze: new Color(0x63523e), straw: new Color(0xc2a049), strawPale: new Color(0xdcc182), cloth: new Color(0xb9a888),