diff --git a/models.lock.json b/models.lock.json index 8c725d6..aa2e4be 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-23T06:21:57.397Z", + "installedAt": "2026-08-23T06:25:52.683Z", "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-23T06:21:57.373Z", + "installedAt": "2026-08-23T06:25:52.661Z", "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-23T06:21:57.403Z", + "installedAt": "2026-08-23T06:25:52.688Z", "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-23T06:21:57.410Z", + "installedAt": "2026-08-23T06:25:52.695Z", "files": [], "dependencies": [] }, @@ -152,7 +152,7 @@ "address": "@medieval-kit/iron-anvil", "source": "file:my-registry/dist/registry.json", "version": "workspace", - "installedAt": "2026-08-23T06:21:57.382Z", + "installedAt": "2026-08-23T06:25:52.669Z", "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-23T06:21:57.400Z", + "installedAt": "2026-08-23T06:25:52.686Z", "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-23T06:21:57.404Z", + "installedAt": "2026-08-23T06:25:52.689Z", "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-23T06:21:57.405Z", + "installedAt": "2026-08-23T06:25:52.690Z", "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-23T06:21:57.406Z", + "installedAt": "2026-08-23T06:25:52.691Z", "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-23T06:21:57.408Z", + "installedAt": "2026-08-23T06:25:52.692Z", "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-23T06:21:57.409Z", + "installedAt": "2026-08-23T06:25:52.693Z", "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-23T06:21:57.410Z", + "installedAt": "2026-08-23T06:25:52.695Z", "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-23T06:21:57.377Z", + "installedAt": "2026-08-23T06:25:52.664Z", "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-23T06:21:57.387Z", + "installedAt": "2026-08-23T06:25:52.674Z", "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-23T06:21:57.394Z", + "installedAt": "2026-08-23T06:25:52.681Z", "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-23T06:21:57.401Z", + "installedAt": "2026-08-23T06:25:52.687Z", "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-23T06:21:57.381Z", + "installedAt": "2026-08-23T06:25:52.668Z", "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-23T06:21:57.389Z", + "installedAt": "2026-08-23T06:25:52.676Z", "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-23T06:21:57.398Z", + "installedAt": "2026-08-23T06:25:52.685Z", "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-23T06:21:57.386Z", + "installedAt": "2026-08-23T06:25:52.672Z", "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-23T06:21:57.388Z", + "installedAt": "2026-08-23T06:25:52.675Z", "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-23T06:21:57.392Z", + "installedAt": "2026-08-23T06:25:52.678Z", "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-23T06:21:57.375Z", + "installedAt": "2026-08-23T06:25:52.663Z", "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-23T06:21:57.383Z", + "installedAt": "2026-08-23T06:25:52.670Z", "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-23T06:21:57.393Z", + "installedAt": "2026-08-23T06:25:52.680Z", "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-23T06:21:57.378Z", + "installedAt": "2026-08-23T06:25:52.665Z", "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-23T06:21:57.379Z", + "installedAt": "2026-08-23T06:25:52.666Z", "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-23T06:21:57.384Z", + "installedAt": "2026-08-23T06:25:52.671Z", "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-23T06:21:57.396Z", + "installedAt": "2026-08-23T06:25:52.682Z", "files": [ { "path": "src\\models\\medieval-kit\\wicker-basket\\model.ts", @@ -527,11 +527,11 @@ "address": "@medieval-kit/post-mill", "source": "file:my-registry/dist/registry.json", "version": "workspace", - "installedAt": "2026-08-23T06:21:57.391Z", + "installedAt": "2026-08-23T06:25:52.677Z", "files": [ { "path": "src\\models\\medieval-kit\\post-mill\\model.ts", - "sourceHash": "924d4cbbc2b86aea9ecbd3afaabbb2e0545b3247922e61af1959517458b1a8c2" + "sourceHash": "b6cc30f2332c600739147783cdbd7d0c1a59379bd02fac1cec61e08278da1ed9" } ], "dependencies": [ diff --git a/my-registry/models/post-mill/model.ts b/my-registry/models/post-mill/model.ts index 3c57105..5ce8efc 100644 --- a/my-registry/models/post-mill/model.ts +++ b/my-registry/models/post-mill/model.ts @@ -234,6 +234,42 @@ export function createModel(overrides: Partial = {}) { tint('oak', -0.16), )) + // The door, in the tail wall above the gallery. + // + // The ladder has to arrive somewhere. A mill is entered from its tail, + // through the one wall the sails never sweep past, and the miller comes + // up the same ladder he turns the mill with -- so a flight of steps + // ending at blank boarding is the one thing about this model that could + // not be true. + // + // Boarded proud of the wall rather than cut into it: there are no + // booleans here, and a door of applied planks with a frame round it is + // how a plank building is actually closed. + const doorWidth = bodyWidth * 0.42 + const doorHeight = bodyHeight * 0.66 + const doorY = bodyBottom + H * 0.035 + doorHeight / 2 + const doorZ = -bodyDepth / 2 + shell.push(chamferedBoxGeometry( + [doorWidth, H * 0.018], + [doorWidth * 0.99, H * 0.016], + doorHeight, + H * 0.004, + [0, doorY, doorZ - H * 0.004], + tint('oak', -0.14), + )) + // Two iron-dark ledges across it, and the frame: what stops a plank door + // being a rectangle drawn on a wall. + for (const at of [-0.28, 0.3]) { + shell.push(chamferedBoxGeometry( + [doorWidth * 1.04, H * 0.012], + [doorWidth * 1.02, H * 0.01], + H * 0.022, + H * 0.003, + [0, doorY + doorHeight * at, doorZ - H * 0.012], + tint('oak', -0.22), + )) + } + // The tail gallery: the little platform the ladder arrives at. shell.push(chamferedBoxGeometry( [bodyWidth * 0.92, H * 0.05], @@ -247,8 +283,22 @@ export function createModel(overrides: Partial = {}) { // --- Sails --------------------------------------------------------------- // The windshaft leaves the front gable pointing +Z and tilted up a little, // which is what stops the sails striking the body as they come round. - const shaftTilt = 0.14 - const hubZ = bodyDepth * 0.54 + // The sail disc has to clear the front of the buck. + // + // A tilted shaft spreads its sails through Z: at 0.14 rad a 3.5 m sail + // swings +-0.49 m fore and aft, and with the hub only 0.08 m in front of + // the gable the whole lower half of the disc passed through the building. + // Two changes, and both are what a real mill does. The shaft tilts only a + // few degrees -- just enough to keep the sails off the body and to take + // some of their weight onto the thrust bearing -- and it projects a good + // way out, so the sweep happens clear of the wall. + const shaftTilt = 0.075 + // Far enough forward and no further. The clearance the disc needs is + // sailLength * sin(tilt), about 0.26 m here; pushing the hub out to 0.86 + // of the body's depth left the sails hanging most of a metre off the + // gable with nothing but the shaft between them, where the reference has + // them sweeping close past the boarding. + const hubZ = bodyDepth * 0.72 const hubY = bodyBottom + bodyHeight * 0.72 const sailLength = config.sailSpan / 2 const hubRadius = H * 0.035 @@ -266,22 +316,24 @@ export function createModel(overrides: Partial = {}) { // the body it went unseen through every render; it only surfaced when the // iron bands were added and turned out to be coaxial with it, which the // z-fight check reported at once. + // Long enough to reach back into the gable it comes out of. + const shaftLength = H * 0.20 const shaft = taperedBoxGeometry( [hubRadius * 2.1, hubRadius * 2.1], [hubRadius * 1.5, hubRadius * 1.5], - H * 0.10, + shaftLength, [0, 0, 0], tint('oak', -0.04), ) shaft.rotateX(Math.PI / 2) - shaft.translate(0, 0, H * 0.03) + shaft.translate(0, 0, -shaftLength * 0.32) rig.push(shaft) // The bands themselves, and they are not decoration. Four sails pull on // one shaft from four directions; what holds the whips to it is iron // strapping, and this model declared an `iron` slot while using it // nowhere -- the shaft was described in the comment above as iron-banded // and then painted oak like everything else. - for (const at of [0.012, 0.055]) { + for (const at of [-0.02, 0.03]) { const band = taperedBoxGeometry( [hubRadius * 2.4, hubRadius * 2.4], [hubRadius * 2.3, hubRadius * 2.3], diff --git a/src/models/medieval-kit/post-mill/model.ts b/src/models/medieval-kit/post-mill/model.ts index 3c57105..5ce8efc 100644 --- a/src/models/medieval-kit/post-mill/model.ts +++ b/src/models/medieval-kit/post-mill/model.ts @@ -234,6 +234,42 @@ export function createModel(overrides: Partial = {}) { tint('oak', -0.16), )) + // The door, in the tail wall above the gallery. + // + // The ladder has to arrive somewhere. A mill is entered from its tail, + // through the one wall the sails never sweep past, and the miller comes + // up the same ladder he turns the mill with -- so a flight of steps + // ending at blank boarding is the one thing about this model that could + // not be true. + // + // Boarded proud of the wall rather than cut into it: there are no + // booleans here, and a door of applied planks with a frame round it is + // how a plank building is actually closed. + const doorWidth = bodyWidth * 0.42 + const doorHeight = bodyHeight * 0.66 + const doorY = bodyBottom + H * 0.035 + doorHeight / 2 + const doorZ = -bodyDepth / 2 + shell.push(chamferedBoxGeometry( + [doorWidth, H * 0.018], + [doorWidth * 0.99, H * 0.016], + doorHeight, + H * 0.004, + [0, doorY, doorZ - H * 0.004], + tint('oak', -0.14), + )) + // Two iron-dark ledges across it, and the frame: what stops a plank door + // being a rectangle drawn on a wall. + for (const at of [-0.28, 0.3]) { + shell.push(chamferedBoxGeometry( + [doorWidth * 1.04, H * 0.012], + [doorWidth * 1.02, H * 0.01], + H * 0.022, + H * 0.003, + [0, doorY + doorHeight * at, doorZ - H * 0.012], + tint('oak', -0.22), + )) + } + // The tail gallery: the little platform the ladder arrives at. shell.push(chamferedBoxGeometry( [bodyWidth * 0.92, H * 0.05], @@ -247,8 +283,22 @@ export function createModel(overrides: Partial = {}) { // --- Sails --------------------------------------------------------------- // The windshaft leaves the front gable pointing +Z and tilted up a little, // which is what stops the sails striking the body as they come round. - const shaftTilt = 0.14 - const hubZ = bodyDepth * 0.54 + // The sail disc has to clear the front of the buck. + // + // A tilted shaft spreads its sails through Z: at 0.14 rad a 3.5 m sail + // swings +-0.49 m fore and aft, and with the hub only 0.08 m in front of + // the gable the whole lower half of the disc passed through the building. + // Two changes, and both are what a real mill does. The shaft tilts only a + // few degrees -- just enough to keep the sails off the body and to take + // some of their weight onto the thrust bearing -- and it projects a good + // way out, so the sweep happens clear of the wall. + const shaftTilt = 0.075 + // Far enough forward and no further. The clearance the disc needs is + // sailLength * sin(tilt), about 0.26 m here; pushing the hub out to 0.86 + // of the body's depth left the sails hanging most of a metre off the + // gable with nothing but the shaft between them, where the reference has + // them sweeping close past the boarding. + const hubZ = bodyDepth * 0.72 const hubY = bodyBottom + bodyHeight * 0.72 const sailLength = config.sailSpan / 2 const hubRadius = H * 0.035 @@ -266,22 +316,24 @@ export function createModel(overrides: Partial = {}) { // the body it went unseen through every render; it only surfaced when the // iron bands were added and turned out to be coaxial with it, which the // z-fight check reported at once. + // Long enough to reach back into the gable it comes out of. + const shaftLength = H * 0.20 const shaft = taperedBoxGeometry( [hubRadius * 2.1, hubRadius * 2.1], [hubRadius * 1.5, hubRadius * 1.5], - H * 0.10, + shaftLength, [0, 0, 0], tint('oak', -0.04), ) shaft.rotateX(Math.PI / 2) - shaft.translate(0, 0, H * 0.03) + shaft.translate(0, 0, -shaftLength * 0.32) rig.push(shaft) // The bands themselves, and they are not decoration. Four sails pull on // one shaft from four directions; what holds the whips to it is iron // strapping, and this model declared an `iron` slot while using it // nowhere -- the shaft was described in the comment above as iron-banded // and then painted oak like everything else. - for (const at of [0.012, 0.055]) { + for (const at of [-0.02, 0.03]) { const band = taperedBoxGeometry( [hubRadius * 2.4, hubRadius * 2.4], [hubRadius * 2.3, hubRadius * 2.3],