Give the tankard a handle you could hold, and the lantern one at all
Both models had something in the place a handle belongs, and against a photograph neither was a handle. The tankard's was a flat box put through `bendGeometry` and then pushed clear of the body by a hand-derived offset. Measured, the result stood 7 mm proud of a body 47 mm in radius, with the rest buried in the stave wall -- no finger gap at all, which is why it read as a plank glued to the side. The offset formula did not describe what `bendGeometry` does to the geometry, and rather than deriving a better correction for a curve that cannot be inspected, the handle is now an actual arc from `arcBarGeometry`, specified by the two things that matter: where the ends land and how far the belly stands off. It now stands 24 mm clear. The proportions go with it -- the reference is a fist-sized vessel, ours was a beaker. The lantern's was a horizontal `bandGeometry` ring sitting on the flue: a suspension eye, not a bail. A lantern is defined by being carried, so the bail is the first thing the eye looks for. It is now a vertical arch whose sweep runs about 20 degrees past a half circle at each end, which turns the ends downwards and outwards so they cross the roof cone instead of sitting tangent to it -- a clean half circle was rejected by the support check as floating, correctly. Removing the ring stranded the tongue that used to join it to the flue, and leaving it in place produced the z-fight: its sides sat at z = +-0.00488 against the bail's +-0.00512, a quarter of a millimetre apart across the whole apex. A bail that reaches into the roof needs no strap to hold it on. Worth recording how that one was found. The first guess was that `arcBarGeometry` self-intersects once the sweep passes PI. Building the bail in isolation across six sweeps and segment counts gave 0 overlaps every time, which killed the theory before any time went into fixing the wrong thing. 27 models, 17433 triangles, all checks pass, 0 floating cases.
This commit is contained in:
parent
f64fdfd1eb
commit
01d00cdd26
5 changed files with 165 additions and 109 deletions
|
|
@ -67,7 +67,7 @@
|
||||||
"address": "@medieval-kit/wooden-barrel",
|
"address": "@medieval-kit/wooden-barrel",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.104Z",
|
"installedAt": "2026-08-22T04:53:30.952Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-barrel\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-barrel\\model.ts",
|
||||||
|
|
@ -82,7 +82,7 @@
|
||||||
"address": "@medieval-kit/core",
|
"address": "@medieval-kit/core",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.073Z",
|
"installedAt": "2026-08-22T04:53:30.926Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\core\\geometry.ts",
|
"path": "src\\models\\medieval-kit\\core\\geometry.ts",
|
||||||
|
|
@ -129,7 +129,7 @@
|
||||||
"address": "@medieval-kit/wooden-crate",
|
"address": "@medieval-kit/wooden-crate",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.111Z",
|
"installedAt": "2026-08-22T04:53:30.957Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-crate\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-crate\\model.ts",
|
||||||
|
|
@ -144,7 +144,7 @@
|
||||||
"address": "@medieval-kit/kit",
|
"address": "@medieval-kit/kit",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.121Z",
|
"installedAt": "2026-08-22T04:53:30.965Z",
|
||||||
"files": [],
|
"files": [],
|
||||||
"dependencies": []
|
"dependencies": []
|
||||||
},
|
},
|
||||||
|
|
@ -152,7 +152,7 @@
|
||||||
"address": "@medieval-kit/iron-anvil",
|
"address": "@medieval-kit/iron-anvil",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.085Z",
|
"installedAt": "2026-08-22T04:53:30.936Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\iron-anvil\\model.ts",
|
"path": "src\\models\\medieval-kit\\iron-anvil\\model.ts",
|
||||||
|
|
@ -167,7 +167,7 @@
|
||||||
"address": "@medieval-kit/wooden-bucket",
|
"address": "@medieval-kit/wooden-bucket",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.108Z",
|
"installedAt": "2026-08-22T04:53:30.955Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-bucket\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-bucket\\model.ts",
|
||||||
|
|
@ -182,7 +182,7 @@
|
||||||
"address": "@medieval-kit/wooden-fence",
|
"address": "@medieval-kit/wooden-fence",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.113Z",
|
"installedAt": "2026-08-22T04:53:30.959Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-fence\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-fence\\model.ts",
|
||||||
|
|
@ -197,7 +197,7 @@
|
||||||
"address": "@medieval-kit/wooden-hoe",
|
"address": "@medieval-kit/wooden-hoe",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.114Z",
|
"installedAt": "2026-08-22T04:53:30.960Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-hoe\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-hoe\\model.ts",
|
||||||
|
|
@ -212,7 +212,7 @@
|
||||||
"address": "@medieval-kit/wooden-ladder",
|
"address": "@medieval-kit/wooden-ladder",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.116Z",
|
"installedAt": "2026-08-22T04:53:30.961Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-ladder\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-ladder\\model.ts",
|
||||||
|
|
@ -227,7 +227,7 @@
|
||||||
"address": "@medieval-kit/wooden-pitchfork",
|
"address": "@medieval-kit/wooden-pitchfork",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.117Z",
|
"installedAt": "2026-08-22T04:53:30.963Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-pitchfork\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-pitchfork\\model.ts",
|
||||||
|
|
@ -242,7 +242,7 @@
|
||||||
"address": "@medieval-kit/wooden-shovel",
|
"address": "@medieval-kit/wooden-shovel",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.119Z",
|
"installedAt": "2026-08-22T04:53:30.964Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-shovel\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-shovel\\model.ts",
|
||||||
|
|
@ -257,7 +257,7 @@
|
||||||
"address": "@medieval-kit/wooden-stool",
|
"address": "@medieval-kit/wooden-stool",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.121Z",
|
"installedAt": "2026-08-22T04:53:30.965Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-stool\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-stool\\model.ts",
|
||||||
|
|
@ -272,7 +272,7 @@
|
||||||
"address": "@medieval-kit/cart-wheel",
|
"address": "@medieval-kit/cart-wheel",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.078Z",
|
"installedAt": "2026-08-22T04:53:30.930Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\cart-wheel\\model.ts",
|
"path": "src\\models\\medieval-kit\\cart-wheel\\model.ts",
|
||||||
|
|
@ -287,7 +287,7 @@
|
||||||
"address": "@medieval-kit/log-pile",
|
"address": "@medieval-kit/log-pile",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.092Z",
|
"installedAt": "2026-08-22T04:53:30.942Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\log-pile\\model.ts",
|
"path": "src\\models\\medieval-kit\\log-pile\\model.ts",
|
||||||
|
|
@ -302,7 +302,7 @@
|
||||||
"address": "@medieval-kit/trestle-table",
|
"address": "@medieval-kit/trestle-table",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.101Z",
|
"installedAt": "2026-08-22T04:53:30.949Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\trestle-table\\model.ts",
|
"path": "src\\models\\medieval-kit\\trestle-table\\model.ts",
|
||||||
|
|
@ -317,7 +317,7 @@
|
||||||
"address": "@medieval-kit/wooden-chest",
|
"address": "@medieval-kit/wooden-chest",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.109Z",
|
"installedAt": "2026-08-22T04:53:30.956Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-chest\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-chest\\model.ts",
|
||||||
|
|
@ -332,7 +332,7 @@
|
||||||
"address": "@medieval-kit/hay-bale",
|
"address": "@medieval-kit/hay-bale",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.083Z",
|
"installedAt": "2026-08-22T04:53:30.935Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\hay-bale\\model.ts",
|
"path": "src\\models\\medieval-kit\\hay-bale\\model.ts",
|
||||||
|
|
@ -347,7 +347,7 @@
|
||||||
"address": "@medieval-kit/pitch-torch",
|
"address": "@medieval-kit/pitch-torch",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.096Z",
|
"installedAt": "2026-08-22T04:53:30.945Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\pitch-torch\\model.ts",
|
"path": "src\\models\\medieval-kit\\pitch-torch\\model.ts",
|
||||||
|
|
@ -362,7 +362,7 @@
|
||||||
"address": "@medieval-kit/wooden-bench",
|
"address": "@medieval-kit/wooden-bench",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.106Z",
|
"installedAt": "2026-08-22T04:53:30.954Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wooden-bench\\model.ts",
|
"path": "src\\models\\medieval-kit\\wooden-bench\\model.ts",
|
||||||
|
|
@ -377,7 +377,7 @@
|
||||||
"address": "@medieval-kit/linen-sack",
|
"address": "@medieval-kit/linen-sack",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.091Z",
|
"installedAt": "2026-08-22T04:53:30.941Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\linen-sack\\model.ts",
|
"path": "src\\models\\medieval-kit\\linen-sack\\model.ts",
|
||||||
|
|
@ -392,11 +392,11 @@
|
||||||
"address": "@medieval-kit/oak-tankard",
|
"address": "@medieval-kit/oak-tankard",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.094Z",
|
"installedAt": "2026-08-22T04:53:30.944Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\oak-tankard\\model.ts",
|
"path": "src\\models\\medieval-kit\\oak-tankard\\model.ts",
|
||||||
"sourceHash": "22c46f2233b1f8a80bf7bd2c7c4bdeb7afd791c44a88af07936d4ff7660de5f5"
|
"sourceHash": "a69881fd29e3dafdedb7786da13892ee69e1be058994eeef9ff27bca6ae4033d"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|
@ -407,7 +407,7 @@
|
||||||
"address": "@medieval-kit/straw-broom",
|
"address": "@medieval-kit/straw-broom",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.098Z",
|
"installedAt": "2026-08-22T04:53:30.947Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\straw-broom\\model.ts",
|
"path": "src\\models\\medieval-kit\\straw-broom\\model.ts",
|
||||||
|
|
@ -422,7 +422,7 @@
|
||||||
"address": "@medieval-kit/bronze-bell",
|
"address": "@medieval-kit/bronze-bell",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.077Z",
|
"installedAt": "2026-08-22T04:53:30.929Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\bronze-bell\\model.ts",
|
"path": "src\\models\\medieval-kit\\bronze-bell\\model.ts",
|
||||||
|
|
@ -437,11 +437,11 @@
|
||||||
"address": "@medieval-kit/iron-lantern",
|
"address": "@medieval-kit/iron-lantern",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.087Z",
|
"installedAt": "2026-08-22T04:53:30.938Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\iron-lantern\\model.ts",
|
"path": "src\\models\\medieval-kit\\iron-lantern\\model.ts",
|
||||||
"sourceHash": "217ed35060890b97ed51e299e217ce9029ffd947a67f406a18c5b7f215cdbda9"
|
"sourceHash": "8e6f2101e85362a7073bbd0612f28ddd12477679b56310cddc48801f0539db96"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|
@ -452,7 +452,7 @@
|
||||||
"address": "@medieval-kit/tavern-sign",
|
"address": "@medieval-kit/tavern-sign",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.099Z",
|
"installedAt": "2026-08-22T04:53:30.948Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\tavern-sign\\model.ts",
|
"path": "src\\models\\medieval-kit\\tavern-sign\\model.ts",
|
||||||
|
|
@ -467,7 +467,7 @@
|
||||||
"address": "@medieval-kit/coin-pouch",
|
"address": "@medieval-kit/coin-pouch",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.080Z",
|
"installedAt": "2026-08-22T04:53:30.932Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\coin-pouch\\model.ts",
|
"path": "src\\models\\medieval-kit\\coin-pouch\\model.ts",
|
||||||
|
|
@ -482,7 +482,7 @@
|
||||||
"address": "@medieval-kit/glass-phial",
|
"address": "@medieval-kit/glass-phial",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.082Z",
|
"installedAt": "2026-08-22T04:53:30.934Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\glass-phial\\model.ts",
|
"path": "src\\models\\medieval-kit\\glass-phial\\model.ts",
|
||||||
|
|
@ -497,7 +497,7 @@
|
||||||
"address": "@medieval-kit/leather-book",
|
"address": "@medieval-kit/leather-book",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.089Z",
|
"installedAt": "2026-08-22T04:53:30.939Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\leather-book\\model.ts",
|
"path": "src\\models\\medieval-kit\\leather-book\\model.ts",
|
||||||
|
|
@ -512,7 +512,7 @@
|
||||||
"address": "@medieval-kit/wicker-basket",
|
"address": "@medieval-kit/wicker-basket",
|
||||||
"source": "file:my-registry/dist/registry.json",
|
"source": "file:my-registry/dist/registry.json",
|
||||||
"version": "workspace",
|
"version": "workspace",
|
||||||
"installedAt": "2026-08-22T01:12:43.103Z",
|
"installedAt": "2026-08-22T04:53:30.951Z",
|
||||||
"files": [
|
"files": [
|
||||||
{
|
{
|
||||||
"path": "src\\models\\medieval-kit\\wicker-basket\\model.ts",
|
"path": "src\\models\\medieval-kit\\wicker-basket\\model.ts",
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
import type { BufferGeometry } from 'three'
|
import type { BufferGeometry } from 'three'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
arcBarGeometry,
|
||||||
bandGeometry,
|
bandGeometry,
|
||||||
boxGeometry,
|
boxGeometry,
|
||||||
createKitModel,
|
createKitModel,
|
||||||
|
|
@ -165,20 +166,41 @@ export function createModel(overrides: Partial<IronLanternConfig> = {}) {
|
||||||
{ colourTop: tint('emberTip', 0.02, 0.35) }),
|
{ colourTop: tint('emberTip', 0.02, 0.35) }),
|
||||||
])
|
])
|
||||||
|
|
||||||
// --- Carrying hoop ----------------------------------------------------------
|
// --- Carrying bail ----------------------------------------------------------
|
||||||
const handle: BufferGeometry[] = [bandGeometry(
|
// A vertical arch, not a horizontal ring.
|
||||||
config.radius * 0.3, half + config.height * 0.1, bar * 0.9, bar * 0.55, 8,
|
//
|
||||||
tint('iron', 0.06, 0.7), { inner: true },
|
// What was here was a `bandGeometry` -- a flat hoop lying in the XZ
|
||||||
|
// plane on top of the flue. That is a suspension eye, and against a
|
||||||
|
// photograph of a real lantern it reads as a collar rather than as
|
||||||
|
// anything you could pick the lantern up by. A lantern's defining
|
||||||
|
// feature is that it is CARRIED: the bail is the first thing the eye
|
||||||
|
// looks for and the reason the object exists in a scene at all.
|
||||||
|
//
|
||||||
|
// `arcBarGeometry` builds in the XY plane, which for a half-circle from
|
||||||
|
// 0 to PI is already the shape wanted -- ends level, apex overhead --
|
||||||
|
// so no rotation is involved.
|
||||||
|
// The sweep runs PAST half a circle at both ends, by about 20 degrees.
|
||||||
|
// A clean half-circle put the two ends level with the roof's surface and
|
||||||
|
// merely tangent to it, which the support check rightly called floating.
|
||||||
|
// Carrying the arc further round turns each end downwards and outwards,
|
||||||
|
// so it crosses the roof cone from inside to outside and is genuinely
|
||||||
|
// embedded -- the same "real carpentry rather than a nudge" rule the
|
||||||
|
// rest of the kit follows for joints.
|
||||||
|
const bailRadius = config.radius * 0.78
|
||||||
|
const handle: BufferGeometry[] = [arcBarGeometry(
|
||||||
|
bailRadius,
|
||||||
|
bar * 1.05,
|
||||||
|
-0.35,
|
||||||
|
Math.PI + 0.35,
|
||||||
|
11,
|
||||||
|
[0, half - config.height * 0.145, 0],
|
||||||
|
tint('iron', 0.06, 0.7),
|
||||||
)]
|
)]
|
||||||
// The tongue joining the hoop to the flue.
|
// The tongue that used to join the old horizontal ring down to the flue
|
||||||
handle.push(boxGeometry(
|
// is gone with the ring. Left in place it z-fought the new bail: its
|
||||||
// Wide enough to reach the ring it carries. A tongue the width of the
|
// sides sat at z = +-0.00488 against the bail's +-0.00512, a quarter of
|
||||||
// bar passed straight through the middle of the ring without touching
|
// a millimetre apart over the whole apex. A bail that reaches into the
|
||||||
// it, so the handle hung above the lantern unattached.
|
// roof needs no strap to hold it on.
|
||||||
[config.radius * 0.82, config.height * 0.1, bar],
|
|
||||||
[0, half + config.height * 0.045, 0],
|
|
||||||
tint('iron', 0.02, 0.7),
|
|
||||||
))
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
frame: {
|
frame: {
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
import type { BufferGeometry } from 'three'
|
import type { BufferGeometry } from 'three'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
arcBarGeometry,
|
||||||
bandGeometry,
|
bandGeometry,
|
||||||
bendGeometry,
|
|
||||||
boxGeometry,
|
boxGeometry,
|
||||||
createKitModel,
|
createKitModel,
|
||||||
createTinter,
|
createTinter,
|
||||||
|
|
@ -45,8 +45,8 @@ export interface OakTankardConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const oakTankardDefaults: OakTankardConfig = {
|
export const oakTankardDefaults: OakTankardConfig = {
|
||||||
height: 0.175,
|
height: 0.162,
|
||||||
radius: 0.047,
|
radius: 0.056,
|
||||||
taper: 0.05,
|
taper: 0.05,
|
||||||
staveCount: 10,
|
staveCount: 10,
|
||||||
hoopCount: 2,
|
hoopCount: 2,
|
||||||
|
|
@ -109,33 +109,39 @@ export function createModel(overrides: Partial<OakTankardConfig> = {}) {
|
||||||
// --- Handle --------------------------------------------------------------
|
// --- Handle --------------------------------------------------------------
|
||||||
let handle: BufferGeometry | undefined
|
let handle: BufferGeometry | undefined
|
||||||
if (config.handle >= 0.5) {
|
if (config.handle >= 0.5) {
|
||||||
|
// Built as a real arc, not as a bent box.
|
||||||
|
//
|
||||||
|
// The previous version made a flat `boxGeometry` strap and put it
|
||||||
|
// through `bendGeometry`, then pushed it clear of the body by a
|
||||||
|
// hand-derived offset: `(1 - cos(span/2 * k)) / k`. Measured, the
|
||||||
|
// result was a handle whose outermost point stood 7 mm proud of a
|
||||||
|
// body 47 mm in radius, with the rest of it buried in the stave wall.
|
||||||
|
// There was no finger gap at all -- it read as a plank glued to the
|
||||||
|
// side, which is exactly what it was. The offset formula did not
|
||||||
|
// describe what `bendGeometry` actually does to the geometry.
|
||||||
|
//
|
||||||
|
// So this does not compute a correction for a curve it cannot see.
|
||||||
|
// `arcBarGeometry` produces the arc directly, and the arc is specified
|
||||||
|
// by the two things that actually matter: where its ends land, and how
|
||||||
|
// far its belly stands off the body.
|
||||||
const span = config.height * 0.72
|
const span = config.height * 0.72
|
||||||
const strap = boxGeometry(
|
// Ends land INSIDE the stave wall, so the joint is an overlap.
|
||||||
[config.radius * 0.3, span, thickness * 1.1],
|
const endDepth = config.radius - thickness * 1.1
|
||||||
|
const arcRadius = Math.hypot(span / 2, endDepth)
|
||||||
|
const halfAngle = Math.atan2(span / 2, endDepth)
|
||||||
|
const strap = arcBarGeometry(
|
||||||
|
arcRadius,
|
||||||
|
thickness * 1.5,
|
||||||
|
-halfAngle,
|
||||||
|
halfAngle,
|
||||||
|
7,
|
||||||
[0, 0, 0],
|
[0, 0, 0],
|
||||||
tint('oak', -0.05),
|
tint('oak', -0.05),
|
||||||
)
|
)
|
||||||
// The flat strap curves outwards away from the body. Because the centre
|
// The arc is built in the XY plane; -90 degrees about Y carries its
|
||||||
// of the curve is at the origin, both ends come back towards the body —
|
// +X into +Z, standing it up beside the body with its span along Y.
|
||||||
// that is exactly where the impression of a handle gripping the body
|
strap.rotateY(-Math.PI / 2)
|
||||||
// comes from.
|
handle = mergeColoured([strap])
|
||||||
bendGeometry(strap, -2.05 / span)
|
|
||||||
// The offset is found by calculation, not by eye: the bend leaves the
|
|
||||||
// midpoint of the arc in place and pulls its ENDS back, so if the
|
|
||||||
// middle of the handle is not pushed far enough away from the body it
|
|
||||||
// is not the ends but the MIDDLE that ends up inside the stave. On the
|
|
||||||
// first attempt the handle was completely invisible.
|
|
||||||
//
|
|
||||||
// Half-angle a = (span/2)·k, the ends pull back by (1−cos a)/k.
|
|
||||||
const drop = (1 - Math.cos(span * 0.5 * (2.05 / span))) / (2.05 / span)
|
|
||||||
strap.translate(0, 0, config.radius + drop + thickness * 0.6)
|
|
||||||
// Small pegs so that both ends go INSIDE the body.
|
|
||||||
const pegs = [1, -1].map((sign) => boxGeometry(
|
|
||||||
[config.radius * 0.3, thickness * 1.6, config.radius * 0.55],
|
|
||||||
[0, sign * span * 0.42, config.radius * 0.88],
|
|
||||||
tint('oak', -0.1),
|
|
||||||
))
|
|
||||||
handle = mergeColoured([strap, ...pegs])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
import type { BufferGeometry } from 'three'
|
import type { BufferGeometry } from 'three'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
arcBarGeometry,
|
||||||
bandGeometry,
|
bandGeometry,
|
||||||
boxGeometry,
|
boxGeometry,
|
||||||
createKitModel,
|
createKitModel,
|
||||||
|
|
@ -165,20 +166,41 @@ export function createModel(overrides: Partial<IronLanternConfig> = {}) {
|
||||||
{ colourTop: tint('emberTip', 0.02, 0.35) }),
|
{ colourTop: tint('emberTip', 0.02, 0.35) }),
|
||||||
])
|
])
|
||||||
|
|
||||||
// --- Carrying hoop ----------------------------------------------------------
|
// --- Carrying bail ----------------------------------------------------------
|
||||||
const handle: BufferGeometry[] = [bandGeometry(
|
// A vertical arch, not a horizontal ring.
|
||||||
config.radius * 0.3, half + config.height * 0.1, bar * 0.9, bar * 0.55, 8,
|
//
|
||||||
tint('iron', 0.06, 0.7), { inner: true },
|
// What was here was a `bandGeometry` -- a flat hoop lying in the XZ
|
||||||
|
// plane on top of the flue. That is a suspension eye, and against a
|
||||||
|
// photograph of a real lantern it reads as a collar rather than as
|
||||||
|
// anything you could pick the lantern up by. A lantern's defining
|
||||||
|
// feature is that it is CARRIED: the bail is the first thing the eye
|
||||||
|
// looks for and the reason the object exists in a scene at all.
|
||||||
|
//
|
||||||
|
// `arcBarGeometry` builds in the XY plane, which for a half-circle from
|
||||||
|
// 0 to PI is already the shape wanted -- ends level, apex overhead --
|
||||||
|
// so no rotation is involved.
|
||||||
|
// The sweep runs PAST half a circle at both ends, by about 20 degrees.
|
||||||
|
// A clean half-circle put the two ends level with the roof's surface and
|
||||||
|
// merely tangent to it, which the support check rightly called floating.
|
||||||
|
// Carrying the arc further round turns each end downwards and outwards,
|
||||||
|
// so it crosses the roof cone from inside to outside and is genuinely
|
||||||
|
// embedded -- the same "real carpentry rather than a nudge" rule the
|
||||||
|
// rest of the kit follows for joints.
|
||||||
|
const bailRadius = config.radius * 0.78
|
||||||
|
const handle: BufferGeometry[] = [arcBarGeometry(
|
||||||
|
bailRadius,
|
||||||
|
bar * 1.05,
|
||||||
|
-0.35,
|
||||||
|
Math.PI + 0.35,
|
||||||
|
11,
|
||||||
|
[0, half - config.height * 0.145, 0],
|
||||||
|
tint('iron', 0.06, 0.7),
|
||||||
)]
|
)]
|
||||||
// The tongue joining the hoop to the flue.
|
// The tongue that used to join the old horizontal ring down to the flue
|
||||||
handle.push(boxGeometry(
|
// is gone with the ring. Left in place it z-fought the new bail: its
|
||||||
// Wide enough to reach the ring it carries. A tongue the width of the
|
// sides sat at z = +-0.00488 against the bail's +-0.00512, a quarter of
|
||||||
// bar passed straight through the middle of the ring without touching
|
// a millimetre apart over the whole apex. A bail that reaches into the
|
||||||
// it, so the handle hung above the lantern unattached.
|
// roof needs no strap to hold it on.
|
||||||
[config.radius * 0.82, config.height * 0.1, bar],
|
|
||||||
[0, half + config.height * 0.045, 0],
|
|
||||||
tint('iron', 0.02, 0.7),
|
|
||||||
))
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
frame: {
|
frame: {
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
import type { BufferGeometry } from 'three'
|
import type { BufferGeometry } from 'three'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
arcBarGeometry,
|
||||||
bandGeometry,
|
bandGeometry,
|
||||||
bendGeometry,
|
|
||||||
boxGeometry,
|
boxGeometry,
|
||||||
createKitModel,
|
createKitModel,
|
||||||
createTinter,
|
createTinter,
|
||||||
|
|
@ -45,8 +45,8 @@ export interface OakTankardConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const oakTankardDefaults: OakTankardConfig = {
|
export const oakTankardDefaults: OakTankardConfig = {
|
||||||
height: 0.175,
|
height: 0.162,
|
||||||
radius: 0.047,
|
radius: 0.056,
|
||||||
taper: 0.05,
|
taper: 0.05,
|
||||||
staveCount: 10,
|
staveCount: 10,
|
||||||
hoopCount: 2,
|
hoopCount: 2,
|
||||||
|
|
@ -109,33 +109,39 @@ export function createModel(overrides: Partial<OakTankardConfig> = {}) {
|
||||||
// --- Handle --------------------------------------------------------------
|
// --- Handle --------------------------------------------------------------
|
||||||
let handle: BufferGeometry | undefined
|
let handle: BufferGeometry | undefined
|
||||||
if (config.handle >= 0.5) {
|
if (config.handle >= 0.5) {
|
||||||
|
// Built as a real arc, not as a bent box.
|
||||||
|
//
|
||||||
|
// The previous version made a flat `boxGeometry` strap and put it
|
||||||
|
// through `bendGeometry`, then pushed it clear of the body by a
|
||||||
|
// hand-derived offset: `(1 - cos(span/2 * k)) / k`. Measured, the
|
||||||
|
// result was a handle whose outermost point stood 7 mm proud of a
|
||||||
|
// body 47 mm in radius, with the rest of it buried in the stave wall.
|
||||||
|
// There was no finger gap at all -- it read as a plank glued to the
|
||||||
|
// side, which is exactly what it was. The offset formula did not
|
||||||
|
// describe what `bendGeometry` actually does to the geometry.
|
||||||
|
//
|
||||||
|
// So this does not compute a correction for a curve it cannot see.
|
||||||
|
// `arcBarGeometry` produces the arc directly, and the arc is specified
|
||||||
|
// by the two things that actually matter: where its ends land, and how
|
||||||
|
// far its belly stands off the body.
|
||||||
const span = config.height * 0.72
|
const span = config.height * 0.72
|
||||||
const strap = boxGeometry(
|
// Ends land INSIDE the stave wall, so the joint is an overlap.
|
||||||
[config.radius * 0.3, span, thickness * 1.1],
|
const endDepth = config.radius - thickness * 1.1
|
||||||
|
const arcRadius = Math.hypot(span / 2, endDepth)
|
||||||
|
const halfAngle = Math.atan2(span / 2, endDepth)
|
||||||
|
const strap = arcBarGeometry(
|
||||||
|
arcRadius,
|
||||||
|
thickness * 1.5,
|
||||||
|
-halfAngle,
|
||||||
|
halfAngle,
|
||||||
|
7,
|
||||||
[0, 0, 0],
|
[0, 0, 0],
|
||||||
tint('oak', -0.05),
|
tint('oak', -0.05),
|
||||||
)
|
)
|
||||||
// The flat strap curves outwards away from the body. Because the centre
|
// The arc is built in the XY plane; -90 degrees about Y carries its
|
||||||
// of the curve is at the origin, both ends come back towards the body —
|
// +X into +Z, standing it up beside the body with its span along Y.
|
||||||
// that is exactly where the impression of a handle gripping the body
|
strap.rotateY(-Math.PI / 2)
|
||||||
// comes from.
|
handle = mergeColoured([strap])
|
||||||
bendGeometry(strap, -2.05 / span)
|
|
||||||
// The offset is found by calculation, not by eye: the bend leaves the
|
|
||||||
// midpoint of the arc in place and pulls its ENDS back, so if the
|
|
||||||
// middle of the handle is not pushed far enough away from the body it
|
|
||||||
// is not the ends but the MIDDLE that ends up inside the stave. On the
|
|
||||||
// first attempt the handle was completely invisible.
|
|
||||||
//
|
|
||||||
// Half-angle a = (span/2)·k, the ends pull back by (1−cos a)/k.
|
|
||||||
const drop = (1 - Math.cos(span * 0.5 * (2.05 / span))) / (2.05 / span)
|
|
||||||
strap.translate(0, 0, config.radius + drop + thickness * 0.6)
|
|
||||||
// Small pegs so that both ends go INSIDE the body.
|
|
||||||
const pegs = [1, -1].map((sign) => boxGeometry(
|
|
||||||
[config.radius * 0.3, thickness * 1.6, config.radius * 0.55],
|
|
||||||
[0, sign * span * 0.42, config.radius * 0.88],
|
|
||||||
tint('oak', -0.1),
|
|
||||||
))
|
|
||||||
handle = mergeColoured([strap, ...pegs])
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue