From 334eb5ed6895205ebdad09217434a6c2aa4959d7 Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:20:30 +0000 Subject: [PATCH 01/13] docs: add the MIT licence for the figure The kit in kit/ already carried its own MIT licence; the rest of the repository had none, so the public code could not be reused. --- LICENSE | 21 +++++++++++++++++++++ README.md | 4 ++++ 2 files changed, 25 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d626401 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Charlie Joseph + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index ee5f1f1..32aaff0 100644 --- a/README.md +++ b/README.md @@ -42,5 +42,9 @@ The audits and browser checks (headless Chromium) are described in [`a380/README turn runtime and the WebGL painter (MIT, see `kit/LICENSE`). - `scripts/`: headless-browser capture, drive and check scripts from the same skill. +## Licence + +MIT, see [`LICENSE`](LICENSE). The drawing kit in `kit/` keeps its own MIT licence (`kit/LICENSE`). + Not affiliated with or endorsed by Airbus. Dimensions and procedures come from public Airbus and EASA documents; values marked as estimates in `a380/truth.md` are estimates. From b942b83516235eb224da52132dfc19a973cbc619 Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:21:02 +0000 Subject: [PATCH 02/13] build: add package.json scripts and the Cloudflare deploy config npm run build, check, typecheck, site, serve and deploy wrap the existing node commands. TypeScript and Wrangler are the only dev dependencies; the figure still builds with Node alone. wrangler.jsonc deploys a380/dist to air.pla.ne as Workers static assets. --- README.md | 15 +- a380/site/DEPLOY.md | 3 +- package-lock.json | 1972 +++++++++++++++++++++++++++++++++++++++++++ package.json | 25 + wrangler.jsonc | 14 + 5 files changed, 2023 insertions(+), 6 deletions(-) create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 wrangler.jsonc diff --git a/README.md b/README.md index 32aaff0..a120412 100644 --- a/README.md +++ b/README.md @@ -23,15 +23,20 @@ Controls: drag to turn · `1`–`7` flight phases · `C` cutaway · `D` doors · ## Build it -Requires Node.js 20.10 or later; there is nothing to install. +Requires Node.js 20.10 or later. The figure itself needs nothing installed; `npm install` adds only the +development tools (TypeScript for the type check, Wrangler for the deploy). ```sh -node a380/build.mjs # a380/a380.html -node a380/build.mjs --light # a380/a380-light.html -node a380/build.mjs --check # the figure's own checks -node a380/tools/build-site.mjs # a380/dist/: the one-page static site with the theme switch (a380/site/DEPLOY.md) +npm run build # a380/a380.html and a380/a380-light.html, the single-file pages +npm run check # the figure's own checks and the flight-model test +npm run typecheck # tsc over the files marked // @ts-check +npm run site # a380/dist/: the one-page static site with the theme switch (a380/site/DEPLOY.md) +npm run serve # serve a380/dist on http://127.0.0.1:8741/ the way a host would +npm run deploy # build the site and upload it to Cloudflare (wrangler.jsonc) ``` +Each script is a plain `node` command (see `package.json`), so they also run without npm. + The audits and browser checks (headless Chromium) are described in [`a380/README.md`](a380/README.md). ## Layout diff --git a/a380/site/DEPLOY.md b/a380/site/DEPLOY.md index feb7673..2ba4dbc 100644 --- a/a380/site/DEPLOY.md +++ b/a380/site/DEPLOY.md @@ -63,7 +63,8 @@ is the site's root. If the folder is served from a subpath of a larger site, pre 2. `_headers` and `404.html` are read automatically. Cloudflare compresses with brotli or gzip for browsers that ask. 3. Custom domain: the project → Custom domains → Set up a domain. -Or as Workers static assets, with no Worker code (how https://air.pla.ne/ is served): a `wrangler.jsonc` with +Or as Workers static assets, with no Worker code (how https://air.pla.ne/ is served, from the root `wrangler.jsonc`: +`npm run deploy`): a `wrangler.jsonc` with `"assets": { "directory": "a380/dist", "not_found_handling": "404-page" }` and `"routes": [{ "pattern": "your.domain", "custom_domain": true }]`, then `npx wrangler deploy`. `_headers` is read the same way, and the build's `.assetsignore` keeps `.build-site`, `.nojekyll` and `vercel.json` out of the upload. diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..dd32fca --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1972 @@ +{ + "name": "pla.ne", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "pla.ne", + "version": "1.0.0", + "license": "MIT", + "devDependencies": { + "typescript": "^7.0.2", + "wrangler": "^4.149.0" + }, + "engines": { + "node": ">=20.10" + } + }, + "node_modules/@cloudflare/kv-asset-handler": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.5.0.tgz", + "integrity": "sha512-jxQYkj8dSIzc0cD6cMMNdOc1UVjqSqu8BZdor5s8cGjW2I8BjODt/kWPVdY+u9zj3ms75Q5qaZgnxUad83+eAg==", + "dev": true, + "license": "MIT OR Apache-2.0", + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@cloudflare/unenv-preset": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.16.2.tgz", + "integrity": "sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ==", + "dev": true, + "license": "MIT OR Apache-2.0", + "peerDependencies": { + "unenv": "2.0.0-rc.24", + "workerd": ">1.20260305.0 <2.0.0-0" + }, + "peerDependenciesMeta": { + "workerd": { + "optional": true + } + } + }, + "node_modules/@cloudflare/workerd-darwin-64": { + "version": "1.20261006.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261006.1.tgz", + "integrity": "sha512-lCX6avJO2It9AyDEYitjmOtJRVp/xmaW0TziyoLAnfxlzozyyRbSFfIIMMCiDx/sTP1++E4VLbV+7BHSD33f0Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-darwin-arm64": { + "version": "1.20261006.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261006.1.tgz", + "integrity": "sha512-PyFGjOaldtppnLuKsdkoYWXfLVpDjuf8u+uoykX+1Xvxo2EPmCVViq0iDKm+U7c7PRno85ehS3/MPVXyk2HwHw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-linux-64": { + "version": "1.20261006.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261006.1.tgz", + "integrity": "sha512-Ntf9S8eesmVufdjaT2kzWlz6Ng9XGYTc6cHQVRKAg59lFufwsIabGeMT6U4KkrpEeSIxgHq8aPtuLbZXE19tCA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-linux-arm64": { + "version": "1.20261006.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261006.1.tgz", + "integrity": "sha512-JyeDBymVWw5tVRebSsVE8ojDYxd6UlZrAseHU8G+NpIyd5wF61tXlF/axLeCUqu0pOhBFHb8I5QKi0jwrCK41Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-windows-64": { + "version": "1.20261006.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261006.1.tgz", + "integrity": "sha512-nWP0URNqOBN9fa/gZ7eh/w051DwjOXN8j4lDZDYVXyQPsux6sV3DfyYZT+CjR/rt9nKBSmJT9QE9/bWT18+84w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", + "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@img/colour": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", + "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.5.tgz", + "integrity": "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.3.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.5.tgz", + "integrity": "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.3.4" + } + }, + "node_modules/@img/sharp-freebsd-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.5.tgz", + "integrity": "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "dependencies": { + "@img/sharp-wasm32": "0.35.5" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.4.tgz", + "integrity": "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.4.tgz", + "integrity": "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.4.tgz", + "integrity": "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.4.tgz", + "integrity": "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-ppc64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.4.tgz", + "integrity": "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-riscv64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.4.tgz", + "integrity": "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.4.tgz", + "integrity": "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.4.tgz", + "integrity": "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.4.tgz", + "integrity": "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.4.tgz", + "integrity": "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.5.tgz", + "integrity": "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.5.tgz", + "integrity": "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-ppc64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.5.tgz", + "integrity": "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-ppc64": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-riscv64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.5.tgz", + "integrity": "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-riscv64": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.5.tgz", + "integrity": "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.5.tgz", + "integrity": "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.3.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.5.tgz", + "integrity": "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.5.tgz", + "integrity": "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.3.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.5.tgz", + "integrity": "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==", + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.11.3" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-webcontainers-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.5.tgz", + "integrity": "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@img/sharp-wasm32": "0.35.5" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.5.tgz", + "integrity": "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.5.tgz", + "integrity": "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.5.tgz", + "integrity": "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@poppinss/colors": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.6.tgz", + "integrity": "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^4.1.5" + } + }, + "node_modules/@poppinss/dumper": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@poppinss/dumper/-/dumper-0.6.5.tgz", + "integrity": "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@poppinss/colors": "^4.1.5", + "@sindresorhus/is": "^7.0.2", + "supports-color": "^10.0.0" + } + }, + "node_modules/@poppinss/exception": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@poppinss/exception/-/exception-1.2.3.tgz", + "integrity": "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sindresorhus/is": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz", + "integrity": "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@speed-highlight/core": { + "version": "1.2.24", + "resolved": "https://registry.npmjs.org/@speed-highlight/core/-/core-1.2.24.tgz", + "integrity": "sha512-qeW2e1l78afw8VhRPfPQ1Gjj+KU5XFQ/OFV5ti6eTa9bruO7mJyZtA4vw0ofqmA3tKCkROE9xLk3VZoeRc98nw==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/blake3-wasm": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", + "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", + "dev": true, + "license": "MIT" + }, + "node_modules/cookie": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/error-stack-parser-es": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz", + "integrity": "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/miniflare": { + "version": "5.20261006.1-alpha", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261006.1-alpha.tgz", + "integrity": "sha512-6ylv8tamkrspDI2R/cAYfv+YWmfGNdXe76Pi9TauEUWsFVXn3LNF9Yk8oduzf1a+TYsSRYTqlOE7+nGGRsMHdw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "0.8.1", + "sharp": "0.35.5", + "undici": "7.29.1", + "workerd": "1.20261006.1", + "ws": "8.21.0", + "youch": "4.1.0-beta.10" + }, + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/path-to-regexp": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz", + "integrity": "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@img/colour": "^1.1.0", + "detect-libc": "^2.1.2", + "semver": "^7.8.5" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.35.5", + "@img/sharp-darwin-x64": "0.35.5", + "@img/sharp-freebsd-wasm32": "0.35.5", + "@img/sharp-libvips-darwin-arm64": "1.3.4", + "@img/sharp-libvips-darwin-x64": "1.3.4", + "@img/sharp-libvips-linux-arm": "1.3.4", + "@img/sharp-libvips-linux-arm64": "1.3.4", + "@img/sharp-libvips-linux-ppc64": "1.3.4", + "@img/sharp-libvips-linux-riscv64": "1.3.4", + "@img/sharp-libvips-linux-s390x": "1.3.4", + "@img/sharp-libvips-linux-x64": "1.3.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", + "@img/sharp-libvips-linuxmusl-x64": "1.3.4", + "@img/sharp-linux-arm": "0.35.5", + "@img/sharp-linux-arm64": "0.35.5", + "@img/sharp-linux-ppc64": "0.35.5", + "@img/sharp-linux-riscv64": "0.35.5", + "@img/sharp-linux-s390x": "0.35.5", + "@img/sharp-linux-x64": "0.35.5", + "@img/sharp-linuxmusl-arm64": "0.35.5", + "@img/sharp-linuxmusl-x64": "0.35.5", + "@img/sharp-webcontainers-wasm32": "0.35.5", + "@img/sharp-win32-arm64": "0.35.5", + "@img/sharp-win32-ia32": "0.35.5", + "@img/sharp-win32-x64": "0.35.5" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/typescript": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc" + }, + "engines": { + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" + } + }, + "node_modules/undici": { + "version": "7.29.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.29.1.tgz", + "integrity": "sha512-RYONW2MeafgYlkVOKYKkA/Ag7BmXqgIWCa8t1m0JcxrQg9pI9lEqRhAOruOBCbAohOa/gkCF+iPi9hrgvTzu6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/unenv": { + "version": "2.0.0-rc.24", + "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz", + "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pathe": "^2.0.3" + } + }, + "node_modules/workerd": { + "version": "1.20261006.1", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261006.1.tgz", + "integrity": "sha512-8MadBuffZ5NdpLwZjUmsqT5QlaKXq4gjgT6wzcKeynZTICNXyePhc+5QVoKiK7+MMhFTLNrRO2KXLlpk8Q6BkA==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "workerd": "bin/workerd" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "@cloudflare/workerd-darwin-64": "1.20261006.1", + "@cloudflare/workerd-darwin-arm64": "1.20261006.1", + "@cloudflare/workerd-linux-64": "1.20261006.1", + "@cloudflare/workerd-linux-arm64": "1.20261006.1", + "@cloudflare/workerd-windows-64": "1.20261006.1" + } + }, + "node_modules/wrangler": { + "version": "4.149.0", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.149.0.tgz", + "integrity": "sha512-OzK7xmB5r5iLKb3cIT3783g13fe6T7xyeKu9LEdUyl+DKAM2KP/jkjnE0OUhyw+mB/XJM9ycjgF3MWm8PR9amg==", + "dev": true, + "license": "MIT OR Apache-2.0", + "dependencies": { + "@cloudflare/kv-asset-handler": "0.5.0", + "@cloudflare/unenv-preset": "2.16.2", + "blake3-wasm": "2.1.5", + "esbuild": "0.28.2", + "miniflare": "5.20261006.1-alpha", + "path-to-regexp": "6.3.0", + "unenv": "2.0.0-rc.24", + "workerd": "1.20261006.1" + }, + "bin": { + "cf-wrangler": "bin/cf-wrangler.js", + "wrangler": "bin/wrangler.js", + "wrangler2": "bin/wrangler.js" + }, + "engines": { + "node": ">=22.0.0" + }, + "optionalDependencies": { + "fsevents": "2.3.3" + }, + "peerDependencies": { + "@cloudflare/workers-types": "^5.20261006.1" + }, + "peerDependenciesMeta": { + "@cloudflare/workers-types": { + "optional": true + } + } + }, + "node_modules/ws": { + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/youch": { + "version": "4.1.0-beta.10", + "resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz", + "integrity": "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@poppinss/colors": "^4.1.5", + "@poppinss/dumper": "^0.6.4", + "@speed-highlight/core": "^1.2.7", + "cookie": "^1.0.2", + "youch-core": "^0.3.3" + } + }, + "node_modules/youch-core": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/youch-core/-/youch-core-0.3.3.tgz", + "integrity": "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@poppinss/exception": "^1.2.2", + "error-stack-parser-es": "^1.0.5" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..68815bb --- /dev/null +++ b/package.json @@ -0,0 +1,25 @@ +{ + "name": "pla.ne", + "version": "1.0.0", + "private": true, + "description": "An interactive, true-3D Airbus A380 in one web page.", + "license": "MIT", + "homepage": "https://air.pla.ne", + "repository": "github:entity/pla.ne", + "type": "module", + "engines": { + "node": ">=20.10" + }, + "scripts": { + "build": "node a380/build.mjs && node a380/build.mjs --light", + "check": "node a380/build.mjs --check && node a380/tools/model-test.mjs", + "typecheck": "tsc -p .", + "site": "node a380/tools/build-site.mjs --rebuild --url https://air.pla.ne/", + "serve": "node a380/tools/serve-site.mjs --port 8741 --base /", + "deploy": "npm run site && wrangler deploy" + }, + "devDependencies": { + "typescript": "^7.0.2", + "wrangler": "^4.149.0" + } +} diff --git a/wrangler.jsonc b/wrangler.jsonc new file mode 100644 index 0000000..a03f2fe --- /dev/null +++ b/wrangler.jsonc @@ -0,0 +1,14 @@ +// https://air.pla.ne: the static site in a380/dist as Workers static assets, with no Worker code (a380/site/DEPLOY.md). +// `npm run deploy` builds the site and uploads it; wrangler takes the account from `wrangler login` or the +// CLOUDFLARE_ACCOUNT_ID and CLOUDFLARE_API_TOKEN variables. +{ + "name": "air-pla-ne", + "compatibility_date": "2026-10-01", + "assets": { + "directory": "a380/dist", + "not_found_handling": "404-page", + "html_handling": "auto-trailing-slash" + }, + "routes": [{ "pattern": "air.pla.ne", "custom_domain": true }], + "workers_dev": false +} From 6e2e51305a3be181de8e6c218bc30ec57a9a540a Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:22:16 +0000 Subject: [PATCH 03/13] build: type-check the model and world modules with tsc tsconfig.json runs TypeScript as a checker over plain JavaScript: files opt in with // @ts-check. model.mjs and world.mjs are the first; a State typedef and JSDoc on step() and poseOf() give the rest of the code something to check against. --- a380/model.mjs | 10 ++++++++++ a380/world.mjs | 8 +++++++- tsconfig.json | 16 ++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 tsconfig.json diff --git a/a380/model.mjs b/a380/model.mjs index 29aa489..1e51e4d 100644 --- a/a380/model.mjs +++ b/a380/model.mjs @@ -1,3 +1,4 @@ +// @ts-check // a380/model.mjs: the Airbus A380-800 truth model for the figure. // // Pure ESM: no imports, no Node or DOM APIs, no clock or random sources. Inlined into the page and @@ -824,6 +825,11 @@ export function phaseState(id) { // --------------------------------------------------------------------------------------------- // state and dynamics // --------------------------------------------------------------------------------------------- +/** + * The aircraft's state as step() advances it (doors, gear, high-lift, engines, flight path, lights, the cabin dimmer + * and blinds, the tug): what initialState() returns. + * @typedef {ReturnType} State + */ /** The rest state: parked at the gate (GATE targets already reached). */ export function initialState() { const t = phaseState("GATE"); @@ -855,6 +861,10 @@ const confDrive = (slatDeg, flapDeg) => [invMap(SLAT_MAP, slatDeg), invMap(FLAP_ * Advance the state by dt seconds toward the phase targets with the real rates. Pure: returns a new * state. dt is real (aircraft) time; a figure that compresses time passes dt * compression, in * sub-steps of at most 0.1 s (step does this itself). + * @param {State} state + * @param {ReturnType} target + * @param {number} dt seconds + * @returns {State} */ export function step(state, target, dt) { let s = deepCopy(state); diff --git a/a380/world.mjs b/a380/world.mjs index 9ff65dd..5a512cc 100644 --- a/a380/world.mjs +++ b/a380/world.mjs @@ -1,3 +1,4 @@ +// @ts-check // a380/world.mjs (S): the A380 figure's analytic world (DESIGN §2, §3.4, §5.1, §8.7). // // Every shape two modules share is a function here; modules build against these, never against each @@ -89,7 +90,12 @@ export const CUTS = { }; export const COCKPIT_SYNC = 14.5; // cut.fd units at which the cockpit group syncs (DESIGN §3.3, §5.9) -/** Rotation of a kit point about the pitch hinge, then lift and turn: the airframe's world pose. */ +/** + * Rotation of a kit point about the pitch hinge, then lift and turn: the airframe's world pose. + * @param {number[]} p a kit point [x, y, z] + * @param {{ turn?: number, lift?: number, pitch?: number }} [pose] degrees, kit units, degrees + * @returns {[number, number, number]} + */ export function poseOf(p, { turn = 0, lift = 0, pitch = 0 } = {}) { const P0 = PITCH.point; const t = (pitch * Math.PI) / 180; diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..1f1c6ef --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,16 @@ +{ + // the type check only (npm run typecheck): plain JavaScript, checked in the files that opt in with // @ts-check + "compilerOptions": { + "allowJs": true, + "checkJs": false, + "noEmit": true, + "target": "es2023", + "module": "nodenext", + "moduleResolution": "nodenext", + "lib": ["es2023", "dom"], + "types": [], + "skipLibCheck": true, + "strict": false + }, + "include": ["a380/*.mjs", "a380/parts/*.mjs", "a380/gl/*.mjs", "a380/tools/*.mjs", "kit/*.mjs", "scripts/*.mjs"] +} From 2b742e1bfbd540285e24566a6f1efec52c773136 Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:22:59 +0000 Subject: [PATCH 04/13] ci: run the type check and the figure checks on pushes and pull requests --- .github/workflows/ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3eb406d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,21 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 + with: + node-version: 24 + cache: npm + - run: npm ci + - name: Type check + run: npm run typecheck + - name: Figure checks and flight-model test + run: npm run check From fd5c45bb8b098e34fc1b0f383830d889d99ca17d Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:23:05 +0000 Subject: [PATCH 05/13] build: stop tracking the built pages and attach them to releases Each rebuild of a380.html and a380-light.html added about 4 MB to the history. They are build output: npm run build writes them, and a version tag now builds them and attaches them to its GitHub release. --- .github/workflows/release.yml | 25 + .gitignore | 3 + README.md | 5 +- a380/README.md | 3 +- a380/a380-light.html | 19140 ------------------------------- a380/a380.html | 19204 -------------------------------- 6 files changed, 33 insertions(+), 38347 deletions(-) create mode 100644 .github/workflows/release.yml delete mode 100644 a380/a380-light.html delete mode 100644 a380/a380.html diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..d502d10 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +# On a version tag (v1.2.0): build both single-file pages and attach them to a GitHub release, for use offline. +name: Release + +on: + push: + tags: ["v*"] + +permissions: + contents: write + +jobs: + pages: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - uses: actions/setup-node@v5 + with: + node-version: 24 + - run: npm run build + - name: Attach the pages to the release + env: + GH_TOKEN: ${{ github.token }} + run: | + gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1 || gh release create "$GITHUB_REF_NAME" --generate-notes + gh release upload "$GITHUB_REF_NAME" a380/a380.html a380/a380-light.html --clobber diff --git a/.gitignore b/.gitignore index 0d1757e..611de7a 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,6 @@ a380/dist/ a380/*-verify.html *.log .env +# the built single-file pages (npm run build); releases carry them +a380/a380.html +a380/a380-light.html diff --git a/README.md b/README.md index a120412..af95169 100644 --- a/README.md +++ b/README.md @@ -14,8 +14,9 @@ self-contained web page. ## Try it -Open `a380/a380.html` (dark) or `a380/a380-light.html` (light) in a browser. Each page is a single file with no -network requests, for use offline. The hosted site (`node a380/tools/build-site.mjs`) is one page, `index.html`, with a +The live site is https://air.pla.ne. For use offline, download `a380.html` (dark) or `a380-light.html` (light) from +the [latest release](https://github.com/entity/pla.ne/releases/latest), or build them with `npm run build`. Each page is +a single file with no network requests. The hosted site (`node a380/tools/build-site.mjs`) is one page, `index.html`, with a System / Light / Dark switch that changes the theme in place without losing the flight, the view or the turntable. Controls: drag to turn · `1`–`7` flight phases · `C` cutaway · `D` doors · `I` / `Shift+I` close-up views · diff --git a/a380/README.md b/a380/README.md index f9897be..8990366 100644 --- a/a380/README.md +++ b/a380/README.md @@ -7,7 +7,8 @@ self-contained HTML page with no network requests: - `a380/a380.html`: dark theme (night, the lights carry the picture); - `a380/a380-light.html`: light theme (daylight; lenses read as glints, no bloom). -Both are written by `node a380/build.mjs` and work offline. The hosted site (`a380/tools/build-site.mjs`, see Host +Both are written by `node a380/build.mjs` (`npm run build`) and work offline. They are not kept in git; each GitHub +release carries them. The hosted site (`a380/tools/build-site.mjs`, see Host below) is one page, `index.html`, with a System / Light / Dark switch that swaps the theme in place. Every size, rate and rule comes from `a380/model.mjs`, which is sourced in `a380/truth.md` (Airbus airport-planning drawings, EASA type certificates, Airbus Safety First and the other sources listed there). Numbers marked as estimates in the truth sheet are engineering estimates. diff --git a/a380/a380-light.html b/a380/a380-light.html deleted file mode 100644 index fe307e9..0000000 --- a/a380/a380-light.html +++ /dev/null @@ -1,19140 +0,0 @@ -Airbus A380-800 · an interactive 3D cutaway

An Airbus A380-800 on a turntable: the double-deck fuselage, wings, four engines and the landing gear, turning slowly while it plays its departure. Drag, or use the left and right arrow keys, to turn it; keys 1 to 7 go to a phase of the departure, and the buttons below the drawing work the doors, cutaway, flaps, gear, engines, lights and the Inspect views.

Phases
Systems
Lights

An Airbus A380-800 on a turntable, built from Airbus's airport-planning drawings: 72.7 m long, 79.8 m across the wingtip fences and 24.1 m tall. It stands at its 562 t ramp weight and takes off at 510 t. It has four 334 kN Rolls-Royce Trent 970s, 22 wheels on five legs, and Airbus's standard 555 seats in three classes on two decks. It flies the Airbus departure at the model's rates. The doors close and the beacon comes on before the push. Engines 1 and 2 start, then 3 and 4. The slats and then the flaps set CONF 1+F in 52 s of taxiing. The take-off roll lasts 57 s and 2.1 km, rotating at 3° a second from 153 kt to lift off at 163 kt. Gear up is selected 2 s after positive climb and retracts in 16 s. Thrust comes back to climb at 1,500 ft, the flaps and then the slats retract at S speed, and the landing lights go off passing 10,000 ft. Time runs compressed by the factor in the readout, and heights above a few metres are compressed on the turntable. Speeds, thrust settings, and the gear and flap timings are engineering estimates.

\ No newline at end of file diff --git a/a380/a380.html b/a380/a380.html deleted file mode 100644 index a50714c..0000000 --- a/a380/a380.html +++ /dev/null @@ -1,19204 +0,0 @@ -Airbus A380-800 · an interactive 3D cutaway

An Airbus A380-800 on a turntable: the double-deck fuselage, wings, four engines and the landing gear, turning slowly while it plays its departure. Drag, or use the left and right arrow keys, to turn it; keys 1 to 7 go to a phase of the departure, and the buttons below the drawing work the doors, cutaway, flaps, gear, engines, lights and the Inspect views.

Phases
Systems
Lights

An Airbus A380-800 on a turntable, built from Airbus's airport-planning drawings: 72.7 m long, 79.8 m across the wingtip fences and 24.1 m tall. It stands at its 562 t ramp weight and takes off at 510 t. It has four 334 kN Rolls-Royce Trent 970s, 22 wheels on five legs, and Airbus's standard 555 seats in three classes on two decks. It flies the Airbus departure at the model's rates. The doors close and the beacon comes on before the push. Engines 1 and 2 start, then 3 and 4. The slats and then the flaps set CONF 1+F in 52 s of taxiing. The take-off roll lasts 57 s and 2.1 km, rotating at 3° a second from 153 kt to lift off at 163 kt. Gear up is selected 2 s after positive climb and retracts in 16 s. Thrust comes back to climb at 1,500 ft, the flaps and then the slats retract at S speed, and the landing lights go off passing 10,000 ft. Time runs compressed by the factor in the readout, and heights above a few metres are compressed on the turntable. Speeds, thrust settings, and the gear and flap timings are engineering estimates.

\ No newline at end of file From 76e5bd844c65dd69633bfe9ac0f8822c78abb53e Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:26:06 +0000 Subject: [PATCH 06/13] ci: deploy air.pla.ne from main when Cloudflare credentials are set The workflow runs npm run deploy with the link-preview capture on SwiftShader, and skips itself until the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID secrets exist. --- .github/workflows/deploy.yml | 38 ++++++++++++++++++++++++++++++++++++ a380/site/DEPLOY.md | 5 +++++ 2 files changed, 43 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..5f6d6a5 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,38 @@ +# Deploy https://air.pla.ne from main (npm run deploy: build the site, upload it with wrangler). Needs the repository +# secrets CLOUDFLARE_API_TOKEN (Workers Scripts and Workers Routes edit, Zone read) and CLOUDFLARE_ACCOUNT_ID; without +# them the job is skipped. The link-preview images are captured in headless Chrome on SwiftShader (no GPU here). +name: Deploy + +on: + push: + branches: [main] + workflow_dispatch: + +concurrency: + group: deploy + cancel-in-progress: false + +jobs: + deploy: + runs-on: ubuntu-latest + env: + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + steps: + - name: Skip without Cloudflare credentials + if: env.CLOUDFLARE_API_TOKEN == '' + run: echo "CLOUDFLARE_API_TOKEN is not set; nothing deployed." + - uses: actions/checkout@v5 + if: env.CLOUDFLARE_API_TOKEN != '' + - uses: actions/setup-node@v5 + if: env.CLOUDFLARE_API_TOKEN != '' + with: + node-version: 24 + cache: npm + - if: env.CLOUDFLARE_API_TOKEN != '' + run: npm ci + - name: Build and deploy + if: env.CLOUDFLARE_API_TOKEN != '' + env: + DRIVE_ANGLE: swiftshader + run: npm run deploy diff --git a/a380/site/DEPLOY.md b/a380/site/DEPLOY.md index 2ba4dbc..80f218b 100644 --- a/a380/site/DEPLOY.md +++ b/a380/site/DEPLOY.md @@ -69,6 +69,11 @@ Or as Workers static assets, with no Worker code (how https://air.pla.ne/ is ser `"routes": [{ "pattern": "your.domain", "custom_domain": true }]`, then `npx wrangler deploy`. `_headers` is read the same way, and the build's `.assetsignore` keeps `.build-site`, `.nojekyll` and `vercel.json` out of the upload. +`.github/workflows/deploy.yml` runs `npm run deploy` on every push to `main` (and on demand) once the repository has +the secrets `CLOUDFLARE_API_TOKEN` (a token with Workers Scripts and Workers Routes edit and Zone read) and +`CLOUDFLARE_ACCOUNT_ID`; without them it does nothing. The runner has no GPU, so the card images are captured on +SwiftShader (`DRIVE_ANGLE=swiftshader`): about 2.5 minutes, and the build warns that it did. + ## Netlify 1. Drag `a380/dist` onto app.netlify.com/drop, or `npx netlify-cli deploy --dir a380/dist --prod`. From 6433a184618ca31095081c2ae68cb3e953f8c692 Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:26:23 +0000 Subject: [PATCH 07/13] docs: add a contributing guide --- CONTRIBUTING.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..7619f37 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,43 @@ +# Contributing + +Thanks for looking. Issues and pull requests are welcome: a wrong number, a light that behaves unlike the real +aircraft, a procedure out of order, a rendering glitch on your device, or a performance win. + +## Getting started + +```sh +npm install # dev tools only (TypeScript, Wrangler); the figure itself needs nothing installed +npm run build # a380/a380.html and a380/a380-light.html, about 25 s each +npm run check # the figure's checks and the flight-model test (CI runs these) +npm run typecheck # tsc over the files marked // @ts-check (CI runs this) +npm run site # the hosted one-page site in a380/dist, then `npm run serve` to try it on 127.0.0.1:8741 +``` + +Open the built page in a browser; it runs from `file://`. The browser checks in `a380/README.md` (frame times, +captures, audits) need a local Chrome or Chromium; set `CHROME_PATH` if it isn't found. + +## Where things live + +- `a380/model.mjs`: the truth model. Every size, rate and rule the figure shows comes from here. +- `a380/truth.md`: where each of those numbers comes from. +- `a380/parts/`: the airframe, cabin, gear, lights and stage, as the build draws them. +- `a380/gl/`: the WebGL programs (`shaders.mjs` writes the GLSL) and the per-frame passes. +- `a380/live.js`: the page runtime: interaction, the flight phases, the readout. +- `a380/DESIGN.md`: the design and the decisions behind it. Decision 0 matters most: features are never removed to + meet a performance budget; find speed elsewhere. +- `kit/`: the drawing kit from the Anatomy skill, with the 3D turn runtime and the WebGL painter. + +## Rules of the road + +- **Sources.** A new number goes in `model.mjs` with a tag: `[S]` read from a cited document, `[D]` derived from + sourced numbers, `[E]` an estimate or a figure decision, with the reason. Add the source to `truth.md`. +- **Both themes, both painters.** A visual change should look right in the dark and light themes, and with WebGL off + (`?painter=canvas`, or a browser without WebGL): the fallback draws what the shaders draw. +- **Comments.** The code explains why in its comments; keep that voice and density. +- **Types.** New or heavily changed modules should start with `// @ts-check` and carry JSDoc on what they export. +- **Commits.** Use [Conventional Commits](https://www.conventionalcommits.org/): `fix(lights): …`, `perf(gl): …`, + `docs: …`. Rebuilt pages are not committed; releases carry them. + +## Licence + +By contributing you agree that your work is released under the MIT licence in [`LICENSE`](LICENSE). From f9d837d8c1ec9a8cda69912028c2498601672118 Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:38:20 +0000 Subject: [PATCH 08/13] perf(gl): draw every window piece and wash target from uniform tables in one program each The windows (19 pieces in 11 programs, 18-34 KB each) and the washes (35 targets in 6 programs) baked each piece's hull planes, window stations, blinds, doorways and colours into its own GLSL function. Each piece or target is now a pass whose tables (windowPartData, washTargetData) are set as uniforms, so each family is one program (windows 13 KB, washes 8 KB) and the washes source no longer differs between the themes (the logo's daylight cap is a uniform). 25 programs become 10. Parity (reduced motion, paused, 15 states per theme): 0 px over 8 levels except two 2x2 spots (max 21) on window/door edges; uniform need 99 -> 167 vectors. --- a380/gl/passes.js | 17 ++- a380/gl/shaders.mjs | 304 +++++++++++++++++++++++++++++++----------- a380/parts/lights.mjs | 83 ++++-------- 3 files changed, 268 insertions(+), 136 deletions(-) diff --git a/a380/gl/passes.js b/a380/gl/passes.js index 26ae240..62f79b2 100644 --- a/a380/gl/passes.js +++ b/a380/gl/passes.js @@ -749,7 +749,7 @@ const A3M8 = (() => { active: (fx) => on("windows") && ((fx.pv.cabinLight ?? 0) > 1e-3 || st.doors.some((v) => v > 1e-3)), draw(fx, pass, spec) { const mask = ensureMask(fx); - const common = { ...mask, uDoors: st.doors, uCabin: [fx.pv.cabinLight, 0.85, st.blinds ?? 1, 0], uFirst: st.first, uNoDither: nd() }; + const common = { ...mask, uCabin: [fx.pv.cabinLight, 0.85, st.blinds ?? 1, 0], uFirst: st.first, uNoDither: nd() }; // a piece the page has faded out (an Inspect view) carries no lit windows either const faded = fadedRuns(fx); for (const w of M8.D.windows) { @@ -759,7 +759,15 @@ const A3M8 = (() => { if (!part) continue; const boxes = bandsOf(fx, w, part); if (!boxes.length) continue; - const v = { ...common, ...poseOf(fx, w.group, "uG"), uPass: w.pass, uTarget: idOf(fx, w.part) }; + // the piece's own tables (shaders.mjs windowPartData; one program draws every piece), as float32 once; uWDC's + // open term is each doorway's door channel this frame (st.doors by the doorway's slot; a missing one shut) + const T = w.table; + const u = (w.tableF ??= { uWP: new Float32Array(T.uWP), uWI: new Float32Array(T.uWI), uWR: new Float32Array(T.uWR), uWX: new Float32Array(T.uWX), uWB: new Float32Array(T.uWB), uWDA: new Float32Array(T.uWDA), uWDB: new Float32Array(T.uWDB), uWG: new Float32Array(T.uWG), uWDC: new Float32Array(4 * T.slots.length) }); + T.slots.forEach((slot, k) => { + u.uWDC[4 * k] = T.sig0[k]; + u.uWDC[4 * k + 1] = slot >= 0 ? st.doors[slot] ?? 0 : 0; + }); + const v = { ...common, ...u, ...poseOf(fx, w.group, "uG"), uPass: w.pass, uTarget: idOf(fx, w.part) }; for (const box of boxes) pass(v, box); probeInk(spec, `win:${w.part}`, part); } @@ -872,7 +880,10 @@ const A3M8 = (() => { if (w.kind === "scan" && st.levels.wing <= 1e-3 && st.levels.engine <= 1e-3) continue; const box = boxOf(fx, w.part, 2); if (!box) continue; - pass({ ...common, ...poseOf(fx, w.group, "uG"), uPass: w.pass, uTarget: idOf(fx, w.part) }, box); + // the target's own tables (shaders.mjs washTargetData; one program draws every target), as float32 once + const T = w.table; + const u = (w.tableF ??= { uXP: new Float32Array(T.uXP), uXI: T.uXI, uXC: new Float32Array(T.uXC), uXK: T.uXK }); + pass({ ...common, ...u, ...poseOf(fx, w.group, "uG"), uPass: w.pass, uTarget: idOf(fx, w.part) }, box); probeInk(spec, `wash:${w.part}`, box); } }, diff --git a/a380/gl/shaders.mjs b/a380/gl/shaders.mjs index cabd5cd..6e3ab01 100644 --- a/a380/gl/shaders.mjs +++ b/a380/gl/shaders.mjs @@ -783,6 +783,25 @@ export function planesOfPoints(points, convexHull3, grow = 0) { }); } +/** + * glslConvex's clip with its half-spaces in a uniform table (perf/gl-light-uniforms): `bool (o, d, out p, out n, + * out span)` over `table`[0 … count) (n, d), kit metres; the same p, n and span. The loop's bound is the table's size + * (WebGL 1 loops are constant) and it ends early at `count`, a uniform; a plane past the count adds nothing anyway. + */ +export function glslTableHull(name, table, count, size) { + return ` +bool ${name}(vec3 o,vec3 d,out vec3 p,out vec3 n,out float span){ + float tin=-1e9;float tout=1e9;bool any=false;n=vec3(0.,0.,1.); + for(int k=0;k<${size};k++){ + if(float(k)>=${count})break; + vec4 P=${table}[k];float den=dot(d,P.xyz);float num=P.w-dot(o,P.xyz); + if(den>1e-7){float t=num/den;if(t(o, d, out p, out n, * out span)`. p is the exit point (largest t: the surface nearest the viewer), n the face it leaves through, @@ -862,73 +881,96 @@ ${body.join("\n")} } /** - * One window-bearing part (DESIGN §6.2): its hull (the part's own faces), its window rows and its doorways. - * rows: [{ id, z (row centre), xs (stations, kit m), side (0 both, ±1), w, h, r, pitch }]; - * doors: [{ slot (0..19 into uDoors), x, z (centre), hw, hh, r, side, cargo }]. - * Returns `vec4 (o, d, level)`: dark glow or paper ink, x facing; the window rectangles live in each + * The window-bearing parts (DESIGN §6.2), one program for all of them (perf/gl-light-uniforms): each part is a pass + * whose hull, window rows and doorways come in as uniform tables (windowPartData), not as constants in the source. The + * baked form was a function per part (its planes, nearest-station trees, rows and doorways unrolled as literals), 19 + * functions in 11 programs of 18-34 KB; with the tables the program is one of about 10 KB, compiled once, and both themes + * compile the same source. The arithmetic is the baked form's, term for term: a missing row, blind or doorway is a + * table entry that adds nothing (near 0, a blind at index −100, a doorway shut). + * uWP[N.planes] the hull's half-spaces (n, d), kit metres; uWI.x their count, uWI.yz the part's x range + * uWR[2 N.rows] per row (z, w/2, h/2, r), (pitch, side 0|±1, id·7, j·17+3); a missing row sits at z 1e4 + * uWX[N.xs] per station c, both rows: (midpoint below it, station) of row 0, then of row 1; padding at 1e9 + * uWB[N.blinds] per blind, both rows: (index, side) of row 0, then of row 1; padding (−100, 0) + * uWDA/uWDB/uWDC[N.doors] per doorway (x, σ centre, hw, hσ), (r, band share, cargo 0|1, side), (σ at the first + * breakpoint, open: the page's door channel, set each frame); a missing one is shut + * uWG[N.doors·N.sig] each doorway's σ(z) segments (z, length, slope); padding of length 0 + * Returns `vec4 (o, d, level, cargo)`: dark glow or paper ink, x facing; the window rectangles live in each * hit facet's own frame (u along it, v the ring edge, as W.facetFrame), so they sit on the true surface. */ /** A closed blind's luminance in the windows program (lit from behind; 1 is a lit pane's rim, about 1.12 its core). */ export const BLIND_LUM = 0.1; -export function glslWindowPart(name, { planes, rows, doors, xr = null }, inks) { - const hit = glslConvex(`${name}Hit`, planes); - const nears = rows.map((row, j) => glslNearest(`${name}N${j}`, row.xs)).join("\n"); +/** The windows program's table sizes (the same in both themes; windowPartData throws for a part that does not fit). */ +export const WIN_N = { planes: 72, rows: 2, xs: 20, blinds: 4, doors: 4, sig: 8 }; +export function glslWindowPart(name, N, inks) { // Every fwidth() below runs in uniform control flow: no early return and no branch around it, because - // derivatives after a divergent branch are undefined (SwiftShader returned a different picture each draw). - const rowCode = rows - .map( - (row, j) => ` - {float i;float xi=${name}N${j}(p.x,i); - vec3 D=vec3(p.x-xi,0.,p.z-${f(row.z)});D.y=-(n.x*D.x+n.z*D.z)/ny; + // derivatives after a divergent branch are undefined (SwiftShader returned a different picture each draw). The loops + // have constant bounds (WebGL 1) and every table index is a loop index; the plane loop's early exit is on a uniform. + const rowCode = Array.from({ length: N.rows }, (_, j) => { + const [mid, x] = j ? ["z", "w"] : ["x", "y"]; + const [bk, bs] = j ? ["z", "w"] : ["x", "y"]; + return ` + {vec4 R=uWR[${2 * j}];vec4 Q=uWR[${2 * j + 1}]; + // the nearest station (the baked form's balanced if-tree: the upper one from each midpoint on) + float i=0.;float xi=uWX[0].${x}; + for(int c=1;c<${N.xs};c++){vec4 X=uWX[c];if(p.x>=X.${mid}){i=float(c);xi=X.${x};}} + vec3 D=vec3(p.x-xi,0.,p.z-R.x);D.y=-(n.x*D.x+n.z*D.z)/ny; vec2 q=vec2(dot(D,u),dot(D,v)); - float dd=sdRoundRect(q,${v2([row.w / 2, row.h / 2])},${f(row.r)}); + float dd=sdRoundRect(q,R.yz,R.w); float sharp=1.-smoothstep(-.5,.5,dd/FW(dd)); - float band=1.-smoothstep(-.5,.5,(abs(q.y)-${f(row.h / 2)})/FW(q.y)); - float fine=smoothstep(.3,.5,1./(pxPerM*${f(row.pitch)})); - float near=${row.side ? `step(0.,side*${f(row.side)})` : "1."}*(1.-step(${f(row.h / 2 + 0.7)},abs(p.z-${f(row.z)}))); - float c=mix(sharp,band*${f(row.w / row.pitch)},fine)*near; + float band=1.-smoothstep(-.5,.5,(abs(q.y)-R.z)/FW(q.y)); + float fine=smoothstep(.3,.5,1./(pxPerM*Q.x)); + float near=mix(1.,step(0.,side*Q.y),abs(Q.y))*(1.-step(R.z+.7,abs(p.z-R.x))); + float c=mix(sharp,band*(2.*R.y/Q.x),fine)*near; // the blinds are the fallback's (W.windowBlind, review round 3); the per-window shade varies 10%, not 26% (runs of // dimmer windows read as a whole piece losing its glow) // (uCabin.z the blinds channel, model.mjs: 1 at the stand, 0 all open from the pushback on, for take-off and landing) - float blind=1.-(1.-1.${(row.blinds ?? []).map(([k, sd]) => `*(1.-(1.-step(.5,abs(i-${f(k)})))*step(0.,side*${f(sd)}))`).join("")})*uCabin.z; + float shut=1.; + for(int b=0;b<${N.blinds};b++){vec4 B=uWB[b];shut*=1.-(1.-step(.5,abs(i-B.${bk})))*step(0.,side*B.${bs});} + float blind=1.-(1.-shut)*uCabin.z; // fu/r2-lights: a closed blind is a dim pane lit from behind (lum .1, flat), not a hole: black, it read darker than // the card (luminance 11 against 19, the skin 56) - float shade=(.9+.1*hash12(vec2(i+${f(row.id * 7)},${f(j * 17 + 3)}+side*31.)))*mix(${f(BLIND_LUM)},1.,blind); + float shade=(.9+.1*hash12(vec2(i+Q.z,Q.w+side*31.)))*mix(${f(BLIND_LUM)},1.,blind); float hot=mix(mix(1.,.62+.5*smoothstep(0.,-.03,dd),blind),.86,fine)*mix(shade,.8,fine); lum=mix(lum,hot,c);cov=max(cov,c);shutC=max(shutC,c*(1.-blind)); - halo+=near*(exp(-max(dd,0.)/.14)*(1.-smoothstep(.3,.55,dd))*shade*(1.-fine)+fine*band*.35)*(1.-smoothstep(.3,.55,abs(q.y)-${f(row.h / 2)})); - }`, - ) - .join(""); + halo+=near*(exp(-max(dd,0.)/.14)*(1.-smoothstep(.3,.55,dd))*shade*(1.-fine)+fine*band*.35)*(1.-smoothstep(.3,.55,abs(q.y)-R.z)); + }`; + }).join(""); // review fu-1: each opening in (x, σ) as skin.mjs cuts it (σ the section's arc length, piecewise linear in z on the // facets: dw.sig's breakpoints), so the ceiling never stands above the skin's opening; the carpet and ceiling planes are // the skin's 0.3 m bands (dw.band, inset) - const sigOf = (pts) => pts.slice(1).reduce((e, q, i) => `${e}+clamp(p.z-${f(pts[i][0])},0.,${f(q[0] - pts[i][0])})*${f((q[1] - pts[i][1]) / (q[0] - pts[i][0]))}`, f(pts[0][1])); - const doorCode = doors - .map((dw) => { - const fF = dw.band / (2 * dw.hs); - return ` - {float open=uDoors[${Math.floor(dw.slot / 4)}].${"xyzw"[dw.slot % 4]}*step(0.,side*${f(dw.side)}); - float sg=${sigOf(dw.sig)}; - float dd=sdRoundRect(vec2(p.x-${f(dw.x)},sg-${f(dw.s)}),${v2([dw.hw, dw.hs])},${f(dw.r)}); + const doorCode = ` + for(int k=0;k<${N.doors};k++){ + vec4 A=uWDA[k];vec4 B=uWDB[k];vec4 C=uWDC[k]; + float open=C.y*step(0.,side*B.w); + float sg=C.x; + for(int g=0;g<${N.sig};g++){vec4 S=uWG[k*${N.sig}+g];sg+=clamp(p.z-S.x,0.,S.y)*S.z;} + float dd=sdRoundRect(vec2(p.x-A.x,sg-A.y),A.zw,B.x); float c=(1.-smoothstep(-.5,.5,dd/FW(dd)))*open; // the cabin beyond the opening, plane by plane (not one vertical gradient): the carpet dark (.35) with the sill's // edge, the galley face at the warm peak, the ceiling at .8; the far jamb's face (the one the reader sees) lit, the // near edge in the near jamb's shade - float up=clamp((sg-${f(dw.s)})/${f(2 * dw.hs)}+.5,0.,1.); - float jw=clamp(.2*abs(d.x)/max(abs(d.y),.25),.03,${f(dw.hw * 0.5)}); - float sx=(p.x-${f(dw.x)})*(d.x>=0.?1.:-1.); - float tone=up<${f(fF)}?.35:(up<${f(1 - fF)}?1.:.8); - tone*=1.-.55*(1.-smoothstep(.0,.035,abs(up-${f(fF)}))); - float far=1.-smoothstep(-${f(dw.hw)}+jw-.02,-${f(dw.hw)}+jw+.02,sx); - float nearS=smoothstep(${f(dw.hw)}-.18,${f(dw.hw)}-.02,sx); + float fF=B.y; + float up=clamp((sg-A.y)/(2.*A.w)+.5,0.,1.); + float jw=clamp(.2*abs(d.x)/max(abs(d.y),.25),.03,A.z*.5); + float sx=(p.x-A.x)*(d.x>=0.?1.:-1.); + float tone=up.5?.52:.8)*tone; + dlum=mix(dlum,deep,c);dcov=max(dcov,c);dcargo=max(dcargo,c*B.z);dceil=max(dceil,c*smoothstep(1.-fF,1.-fF+.06,up)*(1.-far));}`; + return ` +uniform vec4 uWP[${N.planes}]; +uniform vec4 uWI; +uniform vec4 uWR[${2 * N.rows}]; +uniform vec4 uWX[${N.xs}]; +uniform vec4 uWB[${N.blinds}]; +uniform vec4 uWDA[${N.doors}]; +uniform vec4 uWDB[${N.doors}]; +uniform vec4 uWDC[${N.doors}]; +uniform vec4 uWG[${N.doors * N.sig}]; +${glslTableHull(`${name}Hit`, "uWP", "uWI.x", N.planes)} vec4 ${name}(vec3 o,vec3 d,float level,float cargo){ vec3 p;vec3 n;float span; bool hit=${name}Hit(o,d,p,n,span); @@ -936,7 +978,7 @@ vec4 ${name}(vec3 o,vec3 d,float level,float cargo){ float side=p.y>=0.?1.:-1.; // the outer skin only: a strip's inner face (seen through the lifted crown) carries no windows float keep=(hit?1.:0.)*step(0.,span)*smoothstep(.04,.3,dot(n,d))*step(.25,n.y*side); - ${xr ? `keep*=smoothstep(${f(xr[0] + 0.005)},${f(xr[0] + 0.025)},p.x)*(1.-smoothstep(${f(xr[1] - 0.025)},${f(xr[1] - 0.005)},p.x));` : ""} + keep*=smoothstep(uWI.y+.005,uWI.y+.025,p.x)*(1.-smoothstep(uWI.z-.025,uWI.z-.005,p.x)); float ny=side*max(abs(n.y),.25); vec3 v=normalize(vec3(0.,n.z,-ny));v*=sign(v.z+1e-6); vec3 u=normalize(cross(v,n)); @@ -977,6 +1019,88 @@ ${doorCode} }`; } +/** + * One window-bearing part's tables for glslWindowPart (the page sets them on its pass): { planes, rows, doors, xr } as + * the baked form took them (rows: [{ id, z, xs (sorted, kit m), side, w, h, r, pitch, blinds: [[k, side]] }]; doors: + * [{ slot (0..19 into the page's door channels), x, s, hw, hs, r, band, side, cargo, sig: [[z, σ]] }]). Numbers to 7 + * significant digits (float32 holds them; the baked literals had 5 decimals). `slots` lists each doorway's channel, for + * uWDC's open term; uWDC's σ terms are in `sig0`. + */ +export function windowPartData({ planes, rows, doors, xr }, N = WIN_N, part = "?") { + const over = (what, n, max) => { + if (n > max) throw new Error(`gl-shaders: window part ${part} has ${n} ${what}, the windows program holds ${max} (WIN_N)`); + }; + over("planes", planes.length, N.planes); + over("rows", rows.length, N.rows); + const r7 = (x) => { + if (!Number.isFinite(x)) throw new Error(`gl-shaders: non-finite window table value ${x} (${part})`); + return +x.toPrecision(7); + }; + const uWP = []; + for (let k = 0; k < N.planes; k++) uWP.push(...(planes[k] ? [...planes[k].n, planes[k].d] : [0, 0, 0, 1])); + const uWR = []; + const uWX = new Array(4 * N.xs).fill(0); + const uWB = new Array(4 * N.blinds).fill(0); + for (let j = 0; j < N.rows; j++) { + const row = rows[j]; + for (let c = 0; c < N.xs; c++) { + uWX[4 * c + 2 * j] = 1e9; + uWX[4 * c + 2 * j + 1] = 0; + } + for (let b = 0; b < N.blinds; b++) { + uWB[4 * b + 2 * j] = -100; + uWB[4 * b + 2 * j + 1] = 0; + } + if (!row) { + // a missing row: far from every fragment (near 0), with a pitch and size that keep its terms finite + uWR.push(1e4, 0.2, 0.2, 0.07, 1, 0, 0, 0); + continue; + } + const xs = row.xs.slice().sort((a, b) => a - b); + over("stations in a row", xs.length, N.xs); + over("blinds in a row", (row.blinds ?? []).length, N.blinds); + uWR.push(row.z, row.w / 2, row.h / 2, row.r, row.pitch, row.side, row.id * 7, j * 17 + 3); + xs.forEach((x, c) => { + uWX[4 * c + 2 * j] = c ? (xs[c - 1] + x) / 2 : -1e9; + uWX[4 * c + 2 * j + 1] = x; + }); + (row.blinds ?? []).forEach(([k, sd], b) => { + uWB[4 * b + 2 * j] = k; + uWB[4 * b + 2 * j + 1] = sd; + }); + } + over("doorways", doors.length, N.doors); + const uWDA = []; + const uWDB = []; + const uWG = []; + const slots = []; + const sig0 = []; + for (let k = 0; k < N.doors; k++) { + const dw = doors[k]; + if (!dw) { + // a missing doorway: shut (open 0), with a size that keeps its terms finite + uWDA.push(0, 0, 1, 1); + uWDB.push(0.1, 0.1, 0, 1); + for (let g = 0; g < N.sig; g++) uWG.push(0, 0, 0, 0); + slots.push(-1); + sig0.push(0); + continue; + } + over("σ segments in a doorway", dw.sig.length - 1, N.sig); + uWDA.push(dw.x, dw.s, dw.hw, dw.hs); + uWDB.push(dw.r, dw.band / (2 * dw.hs), dw.cargo ? 1 : 0, dw.side); + for (let g = 0; g < N.sig; g++) { + const a = dw.sig[g]; + const b = dw.sig[g + 1]; + uWG.push(...(a && b ? [a[0], b[0] - a[0], (b[1] - a[1]) / (b[0] - a[0]), 0] : [0, 0, 0, 0])); + } + slots.push(dw.slot); + sig0.push(dw.sig[0][1]); + } + const R = (list) => list.map(r7); + return { uWP: R(uWP), uWI: R([planes.length, xr ? xr[0] : -1e4, xr ? xr[1] : 1e4, 0]), uWR: R(uWR), uWX: R(uWX), uWB: R(uWB), uWDA: R(uWDA), uWDB: R(uWDB), uWG: R(uWG), slots, sig0: R(sig0) }; +} + /** * The cockpit (DESIGN §6.2): panes on the canopy loft, seen glowing from the flight deck, with the main * instrument panel behind them for parallax; and, with the canopy lifted, the cockpit group's displays. @@ -1134,53 +1258,83 @@ ${lifted} /** * A surface washed by lamps fixed on the airframe or a flap (DESIGN §6.2: logo on the fin, wing and engine * scan). Lamps come as uniforms in world kit units (uWS position, uWD direction, uWC = cos outer, cos inner, - * power x envelope, reach m); `slots` lists the lamps that can reach this target. hull: half-spaces; - * cone: { c, a, u, v, s0, s1, r0, r1 } kit metres (a nacelle row). `vec4 (o, d)`: ink ending at the - * outline stroke's inner edge, facing-correct, tinted (dark: glow; paper: tint capped at `cap`). + * power x envelope, reach m). One program for every target (perf/gl-light-uniforms): each target is a pass whose + * surface and colours come in as uniform tables (washTargetData), not as constants in the source (the baked form, a + * function per target, filled 6 programs of 27-32 KB; the logo's daylight cap differed between the themes): + * uXP[N.planes] a hull's half-spaces (n, d), kit metres; uXI.x their count, uXI.y the kind (0 hull, 1 cone) + * uXC[4] a cone (a nacelle row): (c, r0 − k s0), (u, k), (v, s0), (a, s1), kit metres + * uXK (logo 0|1, cap, paper gain, 0): the logo lamps (slots 0, 1) and the logo ink, laid by daylight as a + * multiply-like tint; else the scan lamps (slots 2-5) and the scan ink, a capped tint + * `vec4 (o, d)`: ink ending at the outline stroke's inner edge, facing-correct, tinted (dark: glow; paper: tint + * capped at `cap`). */ -export function glslWash(name, target, slots, colours) { - const lamps = slots - .map((k) => ` {vec4 C=uWC[${k}];if(C.z>0.){vec3 S=toG(uWS[${k}])*${f(KM)};vec3 D=normalize(dirToG(uWD[${k}]));e+=spotAt(p,n,S,D,C);}}`) - .join("\n"); - let surface; - if (target.hull) { - surface = `${glslConvex(`${name}Hit`, target.hull)} -float ${name}Surf(vec3 o,vec3 d,out vec3 p,out vec3 n){float span;bool h=${name}Hit(o,d,p,n,span);span=max(span,-1e3);return (h?1.:0.)*smoothstep(-.5,.5,span/FW(span)-strokePx())*smoothstep(.0,.12,dot(n,d));}`; - } else { - const c = target.cone; - const k = (c.r1 - c.r0) / (c.s1 - c.s0); - surface = ` +export const WASH_N = { planes: 36 }; +export function glslWash(name, N = WASH_N) { + return ` +uniform vec4 uXP[${N.planes}]; +uniform vec4 uXI; +uniform vec4 uXC[4]; +uniform vec4 uXK; +${glslTableHull(`${name}Hit`, "uXP", "uXI.x", N.planes)} float ${name}Surf(vec3 o,vec3 d,out vec3 p,out vec3 n){ - vec3 q=o-${v3(c.c)};vec3 Q=vec3(dot(q,${v3(c.u)}),dot(q,${v3(c.v)}),dot(q,${v3(c.a)}));vec3 E=vec3(dot(d,${v3(c.u)}),dot(d,${v3(c.v)}),dot(d,${v3(c.a)})); - float r0=${f(c.r0 - k * c.s0)};float k=${f(k)}; + p=o;n=vec3(0.,0.,1.); + // the kind is a uniform, so either branch is uniform control flow for its fwidth() + if(uXI.y<.5){float span;bool h=${name}Hit(o,d,p,n,span);span=max(span,-1e3);return (h?1.:0.)*smoothstep(-.5,.5,span/FW(span)-strokePx())*smoothstep(.0,.12,dot(n,d));} + vec3 c=uXC[0].xyz;float r0=uXC[0].w;vec3 cu=uXC[1].xyz;float k=uXC[1].w;vec3 cv=uXC[2].xyz;float s0=uXC[2].w;vec3 ca=uXC[3].xyz;float s1=uXC[3].w; + vec3 q=o-c;vec3 Q=vec3(dot(q,cu),dot(q,cv),dot(q,ca));vec3 E=vec3(dot(d,cu),dot(d,cv),dot(d,ca)); float A=E.x*E.x+E.y*E.y-k*k*E.z*E.z;float B=Q.x*E.x+Q.y*E.y-k*(r0+k*Q.z)*E.z;float Cq=Q.x*Q.x+Q.y*Q.y-(r0+k*Q.z)*(r0+k*Q.z); - float h=B*B-A*Cq;p=o;n=vec3(0.,0.,1.); + float h=B*B-A*Cq; if(abs(A)<1e-8)return 0.; float sq=sqrt(max(h,0.));float t=(-B+sq)/A;float t2=(-B-sq)/A;if(t2>t){float x=t;t=t2;t2=x;} float s=Q.z+t*E.z; p=o+t*d;vec3 L=Q+t*E;vec3 nl=normalize(vec3(L.x,L.y,-k*(r0+k*L.z))); - n=nl.x*${v3(c.u)}+nl.y*${v3(c.v)}+nl.z*${v3(c.a)}; + n=nl.x*cu+nl.y*cv+nl.z*ca; float rim=smoothstep(-.5,.5,h/FW(h)-strokePx()); - float ends=smoothstep(-.5,.5,(s-${f(c.s0)})/FW(s)-strokePx())*smoothstep(-.5,.5,(${f(c.s1)}-s)/FW(s)-strokePx()); + float ends=smoothstep(-.5,.5,(s-s0)/FW(s)-strokePx())*smoothstep(-.5,.5,(s1-s)/FW(s)-strokePx()); return rim*ends*step(0.,h)*smoothstep(.0,.12,dot(n,d)); -}`; - } - return `${surface} +} vec4 ${name}(vec3 o,vec3 d){ vec3 p;vec3 n;float cov=${name}Surf(o,d,p,n); if(cov<=0.)return vec4(0.); + bool logo=uXK.x>.5; float e=0.; -${lamps} + for(int k=0;k<6;k++){ + if(logo?k>1:k<2)continue; + vec4 C=uWC[k];if(C.z>0.){vec3 S=toG(uWS[k])*${f(KM)};vec3 D=normalize(dirToG(uWD[k]));e+=spotAt(p,n,S,D,C);} + } e*=cov; - vec4 dark=glowOf(${v3(colours.dark)}*e); - ${colours.mul ? `// a multiply-like tint (review round 3): the face's own grey pulled warm, its cover tonemapped from the lamps' energy - // so the wash falls off with height (a yellow over the blue-grey paint read as an olive slab at its cap) - float wa=${f(colours.cap)}*(1.-exp(-${f(colours.paperGain ?? 1)}*e)); - vec4 paper=vec4(${v3(colours.mul)}*wa,wa);` : `vec4 paper=tintInk(e*${f(colours.paperGain ?? 1)},${v3(colours.tint)},${f(colours.cap)});`} + vec4 dark=glowOf((logo?${inkU("logo")}:${inkU("scan")})*e); + // the logo by daylight: a multiply-like tint (review round 3): the face's own grey pulled warm, its cover tonemapped + // from the lamps' energy so the wash falls off with height (a yellow over the blue-grey paint read as an olive slab at + // its cap); the scan: a capped tint + float wa=uXK.y*(1.-exp(-uXK.z*e)); + vec4 paper=logo?vec4(${inkU("logo")}*wa,wa):tintInk(e*uXK.z,${inkU("scan")},uXK.y); return mix(dark,paper,uLight); }`; } +/** A wash target's tables for glslWash (the page sets them on its pass): target { hull } or { cone }, colours as + * lights.mjs gives them ({ logo, cap, paperGain }). Numbers to 7 significant digits. */ +export function washTargetData(target, { logo, cap, paperGain = 1 }, N = WASH_N, part = "?") { + const r7 = (x) => { + if (!Number.isFinite(x)) throw new Error(`gl-shaders: non-finite wash table value ${x} (${part})`); + return +x.toPrecision(7); + }; + const uXP = []; + const uXC = new Array(16).fill(0); + let count = 0; + if (target.hull) { + if (target.hull.length > N.planes) throw new Error(`gl-shaders: wash target ${part} has ${target.hull.length} planes, the washes program holds ${N.planes} (WASH_N)`); + count = target.hull.length; + } else { + const c = target.cone; + const k = (c.r1 - c.r0) / (c.s1 - c.s0); + uXC.splice(0, 16, ...c.c, c.r0 - k * c.s0, ...c.u, k, ...c.v, c.s0, ...c.a, c.s1); + } + for (let i = 0; i < N.planes; i++) uXP.push(...(target.hull && target.hull[i] ? [...target.hull[i].n, target.hull[i].d] : [0, 0, 0, 1])); + return { uXP: uXP.map(r7), uXI: [count, target.hull ? 0 : 1, 0, 0], uXC: uXC.map(r7), uXK: [logo ? 1 : 0, cap, paperGain, 0].map(r7) }; +} + /** * One point light per pass (DESIGN §6.2 `points`): uPt (x, y viewBox, lens radius viewBox, energy), uPtC * (dark rgb, halo scale), uPtP (paper body rgb, white rule 0|1), uPtV (housing paint index, tap radius vb). diff --git a/a380/parts/lights.mjs b/a380/parts/lights.mjs index 68aff72..e430880 100644 --- a/a380/parts/lights.mjs +++ b/a380/parts/lights.mjs @@ -98,22 +98,6 @@ export const WASH_SLOTS = { logo: [0, 1], wing: [2, 3], engine: [4, 5] }; const N_LAMPS = 24; // --------------------------------------------------------------------------------------------- helpers -/** - * Consecutive groups { from, to } of generated functions, each holding at most `budget` characters of them (at least - * one function a group). Follow-up item 34: a program's compile and link time on this machine's GPU grows with its - * source at about 4-5 ms per KB, and no program may take over about 200 ms. - */ -const CHUNK_BUDGET = 26 * 1024; -export function chunksOf(sources, budget) { - const out = []; - let cur = null; - sources.forEach((s, k) => { - if (!cur || (cur.size + s.length > budget && cur.to > cur.from)) out.push((cur = { from: k, to: k, size: 0 })); - cur.to = k + 1; - cur.size += s.length; - }); - return out; -} const unit = (a) => { const l = Math.hypot(a[0], a[1], a[2]) || 1; return [a[0] / l, a[1] / l, a[2] / l]; @@ -473,12 +457,10 @@ export function build(ctx) { // ---- windows: one pass per window-bearing piece (its own faces), rows and doorways from W and the model const wparts = windowParts(W, M); - const winFns = []; let frustumOk = 0; wparts.forEach((wp, k) => { const part = ctx.part(wp.name); if (!part) throw new Error(`M8: window piece ${wp.name} was not built`); - const fn = `win${k}`; // the piece's surface: glslFrustumPolygon over W.loft's rings and clip flats (homothetic nose and tail rings, // S0 on the barrel, the belt strips), checked against the built part's own faces; the faces win a mismatch const planes = loftPlanes(W, wp.name, part); @@ -487,7 +469,7 @@ export function build(ctx) { // the piece's own x range (kit metres): its window ink stops at its joints (a tan tick ran down every joint) const shell = W.SHELL.find((p) => p.name === wp.name); const xr = [W.PIVOT_X - shell.x[1], W.PIVOT_X - shell.x[0]]; - winFns.push(SH.glslWindowPart(fn, { planes: planes.match ? planes.loft : SH.planesOfHull(part), rows: wp.rows, doors: wp.doors, xr }, SURF)); + const table = SH.windowPartData({ planes: planes.match ? planes.loft : SH.planesOfHull(part), rows: wp.rows, doors: wp.doors, xr }, SH.WIN_N, wp.name); // scissor bands: each row's two ends on each side's skin, and each doorway's centre, with the reach of // their ink (half the window height plus the 0.55 m glow; a doorway's half diagonal), kit units const onSkin = (x, z, side) => W.kit(W.facetFrame(x, z, side).o).map((v) => Math.round(v * 100) / 100); @@ -502,29 +484,25 @@ export function build(ctx) { const c = onSkin(x, dw.z, dw.side); bands.push({ a: c, b: c, r: W.m(Math.hypot(dw.hw, dw.hh) + 0.15) }); } - page.windows.push({ pass: k, part: wp.name, group: wp.group, rows: wp.rows.reduce((a, r) => a + r.xs.length * (r.side ? 1 : 2), 0), doors: wp.doors.map((d) => d.id), bands }); + page.windows.push({ pass: k, part: wp.name, group: wp.group, table, rows: wp.rows.reduce((a, r) => a + r.xs.length * (r.side ? 1 : 2), 0), doors: wp.doors.map((d) => d.id), bands }); }); const nWin = page.windows.reduce((a, w) => a + w.rows, 0); const nDoor = page.windows.reduce((a, w) => a + w.doors.length, 0); report.push(`windows: ${nWin} windows and ${nDoor} doorways on ${wparts.length} pieces; glslFrustumPolygon matches the built faces on ${frustumOk}`); const COMMON = `${SH.GLSL_COMMON}${SH.GLSL_MASK}`; - // split into chunks of whole pieces (follow-up item 34): one program held all 19 pieces and took 0.7-0.9 s to compile - const WINDOWS = chunksOf(winFns, CHUNK_BUDGET).map(({ from, to }) => ({ - from, - to, - fragment: `${COMMON}${glslPose("G")} -uniform vec4 uDoors[5]; + // one program for every piece (perf/gl-light-uniforms): each piece's hull, rows and doorways are uniform tables set on + // its pass (SH.windowPartData, page.windows[k].table). Follow-up item 34 had split the baked form, a function per + // piece with every number a literal, into 11 programs of 18-34 KB (one held all 19 pieces and took 0.7-0.9 s to compile) + const WINDOWS = `${COMMON}${glslPose("G")} uniform vec4 uCabin; -${winFns.slice(from, to).join("\n")} +${SH.glslWindowPart("winPart", SH.WIN_N, SURF)} void main(){ vec2 vb=viewOf(gl_FragCoord.xy); vec3 o=toG(rayOf(vb))*${f(KM)};vec3 d=normalize(dirToG(towardViewer())); - vec4 ink=vec4(0.); - ${winFns.slice(from, to).map((_, j) => `${j ? "else " : ""}if(uPass<${f(from + j + 0.5)})ink=win${from + j}(o,d,uCabin.x,uCabin.y);`).join("\n ")} + vec4 ink=winPart(o,d,uCabin.x,uCabin.y); gl_FragColor=finish(ink*visibleOf(uTarget)*uFirst*edgeFade(vb)); -}`, - })); - WINDOWS.forEach((c, i) => ctx.glEffect({ id: `windows.${i}`, family: "windows", chunk: [c.from, c.to], canvas: "air", fragment: c.fragment, uniforms: ["uGX", "uGY", "uGZ", "uGT", "uDoors", "uCabin", "uPass", "uTarget", "uMaskInfo", "uFirst", "uNoDither"] })); +}`; + ctx.glEffect({ id: "windows", canvas: "air", fragment: WINDOWS, uniforms: ["uGX", "uGY", "uGZ", "uGT", "uWP", "uWI", "uWR", "uWX", "uWB", "uWDA", "uWDB", "uWDC", "uWG", "uCabin", "uPass", "uTarget", "uMaskInfo", "uFirst", "uNoDither"] }); // ---- cockpit: panes on the canopy (cut.fd) with the panel behind them; the lifted displays (cockpit group) const canopy = ctx.part("nose.canopy"); @@ -584,9 +562,9 @@ void main(){ // by daylight too: a warm paper tint (cap .18, gain 3: a tint near .1 reads grey on white paint), so the Logo switch // shows on the light page // review round 3: by daylight a multiply-like warm tint of the fin's own grey, tonemapped (no flat slab at a cap) - for (const name of finParts) washTargets.push({ name, kind: "logo", slots: WASH_SLOTS.logo, colours: { dark: SH.inkU("logo"), cap: LIGHT_THEME ? 0.3 : 0, paperGain: 3, mul: SH.inkU("logo") } }); - for (const name of scanTargetNames(ctx, W)) washTargets.push({ name, kind: "scan", slots: [...WASH_SLOTS.wing, ...WASH_SLOTS.engine], colours: { dark: SH.inkU("scan"), tint: SH.inkU("scan"), cap: 0.15 } }); - const washFns = washTargets.map((t, k) => { + for (const name of finParts) washTargets.push({ name, kind: "logo", slots: WASH_SLOTS.logo, colours: { logo: true, cap: LIGHT_THEME ? 0.3 : 0, paperGain: 3 } }); + for (const name of scanTargetNames(ctx, W)) washTargets.push({ name, kind: "scan", slots: [...WASH_SLOTS.wing, ...WASH_SLOTS.engine], colours: { logo: false, cap: 0.15 } }); + washTargets.forEach((t, k) => { const part = ctx.part(t.name); let target; if (part.kind === "hull") target = { hull: SH.planesOfHull(part) }; @@ -597,33 +575,24 @@ void main(){ u = unit(u); const v = cross(a, u); target = { cone: { c: mul(Wd.F.o, KM), a, u, v, s0: Wd.s0 * KM, s1: Wd.s1 * KM, r0: Wd.r0 * KM, r1: Wd.r1 * KM } }; - } else return null; - page.washes.push({ pass: k, part: t.name, group: part.group.name ?? "pitch", kind: t.kind }); - return SH.glslWash(`wash${k}`, target, t.slots, t.colours); + } else return; + page.washes.push({ pass: k, part: t.name, group: part.group.name ?? "pitch", kind: t.kind, table: SH.washTargetData(target, t.colours, SH.WASH_N, t.name) }); }); - // split into chunks of whole targets (follow-up item 34: one program of 35 targets took 0.7 s to compile) - const WASHES = chunksOf(washFns.map((s) => s ?? ""), CHUNK_BUDGET).map(({ from, to }) => ({ - from, - to, - fragment: `${COMMON}${glslPose("G")} + // one program for every target (perf/gl-light-uniforms): each target's surface and colours are uniform tables set on + // its pass (SH.washTargetData, page.washes[k].table), so the program is the same in both themes. Follow-up item 34 had + // split the baked form, a function per target, into 6 programs (one of all 35 targets took 0.7 s to compile) + const WASHES = `${COMMON}${glslPose("G")} uniform vec3 uWS[6]; uniform vec3 uWD[6]; uniform vec4 uWC[6]; -${washFns.slice(from, to).filter(Boolean).join("\n")} +${SH.glslWash("wash")} void main(){ vec2 vb=viewOf(gl_FragCoord.xy); vec3 o=toG(rayOf(vb))*${f(KM)};vec3 d=normalize(dirToG(towardViewer())); - vec4 ink=vec4(0.); - ${washFns - .slice(from, to) - .map((s, j) => (s ? from + j : -1)) - .filter((k) => k >= 0) - .map((k, j) => `${j ? "else " : ""}if(uPass<${f(k + 0.5)})ink=wash${k}(o,d);`) - .join("\n ")} + vec4 ink=wash(o,d); gl_FragColor=finish(ink*visibleOf(uTarget)*uFirst*edgeFade(vb)); -}`, - })); - WASHES.forEach((c, i) => ctx.glEffect({ id: `washes.${i}`, family: "washes", chunk: [c.from, c.to], canvas: "air", fragment: c.fragment, uniforms: ["uGX", "uGY", "uGZ", "uGT", "uWS", "uWD", "uWC", "uPass", "uTarget", "uMaskInfo", "uFirst", "uNoDither"] })); +}`; + ctx.glEffect({ id: "washes", canvas: "air", fragment: WASHES, uniforms: ["uGX", "uGY", "uGZ", "uGT", "uWS", "uWD", "uWC", "uXP", "uXI", "uXC", "uXK", "uPass", "uTarget", "uMaskInfo", "uFirst", "uNoDither"] }); report.push(`washes: ${washTargets.length} targets (${washTargets.filter((t) => t.kind === "logo").length} logo)`); // ---- lights: one pass per point light and per lamp lens (the `points` kind; id "lights") @@ -746,13 +715,11 @@ void main(){ fallbacks(ctx, page, stand, report); // ---- page: data, the frame hook, CSS - const sum = (list) => list.reduce((a, c) => a + c.fragment.length, 0); - const most = (list) => Math.max(...list.map((c) => c.fragment.length)); - page.sources = { windows: sum(WINDOWS), cockpit: COCKPIT.length, engines: ENGINES.length, washes: sum(WASHES), ground: GROUND.length }; + page.sources = { windows: WINDOWS.length, cockpit: COCKPIT.length, engines: ENGINES.length, washes: WASHES.length, ground: GROUND.length }; ctx.data("m8", page); ctx.script(`A3.on("frame", (fx) => A3M8.frame(fx));\nA3M8.attach(A3);`); ctx.css(`${SH.inkCss()}\n${CSS}\n${windowPaperCss()}\n${lensCss()}`); - report.push(`programs: ${Object.entries(page.sources).map(([k, v]) => `${k} ${(v / 1024).toFixed(0)} KB`).join(", ")}; windows in ${WINDOWS.length} programs (largest ${(most(WINDOWS) / 1024).toFixed(0)} KB), washes in ${WASHES.length} (largest ${(most(WASHES) / 1024).toFixed(0)} KB)`); + report.push(`programs: ${Object.entries(page.sources).map(([k, v]) => `${k} ${(v / 1024).toFixed(0)} KB`).join(", ")}`); for (const line of report) ctx.report(line); void v3; } From baa854550c8b2cab05336253702f123083e474f0 Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:43:43 +0000 Subject: [PATCH 09/13] perf(gl): one nacelle function placed by a per-pass uniform The engines program held four copies of the inlet, fan and spinner, each with its nacelle's position as literals (27 KB, the slowest program left at about 200 ms). One function now takes uEng (y, z, lip plane) and uRun/uGain on each nacelle's pass (11 KB). Parity: unchanged from the previous commit in both themes. --- a380/gl/passes.js | 6 +++--- a380/gl/shaders.mjs | 33 +++++++++++++++++---------------- a380/parts/lights.mjs | 15 ++++++--------- 3 files changed, 26 insertions(+), 28 deletions(-) diff --git a/a380/gl/passes.js b/a380/gl/passes.js index 62f79b2..f83ebca 100644 --- a/a380/gl/passes.js +++ b/a380/gl/passes.js @@ -856,11 +856,11 @@ const A3M8 = (() => { const phase = (fx.pv.fanPhase ? fx.pv.fanPhase[e.i] : 0) * e.sense; const R = e.r * 10 * k + 3; const box = [a.screen[0] - R, a.screen[1] - R, a.screen[0] + R, a.screen[1] + R]; - const v = { ...mask, ...pose, uPass: e.i, uTarget: idOf(fx, e.part), uFirst: st.first, uNoDither: nd() }; + const v = { ...mask, ...pose, uEng: e.eng, uPass: e.i, uTarget: idOf(fx, e.part), uFirst: st.first, uNoDither: nd() }; // the once-per-rev mark: in with N1 from rest, out once its own blur passes a radian const mark = smooth(0.003, 0.03, n1) * (1 - smooth(0.8, 2.2, omega * st.exposure)); - v[`uRun${e.i}`] = [phase, fx.calm ? stillGain(omega * st.exposure, 0.3) : blurGain(omega * st.exposure), n1, mark]; - v[`uGain${e.i}`] = fx.calm ? fanGainsStill(omega, st.exposure, D.fan.blades) : fanGains(omega, st.exposure, D.fan.blades); + v.uRun = [phase, fx.calm ? stillGain(omega * st.exposure, 0.3) : blurGain(omega * st.exposure), n1, mark]; + v.uGain = fx.calm ? fanGainsStill(omega, st.exposure, D.fan.blades) : fanGains(omega, st.exposure, D.fan.blades); pass(v, box); probeInk(spec, `eng:${e.n}`, box); } diff --git a/a380/gl/shaders.mjs b/a380/gl/shaders.mjs index 6e3ab01..ccf3e0b 100644 --- a/a380/gl/shaders.mjs +++ b/a380/gl/shaders.mjs @@ -1488,28 +1488,29 @@ float beamPools(vec3 g){ /** * The inlet, fan and spinner of one nacelle (DESIGN §6.2 `engines`), from the seeded glslEngine with every * fwidth() in uniform control flow (no early return after a per-pixel test; d is uniform: the camera is - * orthographic). e: kit metres { y, z, xl (lip plane), ri (M4's inlet disc), depth (lip to fan), rs, ls - * (spinner), blades, twist, slit, spiral }. uRun = (fan phase × sense, spinner gain, n1, 0); uGain = - * blade harmonic gains (fanGains). The fan turns clockwise as the reader sees the inlet (sense from the build). + * orthographic). One function for the four nacelles (perf/gl-light-uniforms: the baked form was a copy a nacelle, its + * place in literals): uEng = (y, z, xl (lip plane), 0) kit metres, set on each nacelle's pass; e: the fan, kit metres + * { ri (M4's inlet disc), depth (lip to fan), rs, ls (spinner), blades, twist, slit, spiral }. uRun = (fan phase × + * sense, spinner gain, n1, mark gain); uGain = blade harmonic gains (fanGains). The fan turns clockwise as the reader + * sees the inlet (sense from the build). */ /** The spinner's painted spiral stripe: half its width, in radians of the spinner's angle (fu/f4-wings). */ export const SPIRAL_HW = 0.1; -export function glslNacelle(i, e) { - const C = v2([e.y, e.z]); - const xf = e.xl - e.depth; - const k2 = (e.rs / e.ls) ** 2; +export function glslNacelle(e) { return ` -uniform vec4 uRun${i}; -uniform vec4 uGain${i}; -vec4 engine${i}(vec3 o,vec3 d){ - vec4 run=uRun${i};vec4 g=uGain${i}; +uniform vec4 uEng; +uniform vec4 uRun; +uniform vec4 uGain; +vec4 engine(vec3 o,vec3 d){ + vec4 run=uRun;vec4 g=uGain; + vec2 C=uEng.xy;float xl=uEng.z;float xf=xl-${f(e.depth)}; if(d.x<.015)return vec4(0.); float face=smoothstep(.015,.12,d.x); - vec3 pl=o+((${f(e.xl)}-o.x)/d.x)*d;float rl=length(pl.yz-${C}); + vec3 pl=o+((xl-o.x)/d.x)*d;float rl=length(pl.yz-C); float open=(1.-smoothstep(-.5,.5,(rl-${f(e.ri)})/FW(rl)+strokePx()))*face; - vec3 pf=o+((${f(xf)}-o.x)/d.x)*d;vec2 w=pf.yz-${C};float rf=length(w); - vec2 wall=cylX(o,d,${C},${f(e.ri)}); - float depth=clamp((${f(e.xl)}-(o.x+wall.x*d.x))/${f(e.depth)},0.,1.); + vec3 pf=o+((xf-o.x)/d.x)*d;vec2 w=pf.yz-C;float rf=length(w); + vec2 wall=cylX(o,d,C,${f(e.ri)}); + float depth=clamp((xl-(o.x+wall.x*d.x))/${f(e.depth)},0.,1.); float onWall=smoothstep(-.5,.5,(rf-${f(e.ri)})/FW(rf)); float r=rf/${f(e.ri)}; float u=${f(e.blades)}*(atan(w.y,w.x)-run.x)+${f(e.twist)}*r; @@ -1530,7 +1531,7 @@ vec4 engine${i}(vec3 o,vec3 d){ // the spinner (review round 3): half an ellipsoid on the fan plane (semi-axes ls forward, rs across), one surface with // one near root, so no mirrored nappe and no far root can be drawn (the double cone drew a half cone and a pale wedge // beside it, with a speckled seam where the root choice flipped); soft at its silhouette and base - vec3 w0=o-vec3(${f(xf)},${f(e.y)},${f(e.z)}); + vec3 w0=o-vec3(xf,C); // fu/wings: solve from the ray's closest approach to the base centre: from o itself (far up the ray) qb*qb and qa*qc // are large and nearly equal, and their float difference stepped near the silhouette (the dotted, stepped edge, R18 R39) w0+=(-dot(w0,d)/dot(d,d))*d; diff --git a/a380/parts/lights.mjs b/a380/parts/lights.mjs index e430880..8be165c 100644 --- a/a380/parts/lights.mjs +++ b/a380/parts/lights.mjs @@ -538,21 +538,18 @@ void main(){ const sv = S([o[0], o[1], o[2] + 10]); return (su[0] - s0[0]) * (sv[1] - s0[1]) - (su[1] - s0[1]) * (sv[0] - s0[0]) > 0 ? 1 : -1; })(); - const engFns = W.NACELLE.map((N, i) => { - const e = { y: N.y, z: N.cz, xl: W.PIVOT_X - N.lip, len: 8.39, rn: 1.94, ri: FAN.ri, depth: FAN.depth, rs: FAN.rs, ls: FAN.ls, blades: FAN.blades, twist: FAN.twist, slit: FAN.slit, spiral: FAN.spiral }; - page.engines.push({ i, n: N.id, part: `eng.${N.id}.lip`, at: W.kit([N.lip, N.y, N.cz]), r: 1.94, sense }); - return SH.glslNacelle(i, e); - }); + // one function for the four nacelles, each placed by its pass's uEng (page.engines[i].eng: y, z, the lip plane x) + W.NACELLE.forEach((N, i) => page.engines.push({ i, n: N.id, part: `eng.${N.id}.lip`, at: W.kit([N.lip, N.y, N.cz]), r: 1.94, sense, eng: [N.y, N.cz, W.PIVOT_X - N.lip, 0] })); + const ENGINE = SH.glslNacelle({ ri: FAN.ri, depth: FAN.depth, rs: FAN.rs, ls: FAN.ls, blades: FAN.blades, twist: FAN.twist, slit: FAN.slit, spiral: FAN.spiral }); const ENGINES = `${COMMON}${glslPose("Plane")} -${engFns.join("\n")} +${ENGINE} void main(){ vec2 vb=viewOf(gl_FragCoord.xy); vec3 o=toPlane(rayOf(vb))*${f(KM)};vec3 d=normalize(dirToPlane(towardViewer())); - vec4 ink=vec4(0.); - ${W.NACELLE.map((_, i) => `${i ? "else " : ""}if(uPass<${f(i + 0.5)})ink=engine${i}(o,d);`).join("\n ")} + vec4 ink=engine(o,d); gl_FragColor=finish(ink*visibleOf(uTarget)*uFirst*edgeFade(vb)); }`; - ctx.glEffect({ id: "engines", canvas: "air", fragment: ENGINES, uniforms: ["uPlaneX", "uPlaneY", "uPlaneZ", "uPlaneT", ...W.NACELLE.flatMap((_, i) => [`uRun${i}`, `uGain${i}`]), "uPass", "uTarget", "uMaskInfo", "uFirst", "uNoDither"] }); + ctx.glEffect({ id: "engines", canvas: "air", fragment: ENGINES, uniforms: ["uPlaneX", "uPlaneY", "uPlaneZ", "uPlaneT", "uEng", "uRun", "uGain", "uPass", "uTarget", "uMaskInfo", "uFirst", "uNoDither"] }); // ---- washes: logo on the fin pieces (by day a warm darkening of the fin's paint, cap .3, gain 3, R > G > B), wing // scan on the outer box tops and slats, engine scan on the cowls From 89e32d1da88e1cb7fdba57f1591672f6a84ec0bb Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 14:48:09 +0000 Subject: [PATCH 10/13] perf(gl): one source for both themes in the runway, volumes and ground programs These three families still generated different GLSL per theme (the dark glow or the daylight paper rule, and the night-only beacon, strobe and beam terms). Each now carries both rules, chosen by uLight, which is fixed per page. Every one of the 10 programs is now byte-identical in the dark and light builds, so after a theme switch the browser's shader cache links them again at once. Parity: unchanged from the previous commits in both themes; build --check passes for both themes. --- a380/gl/runway.mjs | 54 +++++++++++++++++++++---------------------- a380/parts/lights.mjs | 49 ++++++++++++++++++--------------------- 2 files changed, 48 insertions(+), 55 deletions(-) diff --git a/a380/gl/runway.mjs b/a380/gl/runway.mjs index 4203b32..3523519 100644 --- a/a380/gl/runway.mjs +++ b/a380/gl/runway.mjs @@ -26,10 +26,13 @@ const { f, v3 } = glsl; * runway-end lights across the runway at the threshold, which the page passes in uThr.x) * window: [r0, r1] platter radius (units) where the pixel window falls from 1 to 0; lightWindow: same, per light. */ +// Both themes' rules are in the one source (perf/gl-light-uniforms), chosen by uLight (fixed per page): the dark glow +// and the daylight paper ink. The source is then the same in both themes, so after a theme switch the browser's shader +// cache links the program again at once (`theme` is kept for callers and no longer changes the GLSL). export function runwayFragment({ rows, bar, repeat, window, lightWindow, theme = "dark" }) { - const paperInk = theme === "light"; - const rowCode = rows.map((R, i) => rowAlong(R, i, repeat, lightWindow, paperInk)).join("\n"); - const barCode = bar ? rowAcross(bar, paperInk) : ""; + void theme; + const rowCode = rows.map((R, i) => rowAlong(R, i, repeat, lightWindow)).join("\n"); + const barCode = bar ? rowAcross(bar) : ""; return `${GLSL_COMMON} ${glslPose("Air")} uniform vec3 uScroll; // per set (stand, taxi, runway): scroll along platter +x, units, in [0, repeat) @@ -62,14 +65,15 @@ void main(){ if(win<=0.||uLevel<=0.){gl_FragColor=vec4(0.);return;} vec2 va=uThr.zw; float bidir=mix(.35,1.,smoothstep(.15,.85,abs(va.x))); // inset lights beam along the runway, both ways - ${paperInk ? "vec4 paper=vec4(0.);" : "vec3 glow=vec3(0.);"} + bool paperInk=uLight>.5; + vec4 paper=vec4(0.);vec3 glow=vec3(0.); // the platter frame on screen: project(fromAir(p)) = PO + p.x PX + p.y PY + p.z PZ (affine), shared by every row vec2 PO=uAxO.xy;vec2 PX=uAxO.zw;vec2 PY=uAxYZ.xy;vec2 PZ=uAxYZ.zw; float lX=length(PX);vec2 hX=PX/lX; ${rowCode} ${barCode} - ${paperInk ? "if(paper.a<=0.){gl_FragColor=vec4(0.);return;}" : "if(glow.r+glow.g+glow.b<=0.){gl_FragColor=vec4(0.);return;}"} // far from every light - vec4 ink=${paperInk ? "paper" : "glowOf(glow)"}*win*uLevel; + if(paperInk?paper.a<=0.:glow.r+glow.g+glow.b<=0.){gl_FragColor=vec4(0.);return;} // far from every light + vec4 ink=(paperInk?paper:glowOf(glow))*win*uLevel; gl_FragColor=finish(ink*uFirst*edgeFade(vb)); }`; } @@ -80,7 +84,7 @@ const comp = (set) => ["x", "y", "z"][set]; // Gaussians) and a coloured pool; paper (daylight rule): a glint with a small rim and a pale core, and no pavement tint // (review fu-1: a .05 tint still read as a pink stain 17 CSS px round each red light; a runway light does not tint the // pavement by day, webgl.md 8.3). -function rowAlong(R, i, repeat, lightWindow, paperInk) { +function rowAlong(R, i, repeat, lightWindow) { const c = comp(R.set); const s = R.set; const gate = R.range @@ -94,19 +98,14 @@ function rowAlong(R, i, repeat, lightWindow, paperInk) { // (a colour may come as its ink uniform, follow-up item 35: the rim and core are then GLSL of it) const rim = typeof R.paper === "string" ? `(${R.paper}*.86)` : v3(R.paper.map((x) => x * 0.86)); const core = typeof R.paper === "string" ? `mix(vec3(1.),${R.paper},.12)` : v3(R.paper.map((x) => 1 - 0.12 * (1 - x))); - const point = paperInk - ? `float rp=rl*1.6; - float eP=lens*1.2+core*2.4+exp(-r2/(rp*rp))*.5;` - : `float rh2=rh*rh; - float eP=lens*1.2+core*1.4+exp(-r2/rh2)*.55+exp(-r2/(rh2*4.))*.18;`; - const streak = paperInk - ? `eS=lensS*1.2+coreS*2.4+combStreak(u,lam,bl,rp)*exp(-pw*pw/(rp*rp))*.5;` - : `eS=lensS*1.2+coreS*1.4+combStreak(u,lam,bl,rh)*exp(-pw*pw/rh2)*.55+combStreak(u,lam,bl,rh*2.)*exp(-pw*pw/(rh2*4.))*.18;`; - const ink = paperInk - ? `vec4 lampP=lampInk(eP*g,${rim},${body},${core},.95)*lw; + const point = `float rp=rl*1.6;float rh2=rh*rh; + float eP=paperInk?lens*1.2+core*2.4+exp(-r2/(rp*rp))*.5:lens*1.2+core*1.4+exp(-r2/rh2)*.55+exp(-r2/(rh2*4.))*.18;`; + const streak = `eS=paperInk?lensS*1.2+coreS*2.4+combStreak(u,lam,bl,rp)*exp(-pw*pw/(rp*rp))*.5:lensS*1.2+coreS*1.4+combStreak(u,lam,bl,rh)*exp(-pw*pw/rh2)*.55+combStreak(u,lam,bl,rh*2.)*exp(-pw*pw/(rh2*4.))*.18;`; + const ink = `if(paperInk){ + vec4 lampP=lampInk(eP*g,${rim},${body},${core},.95)*lw; vec4 lampS=ws>0.?lampInk(eS*g,${rim},${body},${core},.95)*gateS:vec4(0.); - paper=over(mix(lampP,lampS,ws)*w*wG,paper);` - : `glow+=${dark}*(mix(eP*lw,eS*gateS,ws)*g*wG+pl*.32)*w;`; + paper=over(mix(lampP,lampS,ws)*w*wG,paper); + }else glow+=${dark}*(mix(eP*lw,eS*gateS,ws)*g*wG+pl*.32)*w;`; return ` // row ${i}: set ${s}, y ${R.y}, pitch ${R.pitch}${R.inset ? ", inset bidirectional" : ", elevated"} if(uSetMix.${c}>0.){ float s${i}=uScroll.${c};float dd=uStreak.${c}; @@ -159,26 +158,25 @@ function rowAlong(R, i, repeat, lightWindow, paperInk) { // The threshold (green toward the approach, -x) and runway-end (red toward the runway, +x) lights: one row // across the runway at the threshold, which moves with the runway set. Each light streaks on its own. -function rowAcross(B, paperInk) { +function rowAcross(B) { const c = comp(B.set); const n = B.count; const gD = v3(B.green.dark); const rD = v3(B.red.dark); const gP = v3(B.green.paper); const rP = v3(B.red.paper); - const point = paperInk ? `float rp=rl*1.6;float eP=lens*1.2+core*2.4+exp(-r2/(rp*rp))*.5;` : `float eP=lens*1.2+core*1.4+exp(-r2/(rh*rh))*.55+exp(-r2/(rh*rh*4.))*.18;`; - const streak = paperInk - ? `eS=segStreak(sp,len,sl)*exp(-pw*pw/(sl*sl))*1.2+segStreak(sp,len,sc)*exp(-pw*pw/(sc*sc))*2.4+segStreak(sp,len,rp)*exp(-pw*pw/(rp*rp))*.5;` - : `eS=segStreak(sp,len,sl)*exp(-pw*pw/(sl*sl))*1.2+segStreak(sp,len,sc)*exp(-pw*pw/(sc*sc))*1.4 + const point = `float rp=rl*1.6;float eP=paperInk?lens*1.2+core*2.4+exp(-r2/(rp*rp))*.5:lens*1.2+core*1.4+exp(-r2/(rh*rh))*.55+exp(-r2/(rh*rh*4.))*.18;`; + const streak = `eS=paperInk?segStreak(sp,len,sl)*exp(-pw*pw/(sl*sl))*1.2+segStreak(sp,len,sc)*exp(-pw*pw/(sc*sc))*2.4+segStreak(sp,len,rp)*exp(-pw*pw/(rp*rp))*.5 + :segStreak(sp,len,sl)*exp(-pw*pw/(sl*sl))*1.2+segStreak(sp,len,sc)*exp(-pw*pw/(sc*sc))*1.4 +segStreak(sp,len,rh)*exp(-pw*pw/(rh*rh))*.55+segStreak(sp,len,rh*2.)*exp(-pw*pw/(rh*rh*4.))*.18;`; // each face has its own directional lobe and the two never overlap: side-on both fall to dark (review fu-1: one colour // mixed toward the other across 70° of bearings read olive, salmon or brown side-on); by day no pavement tint - const ink = paperInk - ? `vec3 pp=gW>rW?${gP}:${rP}; + const ink = `if(paperInk){ + vec3 pp=gW>rW?${gP}:${rP}; vec4 lampP=lampInk(eP*g,pp*.86,pp,mix(vec3(1.),pp,.12),.95); vec4 lampS=ws>0.?lampInk(eS*g,pp*.86,pp,mix(vec3(1.),pp,.12),.95):vec4(0.); - paper=over(mix(lampP,lampS,ws)*w*wB,paper);` - : `glow+=(gW>rW?${gD}:${rD})*(mix(eP,eS,ws)*g+pl*.3)*w*wB;`; + paper=over(mix(lampP,lampS,ws)*w*wB,paper); + }else glow+=(gW>rW?${gD}:${rD})*(mix(eP,eS,ws)*g+pl*.3)*w*wB;`; return ` // threshold and runway-end lights across the runway at uThr.x if(uSetMix.${c}>0.&&uThr.y>0.){ float tx=uThr.x;float dd=uStreak.${c}; diff --git a/a380/parts/lights.mjs b/a380/parts/lights.mjs index 8be165c..7597b4c 100644 --- a/a380/parts/lights.mjs +++ b/a380/parts/lights.mjs @@ -622,22 +622,10 @@ void main(){ const hexRgb = (h) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16) / 255); page.winPaper = { rim: SH.GL_INKS.winRim.light, body: SH.GL_INKS.win.light, core: SH.GL_INKS.winCore.light, glass: hexRgb("#b9c3cc"), layers: { amber: hexRgb("#e1b162"), rim: P.rim.map((v) => Math.round(v * 255) / 255), core: P.core.map((v) => Math.round(v * 255) / 255) } }; } - if (LIGHT_THEME) { - const VOLUMES_PAPER = `${COMMON}${glslPose("Plane")}${proxyGlsl(px)}${hazeGlsl} -uniform vec4 uHaze; -uniform float uApu; -void main(){ - vec2 vb=viewOf(gl_FragCoord.xy); - vec3 o=toPlane(rayOf(vb))*${f(KM)};vec3 d=normalize(dirToPlane(towardViewer())); - float tAir=airT(o,d); - float hz=${hazeSum("1.")}; - if(hz<=0.){gl_FragColor=vec4(0.);return;} - gl_FragColor=finish(${hazePaper("hz")}*uFirst*edgeFade(vb)*frameFade()); -}`; - ctx.glEffect({ id: "volumes", canvas: "air", fragment: VOLUMES_PAPER, uniforms: ["uPlaneX", "uPlaneY", "uPlaneZ", "uPlaneT", "uHaze", "uApu", "uFrame", "uFirst", "uNoDither"] }); - } - if (!LIGHT_THEME) { - const VOLUMES = `${COMMON}${glslPose("Plane")}${proxyGlsl(px)}${hazeGlsl}${SH.glslLamps(N_LAMPS)} + // one source for both themes (perf/gl-light-uniforms), the rule chosen by uLight (fixed per page): by daylight the + // haze alone, as a paper tint; at night the beams' front halves and the haze, as glow. The same source in both themes + // lets the browser's shader cache link it again at once after a theme switch + const VOLUMES = `${COMMON}${glslPose("Plane")}${proxyGlsl(px)}${hazeGlsl}${SH.glslLamps(N_LAMPS)} uniform vec4 uHaze; uniform float uApu; uniform float uSteps; @@ -646,13 +634,18 @@ void main(){ vec3 p0=rayOf(vb)*${f(KM)};vec3 V=towardViewer(); vec3 o=toPlane(rayOf(vb))*${f(KM)};vec3 d=normalize(dirToPlane(V)); float tAir=airT(o,d); + if(uLight>.5){ + float hz=${hazeSum("1.")}; + if(hz<=0.){gl_FragColor=vec4(0.);return;} + gl_FragColor=finish(${hazePaper("hz")}*uFirst*edgeFade(vb)*frameFade()); + return; + } float air=beams(p0,V,tAir,1.,uSteps); float hz=${hazeSum("1.")}; vec4 ink=glowOf(${SH.inkU("beam")}*air*.9+${SH.inkU("haze")}*.1*(1.-exp(-hz*3.))); gl_FragColor=finish(ink*uFirst*edgeFade(vb)*frameFade()); }`; - ctx.glEffect({ id: "volumes", canvas: "air", fragment: VOLUMES, uniforms: ["uPlaneX", "uPlaneY", "uPlaneZ", "uPlaneT", "uLS", "uLD", "uLC", "uHaze", "uApu", "uSteps", "uFrame", "uFirst", "uNoDither"] }); - } + ctx.glEffect({ id: "volumes", canvas: "air", fragment: VOLUMES, uniforms: ["uPlaneX", "uPlaneY", "uPlaneZ", "uPlaneT", "uLS", "uLD", "uLC", "uHaze", "uApu", "uSteps", "uFrame", "uFirst", "uNoDither"] }); // ---- ground: pools (platter-windowed), and in dark the beacon and strobe washes and the back halves // the pools fade to 0 over the last 1.4 m inside the platter (36.6-38.0 m), not in a rim-hugging 0.8 m: a pool that @@ -672,18 +665,21 @@ void main(){ float plat=1.-smoothstep(${f(w0)},${f(w1)},length(g.xy)); // every ground-lit term fades with the true height (uWashH): the ground is far below once airborne float pool=lampPools(g)*plat*uWashH; - ${ - LIGHT_THEME - ? `vec4 ink=tintInk(pool*.9,${SH.inkU("pool")},.06);` + // daylight: a floodlight pool on concrete barely shows - // fu/r2-lights: the back half of the daylight heat haze, inside its own box (as the dark page's back halves) - ` + // (one source for both themes, perf/gl-light-uniforms: the daylight rule under uLight, then the night's) + if(uLight>.5){ + // daylight: a floodlight pool on concrete barely shows + vec4 ink=tintInk(pool*.9,${SH.inkU("pool")},.06); + // fu/r2-lights: the back half of the daylight heat haze, inside its own box (as the dark page's back halves) if((uHaze.x+uHaze.y+uHaze.z+uHaze.w+uApu>0.)&&vb.x>uVolBox.x&&vb.y>uVolBox.y&&vb.x0.)ink=over(${hazePaper("hz")}*frameFade(),ink); - }` - : `vec3 Lb=uBeacon.xyz*${f(KM)}-g;float lb=dot(Lb,Lb); + } + gl_FragColor=finish(ink*uFirst*edgeFade(vb)); + return; + } + vec3 Lb=uBeacon.xyz*${f(KM)}-g;float lb=dot(Lb,Lb); // the lower beacon's pool: a red tint on the pavement, below the lamp pools (review fu-1: 90/(d²+1) clipped to R 247 // under the belly, the loudest thing on the platter once a second); a wide soft law, peak about R 120 under the lens float rb=sqrt(lb); @@ -702,8 +698,7 @@ void main(){ float hz=vol?${hazeSum("0.")}:0.; // the back halves of the beams and the haze fade toward the card's frame over 40 CSS px (follow-up item 24); the pools // lie on the platter, inside it - vec4 ink=glowOf(${SH.inkU("pool")}*pool+${SH.inkU("beacon")}*beacon+${SH.inkU("strobe")}*flash+(${SH.inkU("beam")}*air*.9+${SH.inkU("haze")}*.1*(1.-exp(-hz*3.)))*frameFade());` - } + vec4 ink=glowOf(${SH.inkU("pool")}*pool+${SH.inkU("beacon")}*beacon+${SH.inkU("strobe")}*flash+(${SH.inkU("beam")}*air*.9+${SH.inkU("haze")}*.1*(1.-exp(-hz*3.)))*frameFade()); gl_FragColor=finish(ink*uFirst*edgeFade(vb)); }`; ctx.glEffect({ id: "ground", canvas: "ground", fragment: GROUND, uniforms: ["uPlaneX", "uPlaneY", "uPlaneZ", "uPlaneT", "uLS", "uLD", "uLC", "uBeacon", "uVolBox", "uStrobe", "uHaze", "uApu", "uSteps", "uWashH", "uFrame", "uFirst", "uNoDither"] }); From 4d2aa9e6711813a30b7328de32cb2fb9a0fb5375 Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 15:00:54 +0000 Subject: [PATCH 11/13] perf(gl): keep the build-constant cockpit passes out of the drawn cockpit program The registration-driven cockpit program (one pane or display a pass, from M2's and M7's targets) also carried the baked canopy hull, pane outlines and lifted displays of the build-constant passes, which only cockpit.all calls (27 of its 42 KB). It now carries only what it calls (13 KB); cockpit.all, compiled only in a build without those targets, is unchanged. Parity: unchanged from the previous commits in both themes. --- a380/gl/shaders.mjs | 32 +++++++++++++++++++------------- a380/parts/lights.mjs | 9 ++++----- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/a380/gl/shaders.mjs b/a380/gl/shaders.mjs index ccf3e0b..3686a2e 100644 --- a/a380/gl/shaders.mjs +++ b/a380/gl/shaders.mjs @@ -1108,7 +1108,7 @@ export function windowPartData({ planes, rows, doors, xr }, N = WIN_N, part = "? * x: [X0, X1] (kit m), inset }]. panel: { X (kit m, faces kit −x), half (y), displays: [{ y, z, w, h, kind }] }. * displays (lifted): [{ c, u, v, n (kit m, cockpit frame), w, h, kind }]. */ -export function glslCockpit({ canopy, panes, panel, displays }, inks) { +export function glslCockpit({ canopy, panes, panel, displays }, inks, constant = true) { const paneSd = panes.map((pane, i) => glslPolygonSd(`paneSd${i}`, pane.poly)).join("\n"); // a display's picture: kind 0 PFD (sky over ground, horizon, speed and altitude tapes), 1 ND (compass arc, // route), 2 EWD (four N1 dials, memo lines), 3 SD (synoptic lines), 4 MFD (text rows). q in [-.5,.5]^2. @@ -1175,10 +1175,12 @@ vec3 screenOf(float kind,vec2 q,float qp,out float lit){ if(c>0.){float l;vec3 s=screenOf(${f(dp.kind)},g/${v2([dp.w, dp.h])},pixelOf()*${f(KM)}/${f(Math.min(dp.w, dp.h))}/max(dn,.15),l);col=mix(col,s,c);lit=mix(lit,l,c);cov=max(cov,c);}}}`, ) .join("\n"); - return `${glslConvex("canopyHit", canopy)} + // the build-constant passes (every pane on the canopy, every lifted display), baked: only the program that draws them + // carries them (perf/gl-light-uniforms: 27 of the registration-driven program's 42 KB were these, never called there) + const constantFns = `${glslConvex("canopyHit", canopy)} ${paneSd} -${content} -vec4 cockpitPanes(vec3 o,vec3 d,float level){ +`; + const panesFn = `vec4 cockpitPanes(vec3 o,vec3 d,float level){ vec3 p;vec3 n;float span; bool hit=canopyHit(o,d,p,n,span); p=hit?p:o; @@ -1198,7 +1200,18 @@ ${cells} vec4 paper=lampInk(1.7+1.6*disp,${v3(inks.cockpitRim)},${v3(inks.cockpitBody)},${v3(inks.cockpitCore)},.9)*level; return mix(dark,paper,uLight)*pane*face; } -// registration-driven passes (one pane or one display per pass, from M2's and M7's glTargets): a planar +`; + const displaysFn = ` +vec4 cockpitDisplays(vec3 o,vec3 d,float level){ + vec3 col=vec3(0.);float lit=0.;float cov=0.; +${lifted} + if(cov<=0.)return vec4(0.); + vec4 dark=glowOf(col*(.6+1.6*lit))*cov; + vec4 paper=inkFor(mix(${inkU("screen")},col,.35+.65*lit),.97)*cov; + return mix(dark,paper,uLight)*level; +}`; + return `${constant ? constantFns : ""}${content} +${constant ? panesFn : ""}// registration-driven passes (one pane or one display per pass, from M2's and M7's glTargets): a planar // polygon of up to 32 vertices in its own (u, v) frame, and a display rectangle with its picture uniform vec3 uPO;uniform vec3 uPU;uniform vec3 uPV;uniform vec3 uPN; uniform vec2 uPoly[32]; @@ -1245,14 +1258,7 @@ vec4 cockpitDisplayU(vec3 o,vec3 d,float level){ vec4 paper=inkFor(mix(${inkU("screen")},col,.35+.65*lit),.97)*c; return mix(dark,paper,uLight)*level; } -vec4 cockpitDisplays(vec3 o,vec3 d,float level){ - vec3 col=vec3(0.);float lit=0.;float cov=0.; -${lifted} - if(cov<=0.)return vec4(0.); - vec4 dark=glowOf(col*(.6+1.6*lit))*cov; - vec4 paper=inkFor(mix(${inkU("screen")},col,.35+.65*lit),.97)*cov; - return mix(dark,paper,uLight)*level; -}`; +${constant ? displaysFn : ""}`; } /** diff --git a/a380/parts/lights.mjs b/a380/parts/lights.mjs index 7597b4c..b125cdc 100644 --- a/a380/parts/lights.mjs +++ b/a380/parts/lights.mjs @@ -512,18 +512,17 @@ void main(){ // two programs (follow-up item 34): the registration-driven passes the page draws (2: one pane, 3: one display; id // "cockpit", which the cabin's display fallback looks for) and the build-constant ones (0: every pane, 1: every // display) kept for a build without M2's or M7's targets; one program held both and took 160 ms to compile - const COCKPIT_GLSL = SH.glslCockpit({ canopy: SH.planesOfHull(canopy), panes, panel: deck.panel, displays: deck.displays }, SURF); - const cockpitOf = (call) => `${COMMON}${glslPose("G")} + const cockpitOf = (call, constant) => `${COMMON}${glslPose("G")} uniform vec4 uCk; -${COCKPIT_GLSL} +${SH.glslCockpit({ canopy: SH.planesOfHull(canopy), panes, panel: deck.panel, displays: deck.displays }, SURF, constant)} void main(){ vec2 vb=viewOf(gl_FragCoord.xy); vec3 o=toG(rayOf(vb))*${f(KM)};vec3 d=normalize(dirToG(towardViewer())); vec4 ink=${call}; gl_FragColor=finish(ink*visibleOf(uTarget)*uFirst*edgeFade(vb)); }`; - const COCKPIT = cockpitOf("uPass<2.5?cockpitPaneU(o,d,uCk.x):cockpitDisplayU(o,d,uCk.y)"); - const COCKPIT_ALL = cockpitOf("uPass<.5?cockpitPanes(o,d,uCk.x):cockpitDisplays(o,d,uCk.y)"); + const COCKPIT = cockpitOf("uPass<2.5?cockpitPaneU(o,d,uCk.x):cockpitDisplayU(o,d,uCk.y)", false); + const COCKPIT_ALL = cockpitOf("uPass<.5?cockpitPanes(o,d,uCk.x):cockpitDisplays(o,d,uCk.y)", true); const ckUniforms = ["uGX", "uGY", "uGZ", "uGT", "uCk", "uPO", "uPU", "uPV", "uPN", "uPoly", "uPInfo", "uPass", "uTarget", "uMaskInfo", "uFirst", "uNoDither"]; ctx.glEffect({ id: "cockpit", family: "cockpit", chunk: [2, 4], canvas: "air", fragment: COCKPIT, uniforms: ckUniforms }); ctx.glEffect({ id: "cockpit.all", family: "cockpit", chunk: [0, 2], canvas: "air", fragment: COCKPIT_ALL, uniforms: ckUniforms }); From 7fea0928da7e9d91eb6ee1b51d590e7eddfdffe4 Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 15:07:21 +0000 Subject: [PATCH 12/13] docs(gl): record the GL start-up measurements and the program families README: the before/after of the uniform-table programs (programs, GLSL bytes, first light, the switch, parity) and the lights note (the fade now dominates first light; the windows program's uniform-vector count). harness.js: the chunk comments name cockpit, the one family still split. --- a380/README.md | 29 +++++++++++++++++++++++++++-- a380/gl/harness.js | 7 ++++--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/a380/README.md b/a380/README.md index 8990366..e5e333f 100644 --- a/a380/README.md +++ b/a380/README.md @@ -341,6 +341,28 @@ Before is the release at 02ab044 (its two pages and the redirecting index); afte | `build.mjs --check`, `scripts/lines.mjs` | | check passed (both themes); line ends 0 of 630 float (both pages and the site page) | | `site-check --layout` / `--nojs` | | passed, both themes, 320 × 568 to 1440 × 900 (44 px touch targets) | +### Measured: GL start-up (perf/gl-light-uniforms, 2026-10-12, forge, Radeon 8060S through ANGLE GL, headless Chrome) + +The window pieces, wash targets and nacelles now draw from uniform tables set on each pass (one program a family, not +a function a piece with its numbers as literals), the drawn cockpit program no longer carries the build-constant passes, +and the runway, volumes and ground programs carry both themes' rules under `uLight`: every program is the same source +in both themes. Before is aa17152. + +| | Before | After | +|---|---|---| +| Programs compiled; GLSL (payload `gl.effects` fragments, dark) | 25; 677 KB (632 KB compiled) | 10; 184 KB (139 KB compiled) | +| Sources differing between the themes | 5 programs | none | +| Uniform vectors, largest program | 99 | 167 (windows) | +| Cold load, `site-check --timing` medians, desktop: mounted / first light | 293 / 6,532 ms | 287 / 4,996 ms | +| Cold load, phone (390, 4× CPU, 4G): mounted / first light | 1,731 / 9,868 ms | 1,587 / 6,766 ms | +| Every program linked, after the mount (desktop, 3 runs); then the fade to glShare 0.999 | 2.24–2.41 s; 3.7 s | 0.98–1.06 s; 3.7 s | +| A switch (prefetched), dark to light at 1440: new figure / programs linked / lights whole | 0.15 / 1.59–1.62 / 5.35–5.39 s | 0.15–0.17 / 0.75–0.77 / 4.30–4.54 s | +| Parity (`--reduced`, paused, no dither; gate ×2, doors ×2, cutaway, Inspect Cockpit, Upper deck, Engine 2, push, taxi, line-up ×2, take-off ×2, climb; `png-diff` over 8 levels) | run against run: 0 px (max 8) | 0 px in 28 of 30 shots (max 8); dark doors b100 and Inspect Upper deck 4 px each (one 2 × 2 spot at a window edge, max 15 and 21) | +| `build.mjs --check` (both themes), `model-test`, `site-check --layout`, `?painter=canvas`, no WebGL | passed | passed; console clean | + +After a switch the programs come from the browser's shader cache, but at one in flight they still take two frames +each; most of the switch's time to whole lights, and of first light, is now the fade. + ## Measured: the finished figure (2026-10-11, 22:52–23:45 UTC) The shipping pages and `a380/dist/` were checked against `main` at 5f7c95b (sources identical to 92d6ad6: @@ -509,8 +531,11 @@ round's larger deck (2,463 live elements against 1,690). The Node frame is 0.1 (`jointCaps`) is not adopted yet; the pylon flank is a flat face, shaded flat. The intake lip's gradients use 2 pieces while the figure moves and 4 at rest (about 25–30% less lip draw time). A 1 px fin/rudder strip shows at 219° (the fin's trailing-edge face passing edge-on). -- **Lights and WebGL.** First light takes 9–11 s under machine load: the 25 programs compile one at a time in the GPU - process (profiled; nothing in the page's code is left to cut). The heat haze is drawn in both themes with WebGL and +- **Lights and WebGL.** The 10 programs (perf/gl-light-uniforms: 25 before, 632 KB of GLSL now 139 KB) link about + 1 s after the mount at 1440; most of first light is now the fade from the fallbacks to GL (`settle(glShare, 1, dt, + 0.4)`, critically damped: half way in 0.65 s, at 0.999 after 3.7 s), which runs again after a theme switch. The + windows program holds 72 hull planes a pass: 167 uniform vectors (99 before), within the 221–224 of the smallest + common WebGL 1 limit but not of a 128-vector one. The heat haze is drawn in both themes with WebGL and not at all without it. Without WebGL the night washes, pools, beams and runway lights are screen-blended as the GL canvases are, and the lamp lenses use the GL mask's cover rule (the nose-strut lens blob at b10 is gone); still: each beam is a flat banded shaft, the logo bands show faint contour seams at DPR 2, at DPR 1 the runway lights lack GL's diff --git a/a380/gl/harness.js b/a380/gl/harness.js index dbf673e..3a5d906 100644 --- a/a380/gl/harness.js +++ b/a380/gl/harness.js @@ -31,8 +31,9 @@ const A3GL = (() => { // a time from the first animation frame after init and polled each frame through COMPLETION_STATUS_KHR, so the page // is not blocked while the GPU compiles: the fallbacks stay up (glShare 0) until every program has linked, then first light fades GL in as // before. Without the extension (or with A3GL.serial set before init) each program compiles and links at init - // through the kit's glLayer, as before. The heavy programs come split into chunks under about 200 ms each - // (DATA.gl.effects entries with a `family`: windows.0, windows.1 … draw with the family's page spec). + // through the kit's glLayer, as before. A program may come split into chunks (DATA.gl.effects entries with a + // `family`: cockpit and cockpit.all draw with the family's page spec); the windows and washes, once 17 chunks, are one + // program each since their pieces' numbers became uniform tables (perf/gl-light-uniforms). const GL_ATTRS = { premultipliedAlpha: true, alpha: true, antialias: false, preserveDrawingBuffer: false }; /** Start one program without waiting for it: { gl, ready(), finish(opts) → layer | null }. */ function startLayer({ canvas, fragment, extensions = [] }) { @@ -271,7 +272,7 @@ const A3GL = (() => { const errors = []; // every effect shipped with a fragment in DATA.gl.effects compiles here; page-registered effects bring theirs // a later registration of an id replaces an earlier one (M8 request 0: the harness's own "points" is registered - // first, M8's after it). A chunk of a split program (`family`: windows.2 of windows) takes its family's page spec + // first, M8's after it). A chunk of a split program (`family`: cockpit.all of cockpit) takes its family's page spec // and keeps its own id, fragment and chunk const last = (id) => registered.filter((r) => r.id === id).pop(); const ids = [...new Set(registered.map((r) => r.id))]; From e762d030c3e37e73a20d30906254bc656c6ce598 Mon Sep 17 00:00:00 2001 From: Charlie Joseph Date: Mon, 12 Oct 2026 15:11:29 +0000 Subject: [PATCH 13/13] docs: drop pointers to the unpublished working notes Code comments named files under a380/notes/ that are not in the public repository. They keep their labels (kit patch 15, f3-engine E5) without the dead path, and DESIGN.md and a380/README.md say where their remaining notes/ references lead. --- a380/DESIGN.md | 4 ++++ a380/README.md | 6 +++++- a380/build.mjs | 8 ++++---- a380/gl/harness.js | 2 +- a380/gl/shaders.mjs | 2 +- a380/parts/cabin.mjs | 3 +-- a380/parts/engines.mjs | 5 ++--- a380/parts/fuselage.mjs | 2 +- a380/parts/gear.mjs | 2 +- a380/parts/nose.mjs | 2 +- a380/parts/skin.mjs | 2 +- a380/parts/stage.mjs | 2 +- a380/parts/tail.mjs | 4 ++-- a380/parts/wings.mjs | 2 +- a380/tools/lines-sites.mjs | 2 +- a380/tools/model-test.mjs | 2 +- a380/world.mjs | 2 +- kit/audit.mjs | 4 ++-- kit/gl.mjs | 2 +- kit/hull3.mjs | 2 +- kit/turn-audit.mjs | 8 ++++---- kit/turn-build.mjs | 26 +++++++++++++------------- kit/turn-fixed.mjs | 22 +++++++++++----------- kit/turn-patch9-control.mjs | 2 +- kit/turn.mjs | 22 +++++++++++----------- 25 files changed, 73 insertions(+), 67 deletions(-) diff --git a/a380/DESIGN.md b/a380/DESIGN.md index c5d4266..582de81 100644 --- a/a380/DESIGN.md +++ b/a380/DESIGN.md @@ -1,5 +1,9 @@ # A380 figure: design (revision 2) +> References to `notes/` (status, audits, kit patches, the module contract, follow-up packages) point to the +> working notes kept while the figure was built. They are not part of this repository; the code and these +> documents carry the decisions that matter. + This is the design for `a380/a380.html` (dark) and `a380/a380-light.html` (light), written by `node a380/build.mjs [--light]`. It replaces revision 1 after three critics' reviews (feasibility, fidelity, craft). Every finding and how it was resolved is in §12. The work is done by these roles: diff --git a/a380/README.md b/a380/README.md index e5e333f..4be99ef 100644 --- a/a380/README.md +++ b/a380/README.md @@ -1,5 +1,9 @@ # Airbus A380-800 · Fig 1 +> References to `notes/` (status, audits, kit patches, the module contract, follow-up packages) point to the +> working notes kept while the figure was built. They are not part of this repository; the code and these +> documents carry the decisions that matter. + An interactive, true-3D cutaway drawing of an Airbus A380-800 on a turntable, built with the Anatomy skill's 3D mode (`kit/turn-build.mjs`, `kit/turn.mjs`) and WebGL (`kit/gl.mjs`) for every light, glow and effect. It is one self-contained HTML page with no network requests: @@ -585,6 +589,6 @@ Features the figure does not have yet, each costed in `notes/followup/PLAN.md` - `parts/` (stage, nose, fuselage, skin, wings, tail, engines, gear, cabin with `cabin-plan.mjs` and `cabin-furniture.mjs`, lights, tug), `gl/` (shaders, passes, mask, runway); - `tools/` (model test, stowed-gear test, the sharded full audit, path checks, captures); -- `DESIGN.md`, `truth.md`, `notes/` (status, audits, kit patches, GL and 3D cookbooks, the module contract). +- `DESIGN.md`, `truth.md`. - Captures of the finishing round's merge are in `shots/f3-merge/` (each track's in `shots/f3//`), of the release in `shots/final-3/` and of the finished figure in `shots/final-4/` locally, those of the follow-up merges in `shots/sort-merge/`, `shots/followup-ship/` and `shots/followup-merge-1/` (`a380/shots/` is not committed). diff --git a/a380/build.mjs b/a380/build.mjs index c4bb3de..ac51794 100644 --- a/a380/build.mjs +++ b/a380/build.mjs @@ -45,7 +45,7 @@ const QUICK = flag("quick"); const CHECK = flag("check"); const BENCH = flag("bench"); const LITE = flag("lite"); -// f4-engine (a380/notes/followup/f4-engine.md): --elevations=42[,50] proves the order data at those camera elevations too +// f4-engine: --elevations=42[,50] proves the order data at those camera elevations too // (T.build's `elevations`, kit E1) and adds the audit's sweep at each (`sweep@42°`); no option, no change. For a view // that will adopt `$elevation` (the Cockpit view) and for the full audit's elevated shard const ELEVATIONS = (option("elevations") ?? "").split(",").filter(Boolean).map(Number); @@ -397,12 +397,12 @@ if (TURN_CACHE && existsSync(TURN_CACHE)) { if (TURN_CACHE) writeFileSync(TURN_CACHE, JSON.stringify({ data: out.data, css: out.css, svg: out.svg, svgBare: out.svgBare, verify: out.verify, report: { parts: out.report.parts, groups: out.report.groups, layers: out.report.layers, seconds: out.report.seconds } })); } report(`built ${out.report.parts} parts, ${out.report.groups} groups in ${out.report.seconds.toFixed(1)} s · ${out.report.layers.map((l) => `${l.name}: ${l.parts} parts, ${l.planar} planar, ${l.framed} framed, ${l.groupPairs} group pairs, ${l.dynamic} dynamic`).join(" · ")}`); -// kit patch 9 and the framed-plane sets (a380/notes/kit-patches.md 9, 23): what they did, logged with the build +// kit patch 9 and the framed-plane sets (kit patches 9, 23): what they did, logged with the build if (out.report.patch9) { const p9 = out.report.patch9; report(`patch 9: framed planes checked on every distinct relative pose (at most ${p9.poses} per group and frame, ${p9.capped} lists capped at 256): ${p9.failed} planes failed between the 24 sampled poses, ${p9.reframed} framed again, ${p9.dynamic} left dynamic${p9.names.length ? ` (${p9.names.join(", ")}${p9.failed > p9.names.length ? ", …" : ""})` : ""}`); } -// f3-engine (a380/notes/followup/f3-engine.md E1, E3): the extra elevations proved, the re-ranked framed planes (if any) +// f3-engine (E1, E3): the extra elevations proved, the re-ranked framed planes (if any) if (out.report.elevations && out.report.elevations.length > 1) report(`elevations: order data proved at ${out.report.elevations.join("°, ")}°`); if (out.report.rerank && out.report.rerank.near) report(`rerank: ${out.report.rerank.near} near-touching framed planes, ${out.report.rerank.changed} re-ranked${out.report.rerank.names.length ? ` (${out.report.rerank.names.join(", ")})` : ""}`); if (out.report.subPairs) { @@ -610,7 +610,7 @@ if (AUDIT) { console.log(`kit audit · ${pass.name}`); A.auditOrExit(pass.R, P, { argv: [...argv, "--audit"] }); } - // f3-engine (a380/notes/followup/f3-engine.md E4): the riding pass. The cutaway pass above drops the lifted cut + // f3-engine (E4): the riding pass. The cutaway pass above drops the lifted cut // pieces, so a part that rides one (a panel carried by the canopy) cannot be supported there; here every group is // posed in the open state (the cut pieces lifted, the free groups synced), the cut pieces' own parts held, and every // other solid must reach them or the ground (kit/turn-audit.mjs riding) diff --git a/a380/gl/harness.js b/a380/gl/harness.js index 3a5d906..5d412d3 100644 --- a/a380/gl/harness.js +++ b/a380/gl/harness.js @@ -208,7 +208,7 @@ const A3GL = (() => { steps.push(Math.round(performance.now() - t0)); if (!current && !queue.length) done(failed); // (review fu-1 tried polling between frames on a 4 ms timer: first light came 1.7-1.9 s later, 9.5 s against 7.7 s - // at load 20, so the poll stays once a frame; notes/followup/r1-lights.md) + // at load 20, so the poll stays once a frame; follow-up r1-lights) else requestAnimationFrame(step); }; requestAnimationFrame(step); diff --git a/a380/gl/shaders.mjs b/a380/gl/shaders.mjs index 3686a2e..9bff20b 100644 --- a/a380/gl/shaders.mjs +++ b/a380/gl/shaders.mjs @@ -20,7 +20,7 @@ const v3 = (a) => (typeof a === "string" ? a : `vec3(${f(a[0])},${f(a[1])},${f(a * glow, which goes into tonemap). The CSS (lights.mjs) is generated from this table; the page reads each token * through a probe's computed colour at GL init (gl/harness.js) and passes it as the uniform `uInk`. A page * carries one theme, so each program reads the one value its theme branch uses. Roles named here are the only - * colours in the GLSL; the remaining literals are listed in notes/followup/lights.md with their reasons. + * colours in the GLSL; the remaining literals are each commented with their reason where they are written. */ export const GL_INKS = { // lights and lamps (points, lamp lenses, runway lights) diff --git a/a380/parts/cabin.mjs b/a380/parts/cabin.mjs index ce3e5cb..03fa443 100644 --- a/a380/parts/cabin.mjs +++ b/a380/parts/cabin.mjs @@ -1,7 +1,6 @@ // a380/parts/cabin.mjs (M7): Cabin and flight deck: free groups cabin and cockpit, interiors of five cutaway bays, Inspect views. // -// Design: a380/DESIGN.md §3.1, §3.3, §5.1 (W.CUT), §5.8, §5.10, §7.4, §8, §9 M7. Contract: a380/notes/CONTRACT.md. -// Notes: a380/notes/modules/M7.md (what was built, boundaries assumed, audits, known issues). +// Design: a380/DESIGN.md §3.1, §3.3, §5.1 (W.CUT), §5.8, §5.10, §7.4, §8, §9 M7. // // Groups. `cabin` and `cockpit` are free ROOT groups with origin kit [0, 0, 0]. Each carries a sync rule: // while synced its pose is exactly pitch's world pose (follow.mjs syncPose), otherwise F.PARKED (far above). diff --git a/a380/parts/engines.mjs b/a380/parts/engines.mjs index f0978d4..3de1c95 100644 --- a/a380/parts/engines.mjs +++ b/a380/parts/engines.mjs @@ -1,7 +1,6 @@ // a380/parts/engines.mjs (M4): Engines: four Trent 970 nacelles, three-piece pylons into the wing LE, inlet fallback fans. // -// Contract: a380/notes/CONTRACT.md. Design: a380/DESIGN.md §5.1 (W.NACELLE, W.WING), §5.5, §6.2, §6.3, §9 M4. -// Notes: a380/notes/modules/M4.md. +// Design: a380/DESIGN.md §5.1 (W.NACELLE, W.WING), §5.5, §6.2, §6.3, §9 M4. // // Per engine (model ENGINES.list; W.NACELLE[i] carries the rows and the three tangent planes): // eng.n.lip T.round s 0 → 0.50 m, r 1.70 → 1.94, chrome. Its front cap is the inlet face: a plane holds @@ -354,7 +353,7 @@ export function build(ctx) { const pyl = {}; // Against the scaffold's full-chord wing stub (its boxes include the LE), pylon.fwd is clipped at the wing's // leading-edge line so --only=engines still builds; with M3's wing (box from the LE face, strips beside the - // pylon slots, DESIGN §5.4) it rises into the LE profile in full (notes/requests/M4.md, request 1). + // pylon slots, DESIGN §5.4) it rises into the LE profile in full. const fullChordStub = ctx.stubbed("wings") && !ctx.part(`wings.r.le.1`) && !ctx.part(`wings.r.le.gin.a`); const leFlat = () => { const A = k([M.wingAt(E.y0).le, E.y0, 0]); diff --git a/a380/parts/fuselage.mjs b/a380/parts/fuselage.mjs index cc1d786..755d355 100644 --- a/a380/parts/fuselage.mjs +++ b/a380/parts/fuselage.mjs @@ -6,7 +6,7 @@ // It also exports the skin geometry library (`geom(W)`) that parts/skin.mjs builds on: loft segments, S0 facet // planes in the kit frame, points on the skin, the unrolled section coordinate σ, draping of outlines and fills // onto facet planes, and convex slabs from half-spaces. -// Contract: a380/notes/CONTRACT.md. Design: a380/DESIGN.md §5.1, §5.7, §8.7, §9 (M6). +// Design: a380/DESIGN.md §5.1, §5.7, §8.7, §9 (M6). // Boundaries (W.SHELL): fus.B1 15.80-18.5 full S0; B2 (z >= 4.40); B3 (4.40-7.90); B4 (5.05-7.90) with // B4belly.{l,r} slabs; U.wall.{l,r} upper-belt strips 7.90-9.15; U.crown (cut.up, z >= 9.162); // B5 (4.40-5.15); M.wall.{l,r} main-belt strips; M.chunk (cut.md, z >= 6.462); B6; UY.wall.{l,r}; diff --git a/a380/parts/gear.mjs b/a380/parts/gear.mjs index 41541c0..f7dfeb2 100644 --- a/a380/parts/gear.mjs +++ b/a380/parts/gear.mjs @@ -1,7 +1,7 @@ // a380/parts/gear.mjs (M5): the landing gear. Nose gear (2 wheels, steers ±70°, retracts forward), two wing gears // (4 wheels, retract inboard into the belly) and two body gears (6 wheels, rear axle steers, retract aft), each with // its fitting, knuckle, leg, oleo, bogie, two-link stay solved as a 4-bar, doors and lights. -// Design: a380/DESIGN.md §5.6, §3.1–3.4; contract: notes/CONTRACT.md; notes: notes/modules/M5.md. +// Design: a380/DESIGN.md §5.6, §3.1–3.4. // // Frames. Geometry is written in model metres (x aft, y starboard, z up) and converted once with W.kit; every // kinematic solve below works in kit units (x forward, y starboard, z up; rotations right-handed about kit axes). diff --git a/a380/parts/nose.mjs b/a380/parts/nose.mjs index 7510ae0..fb8a63a 100644 --- a/a380/parts/nose.mjs +++ b/a380/parts/nose.mjs @@ -1,6 +1,6 @@ // a380/parts/nose.mjs (M2): Nose: nose shell lofts, cockpit glazing, NLG bay walls, flight-deck cut piece. // -// Contract: a380/notes/CONTRACT.md. Design: a380/DESIGN.md §5.1, §5.3, §9 (M2). Notes: a380/notes/modules/M2.md. +// Design: a380/DESIGN.md §5.1, §5.3, §9 (M2). // // Shell (W.SHELL, built with W.loft as smooth ring-loft hulls): nose.radome 0.06–1.9 (+ nose.radome.tip, a // smooth cap closing the 0.06 m flat), nose.canopy (cut.fd, z ≥ W.CUT.FD.cut), nose.fdfloor (4.90–6.00), diff --git a/a380/parts/skin.mjs b/a380/parts/skin.mjs index 540a197..381973b 100644 --- a/a380/parts/skin.mjs +++ b/a380/parts/skin.mjs @@ -1,7 +1,7 @@ // a380/parts/skin.mjs (M6): Skin: belly fairing, keel liner, passenger and cargo doors, 218 windows, beacons, // antennas, lamps, surface detail. // -// Contract: a380/notes/CONTRACT.md. Design: a380/DESIGN.md §3.1, §5.1, §5.7, §5.10, §6.2, §8.7, §9 (M6). +// Design: a380/DESIGN.md §3.1, §5.1, §5.7, §5.10, §6.2, §8.7, §9 (M6). // Groups: door.{ID}.arm (hinge on W.partAt's group, axis the arm facet's in-plane up vector at the door's // forward edge, 0.03 m off the skin) > door.{ID} (the parallel axis at the arm's end), 16 doors; door.FWD // and door.AFT (top-hinged on pitch). Rules from channels door.{ID}. diff --git a/a380/parts/stage.mjs b/a380/parts/stage.mjs index de5235b..cec8bfb 100644 --- a/a380/parts/stage.mjs +++ b/a380/parts/stage.mjs @@ -1,5 +1,5 @@ // a380/parts/stage.mjs (M1): Stage: plinth, platter, phase-keyed marking sets, shadow, runway lights. -// Contract: a380/notes/CONTRACT.md. Design: a380/DESIGN.md §2, §4, §5.2, §6.1, §6.2 (runway row), §7.5, §9 M1. +// Design: a380/DESIGN.md §2, §4, §5.2, §6.1, §6.2 (runway row), §7.5, §9 M1. // // Files: a380/parts/stage.mjs, a380/gl/runway.mjs (GLSL generator, Node), a380/gl/runway.js (page: drawRunway and // the deck writer). Groups: none (the platter rides `air`, layer `deck`; the plinth is static on `back`). diff --git a/a380/parts/tail.mjs b/a380/parts/tail.mjs index ce69b2a..02d0f1d 100644 --- a/a380/parts/tail.mjs +++ b/a380/parts/tail.mjs @@ -1,6 +1,6 @@ // a380/parts/tail.mjs (M2): Tail: tail shell lofts, fin, rudders, tailplanes, elevators, APU, tail lights. // -// Contract: a380/notes/CONTRACT.md. Design: a380/DESIGN.md §3.1, §5.1, §5.3, §9 (M2). Notes: a380/notes/modules/M2.md. +// Design: a380/DESIGN.md §3.1, §5.1, §5.3, §9 (M2). // // Shell (W.SHELL via W.loft, smooth ring-loft hulls): tail.aft 46.5–52.25, tail.cone 52.25–66 (one segment: its // crown facet and main-belt facets are planes), tail.tip 66–70.4 (tapered to the APU exhaust end). @@ -300,7 +300,7 @@ export function groups(ctx) { // parts kept for checks() const BUILT = {}; -// follow-up item 23 (not fixed, a380/notes/followup/wings.md): moving the elevators' hinge and nose aft of the fixed TE +// follow-up item 23 (not fixed): moving the elevators' hinge and nose aft of the fixed TE // face by W.GAP (12 mm) or W.GAP/2 made the browser order check at turn 220 (elevators at 0) worse (three pairs, one with // the platter, instead of one), so the elevators stay tangent to the TE face (offset 0) const ELEV_AFT = (W) => 0 * W.GAP; diff --git a/a380/parts/wings.mjs b/a380/parts/wings.mjs index 517f077..6110bb6 100644 --- a/a380/parts/wings.mjs +++ b/a380/parts/wings.mjs @@ -5,7 +5,7 @@ // W.kit. Every ring is a planar section: y-planes for panels and devices, planes normal to a hinge axis where a // device's end must stay invariant while it turns (the droop and slat ends beside fixed strips). // -// Hinge axes (notes in a380/notes/modules/M3.md): +// Hinge axes: // droop noses 1–2 share one axis along the inner LE face, under their lower aft edge (they droop, opening a // wedge at the top); slats 2–7 share one axis along the outer LE face, aft of and below them (a circular track // forward and down). Sharing an axis makes each run move as one body, so the gaps between its devices stay diff --git a/a380/tools/lines-sites.mjs b/a380/tools/lines-sites.mjs index 0162a9a..1aba430 100644 --- a/a380/tools/lines-sites.mjs +++ b/a380/tools/lines-sites.mjs @@ -37,7 +37,7 @@ if (!from && !page) { const out = resolve(from ?? value("--out", join(A380, "tmp/lines-sites", basename(page).replace(/\.html$/, "")))); const views = value("--views", null)?.split(","); -// owners by part-name prefix (a380/notes/followup/PLAN.md §4 and the follow-up packages' file lists) +// owners by part-name prefix (the follow-up plan and its packages' file lists) const OWNERS = [ [/^wings\./, "wings", ["parts/wings.mjs"]], [/^eng\./, "wings", ["parts/engines.mjs"]], diff --git a/a380/tools/model-test.mjs b/a380/tools/model-test.mjs index 6446954..7e6d4f9 100644 --- a/a380/tools/model-test.mjs +++ b/a380/tools/model-test.mjs @@ -1,5 +1,5 @@ // Steps the A380 model through every phase at 60 fps (real time) and checks for NaN and jumps. -// node a380/tools/model-test.mjs (tracked copy of the review rounds' a380/tmp/model-test.mjs; output recorded in notes/followup/interaction.md) +// node a380/tools/model-test.mjs (tracked copy of the review rounds' a380/tmp/model-test.mjs) import { readFileSync } from "node:fs"; import * as M from "../model.mjs"; diff --git a/a380/world.mjs b/a380/world.mjs index 5a512cc..c5c2266 100644 --- a/a380/world.mjs +++ b/a380/world.mjs @@ -29,7 +29,7 @@ export const kit = ([x, y, z]) => [UNIT * (PIVOT_X - x), UNIT * y, UNIT * z]; export const kitDir = ([dx, dy, dz]) => [-dx, dy, dz]; export const fromKit = ([X, Y, Z]) => [PIVOT_X - X / UNIT, Y / UNIT, Z / UNIT]; export const m = (metres) => metres * UNIT; // a length in kit units -/** Cross-group gap in metres (see notes/CONTRACT.md: 0.012 m, not DESIGN's 0.02, so the kit's 0.15-unit support touch still links the pieces). */ +/** Cross-group gap in metres (the module contract: 0.012 m, not DESIGN's 0.02, so the kit's 0.15-unit support touch still links the pieces). */ export const GAP = 0.012; export const SIDES = [ ["l", -1], diff --git a/kit/audit.mjs b/kit/audit.mjs index 913733b..23fb24d 100644 --- a/kit/audit.mjs +++ b/kit/audit.mjs @@ -264,7 +264,7 @@ function segmentPoint(p, a, b) { export function sdf(shape, p) { let d = baseSdf(shape, p); - // f3-engine (a380/notes/followup/f3-engine.md E4): a shell (`shell: t`, e.g. a canopy recorded as a convex hull): the + // f3-engine (E4): a shell (`shell: t`, e.g. a canopy recorded as a convex hull): the // solid is the hull's outer layer t thick, its inside a cavity, so a part inside (a panel under the roof) can touch the // inner face without sinking into the hull. A hull's faces whose outward normal is one of `open` (unit vectors, the // piece's closing cuts, which are not skin) bound no layer: the cavity runs out through them. Without the key nothing @@ -456,7 +456,7 @@ function tubeDistance(shape, p, segments) { function bodyDepth(shape, c, V, eps) { const { F, poly } = shape; - // f3-engine (a380/notes/followup/f3-engine.md E1): the cache holds the view it was made for; a static shape met again + // f3-engine (E1): the cache holds the view it was made for; a static shape met again // from another camera elevation (the turn audit's `$elevation` states) had its 30° view products reused (was !shape._f) if (!shape._f || shape._f.V !== V) { const s = poly.map(([value]) => value); diff --git a/kit/gl.mjs b/kit/gl.mjs index 876ad9a..7e9af0c 100644 --- a/kit/gl.mjs +++ b/kit/gl.mjs @@ -59,7 +59,7 @@ export function glCamera(projection) { }; } -// ---- f3-engine: per-view camera elevation (a380/notes/followup/f3-engine.md E1) ------------------------------------- +// ---- f3-engine: per-view camera elevation (E1) ------------------------------------- // The GL camera of the frame the runtime drew: `cams` is controller.cams() (or TURN.cams(scene, values)); at a state with // `$elevation` its world camera looks down at that elevation, and a layer drawn with `draw({ uCam: glCameraAt(P, // cams).cam })` projects its lights where the parts are. Without `$elevation` it equals glCamera(projection). diff --git a/kit/hull3.mjs b/kit/hull3.mjs index 310b88e..4c29002 100644 --- a/kit/hull3.mjs +++ b/kit/hull3.mjs @@ -1,4 +1,4 @@ -// hull3.mjs: convex polyhedra for the 3D mode's T.hull (kit patch 6, a380/notes/kit-patches.md). +// hull3.mjs: convex polyhedra for the 3D mode's T.hull (kit patch 6). // convexHull3(points) builds the convex hull of a point set as merged planar faces with outward normals. // clipHull(points, n, d) keeps the part of the hull of `points` with n·p <= d. Pure, Node and browser. diff --git a/kit/turn-audit.mjs b/kit/turn-audit.mjs index f25c96b..f581831 100644 --- a/kit/turn-audit.mjs +++ b/kit/turn-audit.mjs @@ -414,7 +414,7 @@ export function orbit(T, R, P, options = {}) { const E = ((P.elevation ?? 30) * Math.PI) / 180; const result = { separation: [], unseparated: [], cycles: [], forced: [], swaps: [], layers: [], rigid: [], swept: [], posed: [], folds: [], self: [], crowding: [], endon: [], coverage: [], depth: [], continuity: [], notes: [], stats: {}, quick, skipped: Object.keys(ORBIT_LINES).filter((line) => ORBIT_LINES[line] && !wants(ORBIT_LINES[line])) }; const families = familiesOf(T, { sweep, clips }); - // ---- f3-engine: per-view camera elevation (a380/notes/followup/f3-engine.md E1) ----------------------------------- + // ---- f3-engine: per-view camera elevation (E1) ----------------------------------- // `elevations`: the extra camera elevations the page shows (T.build's `elevations`); the sweep (or, with // elevated: "all", every family) is audited again at each of them, as `@°`. A state carrying `$elevation` // (any family's) is audited at its elevation: order and swaps through its cameras, and the depth oracle, routes and @@ -435,7 +435,7 @@ export function orbit(T, R, P, options = {}) { return e === null || e === baseE ? P : { ...P, elevation: e }; }; // ---- f3-engine end ---------------------------------------------------------------------------------------------- - // kit patch 13 (a380/notes/kit-patches.md): groups the figure does not draw in a state (a parked free group, 10 km + // kit patch 13: groups the figure does not draw in a state (a parked free group, 10 km // up) are absent from it: no order pairs, swaps, posed pairs, clip steps or depth items involve their parts there const groupIndex = new Map(groups.map((g) => [g.name, g.index])); const goneOf = (values) => { @@ -684,7 +684,7 @@ export function orbit(T, R, P, options = {}) { seen++; for (const w of adj[v]) if (--indeg[w] === 0) queue.push(w); } - // f4-engine (a380/notes/followup/f4-engine.md, the cycle rule): the runtime opens a cycle no thin edge opens by + // f4-engine (the cycle rule): the runtime opens a cycle no thin edge opens by // dropping its edge whose frames overlap least, under TURN.sliver px² (an order that can be wrong on less area // than the swaps line's least real overlap); the same here, on the cycles left, each drop noted. A cycle without // such an edge is reported as before, and the swaps and depth lines still judge the frames drawn @@ -1410,7 +1410,7 @@ export function orbitOrExit(T, R, P, { flag = "--audit", argv = process.argv, .. return result; } -// ---- f3-engine: the riding pass (a380/notes/followup/f3-engine.md E4) ----------------------------------------------- +// ---- f3-engine: the riding pass (E4) ----------------------------------------------- // The kit audit (audit.mjs) checks support at rest, where every group is at 0. A part that rides a moving piece (an // overhead panel carried by a lifting canopy) is supported only by that piece in its moved pose, and a pass that drops // the moving piece (a cutaway pass) finds it loose. `riding` poses every solid and tube at one reachable state diff --git a/kit/turn-build.mjs b/kit/turn-build.mjs index 042bb9b..07a5d8e 100644 --- a/kit/turn-build.mjs +++ b/kit/turn-build.mjs @@ -748,7 +748,7 @@ export function turning(P, { recorder = null, scale = 1 } = {}) { const name = options.name ?? `${kind}#${T.parts.length}`; const material = options.material ?? null; if (material && !TURN.materials.includes(material)) throw new Error(`turning: part ${name} has material ${material}; use one of ${TURN.materials.join(", ")}`); - return { id: T.parts.length, name, kind, group, layer, owner: options.owner, tone: options.tone ?? "hi", crease: options.crease ?? "faint", lit: Boolean(options.lit), material, cls: options.cls ?? null, details: options.details ?? {}, shapes: [], planes: [], dots: [], samples: [], hints: [], rerank: options.rerank ?? 0 }; // f3-engine: rerank (a380/notes/followup/f3-engine.md E3) + return { id: T.parts.length, name, kind, group, layer, owner: options.owner, tone: options.tone ?? "hi", crease: options.crease ?? "faint", lit: Boolean(options.lit), material, cls: options.cls ?? null, details: options.details ?? {}, shapes: [], planes: [], dots: [], samples: [], hints: [], rerank: options.rerank ?? 0 }; // f3-engine: rerank (E3) }; const record = (part, shape) => { shape.name = shape.name ?? part.name; @@ -895,7 +895,7 @@ export function turning(P, { recorder = null, scale = 1 } = {}) { record(part, A.solid(F, profile, { name: part.name })); part.world = { F, s0, s1, r0, r1, ends, profile }; part.spec = { F: { o: local(part.group, F.o), a: F.a, u: F.u, v: F.v }, s0, s1, r0, r1, ends, ...(options.bands === 13 ? { hb: 1 } : {}) }; - // ---- f3-engine: round joints (a380/notes/followup/f3-engine.md E2) ---------------------------------------------- + // ---- f3-engine: round joints (E2) ---------------------------------------------- // `jointCaps: { first, last }` (as a ring-loft hull's, kit patch 15): the end ring at s0 (first) or s1 (last) is a // joint with the next piece of the same continuous skin (a nacelle's next cowl row); the round's outline on it is // drawn as a faint (or "mid") seam instead of the outline. A joint end is open or flat, not a dome; its cap face is @@ -1069,7 +1069,7 @@ export function turning(P, { recorder = null, scale = 1 } = {}) { return part; }; - // T.hull (kit patch 6, a380/notes/kit-patches.md): a convex polyhedron from points (faceted), or a ring loft + // T.hull (kit patch 6): a convex polyhedron from points (faceted), or a ring loft // (consecutive planar convex rings) with smooth tone bands, optionally clipped by flats { n, d } (keep n·p <= d). T.hull = (options) => { const part = common(options, "hull"); @@ -1175,7 +1175,7 @@ export function turning(P, { recorder = null, scale = 1 } = {}) { if (joints.length > 30) throw new Error(`turning: hull ${name}: at most 30 joint planes`); const jointTol = Math.max(1e-3, 1e-6 * size); const JV = hull.points.map((p) => joints.reduce((mask, j, bit) => (Math.abs(dot3(j.n, p) - j.d) <= jointTol ? mask | (1 << bit) : mask), 0)); - // f3-engine (a380/notes/followup/f3-engine.md E4): `shell: { t, open }` (or a number t, kit units): the recorded solid is + // f3-engine (E4): `shell: { t, open }` (or a number t, kit units): the recorded solid is // a shell t thick, its inside a cavity open through the faces whose outward normals are in `open` (the piece's cuts; // audit.mjs sdf), for a hull that is one piece of a hollow skin with parts inside it // (`open: "flat"`: every flat face, the closing cuts of a smooth ring-loft piece) @@ -1190,7 +1190,7 @@ export function turning(P, { recorder = null, scale = 1 } = {}) { E: creases, ...(joints.length && JV.some((m) => m) ? { JV, JT: joints.map((j) => j.t) } : {}), }; - // f3-engine (a380/notes/followup/f3-engine.md E5): `subBands`, the smooth faces' sub-bands per tone step (default 3, + // f3-engine (E5): `subBands`, the smooth faces' sub-bands per tone step (default 3, // kit patch 15's 13 levels; 6 gives 25 levels, a step of half the size, for a long smooth face lit mostly by its // angle round an axis, e.g. the radome). Its own face roles and thresholds at runtime; the ramp's knots are the same if (options.subBands !== undefined && options.subBands !== 3) { @@ -1556,7 +1556,7 @@ function build(T, { statics = [], verify = false, poses = null, strict = true, f const P = T.P; const started = Date.now(); const states = statesOf(T, poses); - // ---- f3-engine: per-view camera elevation (a380/notes/followup/f3-engine.md E1) ----------------------------------- + // ---- f3-engine: per-view camera elevation (E1) ----------------------------------- // `elevations`: the camera elevations (degrees) the page may show besides P.elevation (an Inspect view looking down // more steeply), and any `$elevation` a state carries. Every screen-space step of the build runs at each of them as // well: which pairs can overlap on screen (so get a plane or a dynamic test), the slots a part's levels need, and the @@ -1568,7 +1568,7 @@ function build(T, { statics = [], verify = false, poses = null, strict = true, f const fixedParts = extraE.length ? T.parts.filter((part) => part.kind === "fixed").map((part) => part.name) : []; if (fixedParts.length) throw new Error(`turning: elevations ${extraE.join(", ")} declared, but ${fixedParts.length} part${fixedParts.length === 1 ? " is" : "s are"} pre-drawn SVG at P.elevation ${baseE} (T.fixed: ${fixedParts.slice(0, 6).join(", ")}): make them solids, or show no other elevation`); const atE = (values, e) => ({ ...values, $elevation: e }); - // round joints (a380/notes/followup/f3-engine.md E2): each joint ring's neighbour, the round of the same group on the + // round joints (f3-engine E2): each joint ring's neighbour, the round of the same group on the // same axis whose end ring is that ring; its slope dr/ds in this round's s lets the runtime keep the arc between the // two rounds' tangent points (the union's silhouette, where the slopes differ) as outline for (const part of T.parts) { @@ -1636,7 +1636,7 @@ function build(T, { statics = [], verify = false, poses = null, strict = true, f const camsFor = (group) => { const key = group ? group.index : -1; if (!sampleCams.has(key)) { - // groups sampled on the shared states share one camera list (a380/notes/kit-patches.md, patch 12): a + // groups sampled on the shared states share one camera list (kit patch 12): a // per-group copy cost groups × states full camera sets (minutes and tens of GB on a 150-group figure) const values = groupStates(T, group, states, { tumble: true }); sampleCams.set(key, values === states ? stateCams() : values.map((v) => TURN.cams(scene, v))); @@ -1777,7 +1777,7 @@ function build(T, { statics = [], verify = false, poses = null, strict = true, f // kit patch 9: every distinct pose of a group in a frame, over all sampled states (deduplicated at 1e-4); at most // 256, thinned uniformly, and the 24 sampled poses of the framed search always among them const p9 = { failed: 0, reframed: 0, dynamic: 0, names: [], poses: 0, capped: 0, ms: 0 }; - const rr = { near: 0, changed: 0, names: [] }; // f3-engine: re-ranked framed planes (a380/notes/followup/f3-engine.md E3) + const rr = { near: 0, changed: 0, names: [] }; // f3-engine: re-ranked framed planes (E3) const poseLists = new Map(); const posesOf = (group, frame) => { const key = `${group ? group.index : -1}|${frame ? frame.index : -1}`; @@ -1970,7 +1970,7 @@ function build(T, { statics = [], verify = false, poses = null, strict = true, f const cb = B.flatMap((part) => framedCloud(part, common).filter((_, i) => fullClouds || i % 2 === 0)); const hit = quickSeparate(ca, cb, [[0, 0, 1], ...A.flatMap((part) => part.hints).slice(0, 6).map((h) => toFrame(h, ga, common)), ...B.flatMap((part) => part.hints).slice(0, 6).map((h) => toFrame(h, gb, common))]); if (hit.margin < 0.1) continue; - // the plane was found on thinned clouds: it must also hold for every sample (a380/notes/kit-patches.md) + // the plane was found on thinned clouds: it must also hold for every sample if (marginOf(hit.n, A.flatMap((part) => framedCloud(part, common, true)), B.flatMap((part) => framedCloud(part, common, true))).margin < 0.1) continue; pairsOfGroups.push(keys[x], keys[y], common ? common.index : -1, hit.n[0], hit.n[1], hit.n[2]); settled.add(`${keys[x]}|${keys[y]}`); @@ -2017,7 +2017,7 @@ function build(T, { statics = [], verify = false, poses = null, strict = true, f const hints = [[0, 0, 1], ...a.hints, ...b.hints].map((h) => toFrame(h, a.group, common)).concat([[0, 0, 1], ...b.hints.map((h) => toFrame(h, b.group, common))]); let hit = quickSeparate(ca, cb, hints); let ok = hit.margin >= 0.1 && marginOf(hit.n, framedCloud(a, common, true), framedCloud(b, common, true)).margin >= 0.1; - // kit patch 9 (a380/notes/kit-patches.md): the plane must also hold in every distinct relative pose the + // kit patch 9: the plane must also hold in every distinct relative pose the // poses() list gives the two groups (deduplicated at 1e-4, at most 256, thinned uniformly), not only in the // 24 sampled ones; a plane that fails between them is searched again on those poses, else the pair is dynamic if (patch9 && ok && !(marginFlat(hit.n, poseCloud(a, common), poseCloud(b, common)) >= 0.1)) { @@ -2030,7 +2030,7 @@ function build(T, { statics = [], verify = false, poses = null, strict = true, f } else p9.dynamic++; if (p9.names.length < 12) p9.names.push(`${a.name} × ${b.name}${ok ? " (re-framed)" : " (dynamic)"}`); } - // ---- f3-engine: re-rank a near-touching framed plane (a380/notes/followup/f3-engine.md E3) ---------------- + // ---- f3-engine: re-rank a near-touching framed plane (E3) ---------------- // The plane above is picked on thinned clouds (32 points a part per sampled state) and only validated on the // full ones, so a candidate the thin clouds overrate can win with a full-cloud margin far under another's: a // rounded door leaf's corner planes made tail.aft × door.M5R.leaf.hi pick the cone's door facet (0.12 units) @@ -2102,7 +2102,7 @@ function build(T, { statics = [], verify = false, poses = null, strict = true, f }); const packed = { ...pack({ ...data, parts: [] }), parts: pack3(data.parts) }; // Frame axes keep 6 decimals (3 moved a wingtip 0.17 units at runtime), and T.split parts keep their spec - // unrounded: the runtime tests cut vertices against the cut plane to 1e-3 (a380/notes/kit-patches.md) + // unrounded: the runtime tests cut vertices against the cut plane to 1e-3 const r6 = (v) => Math.round(v * 1e6) / 1e6; packed.parts.forEach((p, i) => { const F = data.parts[i].spec && data.parts[i].spec.F; diff --git a/kit/turn-fixed.mjs b/kit/turn-fixed.mjs index 4610573..2221594 100644 --- a/kit/turn-fixed.mjs +++ b/kit/turn-fixed.mjs @@ -4,7 +4,7 @@ const T3_RAD = Math.PI / 180; const T3_LB = [0, 0.2, 0.42, 0.62]; const T3_EB = [0.25, 0.5, 0.75]; const T3_SOFT = 0.035; -// kit patch 15 (a380/notes/kit-patches.md): smooth hull faces shade in T3_HK sub-bands per tone step (13 levels), +// kit patch 15: smooth hull faces shade in T3_HK sub-bands per tone step (13 levels), // along a continuous facing ramp whose knots sit at the band centres, so curved lofts never step by a whole tone // and the lit half is not clamped at the top tone. Each sub-band is a `face` role with a constant ramp level. const T3_HK = 3; @@ -19,7 +19,7 @@ const T3_HT = (() => { } return out; })(); -// f3-engine (a380/notes/followup/f3-engine.md E5): the sub-band thresholds for hk sub-bands per tone step (T3_HT is hk = 3), cached +// f3-engine (E5): the sub-band thresholds for hk sub-bands per tone step (T3_HT is hk = 3), cached const t3BandCache = new Map(); function t3BandsOf(hk) { let out = t3BandCache.get(hk); @@ -377,7 +377,7 @@ function t3Roles(part) { const ends = part.kind === "round" ? spec.ends : spec.caps.map((cap) => (cap ? "flat" : "open")); ends.forEach((end, j) => end === "flat" && add(`k${j}`, "face")); if (crease !== "none") add("crease", "path", { cls: "iso-line iso-crease", tone: crease }); - // f3-engine (a380/notes/followup/f3-engine.md E2): a round's end rings as joints, as a hull's (patch 15): its outline on a joint ring + // f3-engine (E2): a round's end rings as joints, as a hull's (patch 15): its outline on a joint ring // is a faint (or mid) seam, not the outline if (part.kind === "round" && spec.jt) { if (spec.jt.includes(0)) add("jf", "path", { cls: "iso-line", tone: "faint" }); @@ -1856,7 +1856,7 @@ function t3ArcPoints(geo, s, r, from, to, k, out, cut = false, angles = false) { } } -// f3-engine (a380/notes/followup/f3-engine.md E2): mark the outline points from `from` on as lying on end ring `end` +// f3-engine (E2): mark the outline points from `from` on as lying on end ring `end` // when that ring is a joint (p.j = 4 · end + tone + 1) // The ring's points the neighbour round's outline also passes through are the union's silhouette there (the arc between // the two rounds' tangent points where their slopes differ) and stay outline: only the rest of the arc is seam @@ -2263,7 +2263,7 @@ function t3EmitRound(run, cam, f) { buf[2 * j + 1] = p[1]; }); for (let j = 0; j < pts.length; j++) skip[j] = pts[j].cut && pts[(j + 1) % pts.length].cut ? 1 : 0; - // f3-engine (a380/notes/followup/f3-engine.md E2): a segment with both ends on the same joint ring is a seam (jf / jm), not outline + // f3-engine (E2): a segment with both ends on the same joint ring is a seam (jf / jm), not outline let joints = 0; if (run.jt !== null) for (let j = 0; j < pts.length; j++) { @@ -3214,7 +3214,7 @@ function t3EmitTube(run, cam, f) { f.hullN = 0; } -// ---- T.hull runtime (kit patch 6, a380/notes/kit-patches.md): convex polyhedra, faceted or ring lofts with +// ---- T.hull runtime (kit patch 6): convex polyhedra, faceted or ring lofts with // smooth tone bands. Flat faces (caps, clip flats, faceted hulls) are `face` roles with the kit's smoothed // staircase; smooth faces are drawn into the round's tone sheets s0..s4, cut along the iso-lines of the facing // score interpolated linearly over each face's fan triangles, so the bands slide continuously as the part turns. @@ -3274,7 +3274,7 @@ function t3PrepareHull(run, part) { run.fv.set(face.v, run.fo[j]); if (face.c) run.fc.set(face.c.subarray(0, face.v.length), run.fo[j]); } - // f3-engine (a380/notes/followup/f3-engine.md E5): a hull's own sub-band count, `spec.hk` sub-bands per tone step (T.hull's `subBands`) + // f3-engine (E5): a hull's own sub-band count, `spec.hk` sub-bands per tone step (T.hull's `subBands`) run.hk = part.spec.hk ?? T3_HK; run.ht = run.hk === T3_HK ? T3_HT : t3BandsOf(run.hk); run.hRoles = Int32Array.from({ length: run.ht.length + 1 }, (_, t) => run.role[`h${t}`] ?? -1); @@ -3469,7 +3469,7 @@ function t3EmitHull(run, cam, f) { // the sheets as lists joined once (a380 perf, kit-patches.md 19): a string grown by += is a rope the canvas painter // flattened on its first read every frame // (the 13 lists are the run's own, emptied each frame) - // f3-engine (a380/notes/followup/f3-engine.md E5): the part's own sub-band count (spec.hk sub-bands per tone step; 3 by default) + // f3-engine (E5): the part's own sub-band count (spec.hk sub-bands per tone step; 3 by default) const HT = run.ht ?? T3_HT; const HN = HT.length + 1; const HK = run.hk ?? T3_HK; @@ -3686,7 +3686,7 @@ function t3Apart(A, an, B, bn, pad) { return false; } -// f4-engine (a380/notes/followup/f4-engine.md, the cycle rule): the area (px²) where two frames' convex pieces (the hull, +// f4-engine (the cycle rule): the area (px²) where two frames' convex pieces (the hull, // or a tube's quads) overlap, summed over the piece pairs (an upper bound of the fills' overlap); it stops counting // at `limit`. Only a stalled sort's cold pass calls it const T3_SLIVER = 0.25; @@ -4231,7 +4231,7 @@ function t3Order(layer, frames, cams, previous, stats, scene) { } } } - // f4-engine (a380/notes/followup/f4-engine.md, the cycle rule): a cycle no apart or thin edge opens, met again in + // f4-engine (the cycle rule): a cycle no apart or thin edge opens, met again in // the cold pass (so a warm GJK side is not the cause), drops its edge whose frames overlap least if that area is // under T3_SLIVER px² (the audit's least real overlap): the frames' hulls hold the fills, so the order of that // pair can differ from the true one on less than that area. A forced pick (every edge into one part dropped) @@ -4354,7 +4354,7 @@ function t3Keep(values) { return keep; } -// ---- f3-engine: per-view camera elevation (a380/notes/followup/f3-engine.md E1) ------------------------------------- +// ---- f3-engine: per-view camera elevation (E1) ------------------------------------- // A state may carry `$elevation` (degrees, 0 < e < 90): the cameras of that state look down at that elevation instead of // the projection's P.elevation, keeping its azimuth, scale and origin. The order's stored planes are planes in 3D (valid // from any view); only which side faces the reader depends on the view vector, and t3Order reads it from these cameras. diff --git a/kit/turn-patch9-control.mjs b/kit/turn-patch9-control.mjs index 4c9da5b..a9c5872 100644 --- a/kit/turn-patch9-control.mjs +++ b/kit/turn-patch9-control.mjs @@ -1,4 +1,4 @@ -// Kit patch 9 control (a380/notes/kit-patches.md 9): a hinge pair that bulges between its sampled extremes. +// Kit patch 9 control: a hinge pair that bulges between its sampled extremes. // // node kit/turn-patch9-control.mjs // diff --git a/kit/turn.mjs b/kit/turn.mjs index 09d4fa8..5e90aa2 100644 --- a/kit/turn.mjs +++ b/kit/turn.mjs @@ -4,7 +4,7 @@ const T3_RAD = Math.PI / 180; const T3_LB = [0, 0.2, 0.42, 0.62]; const T3_EB = [0.25, 0.5, 0.75]; const T3_SOFT = 0.035; -// kit patch 15 (a380/notes/kit-patches.md): smooth hull faces shade in T3_HK sub-bands per tone step (13 levels), +// kit patch 15: smooth hull faces shade in T3_HK sub-bands per tone step (13 levels), // along a continuous facing ramp whose knots sit at the band centres, so curved lofts never step by a whole tone // and the lit half is not clamped at the top tone. Each sub-band is a `face` role with a constant ramp level. const T3_HK = 3; @@ -19,7 +19,7 @@ const T3_HT = (() => { } return out; })(); -// f3-engine (a380/notes/followup/f3-engine.md E5): the sub-band thresholds for hk sub-bands per tone step (T3_HT is hk = 3), cached +// f3-engine (E5): the sub-band thresholds for hk sub-bands per tone step (T3_HT is hk = 3), cached const t3BandCache = new Map(); function t3BandsOf(hk) { let out = t3BandCache.get(hk); @@ -312,7 +312,7 @@ function t3Roles(part) { const ends = part.kind === "round" ? spec.ends : spec.caps.map((cap) => (cap ? "flat" : "open")); ends.forEach((end, j) => end === "flat" && add(`k${j}`, "face")); if (crease !== "none") add("crease", "path", { cls: "iso-line iso-crease", tone: crease }); - // f3-engine (a380/notes/followup/f3-engine.md E2): a round's end rings as joints, as a hull's (patch 15): its outline on a joint ring + // f3-engine (E2): a round's end rings as joints, as a hull's (patch 15): its outline on a joint ring // is a faint (or mid) seam, not the outline if (part.kind === "round" && spec.jt) { if (spec.jt.includes(0)) add("jf", "path", { cls: "iso-line", tone: "faint" }); @@ -1781,7 +1781,7 @@ function t3ArcPoints(geo, s, r, from, to, k, out, cut = false, angles = false) { } } -// f3-engine (a380/notes/followup/f3-engine.md E2): mark the outline points from `from` on as lying on end ring `end` +// f3-engine (E2): mark the outline points from `from` on as lying on end ring `end` // when that ring is a joint (p.j = 4 · end + tone + 1) // The ring's points the neighbour round's outline also passes through are the union's silhouette there (the arc between // the two rounds' tangent points where their slopes differ) and stay outline: only the rest of the arc is seam @@ -2179,7 +2179,7 @@ function t3EmitRound(run, cam, f) { buf[2 * j + 1] = p[1]; }); for (let j = 0; j < pts.length; j++) skip[j] = pts[j].cut && pts[(j + 1) % pts.length].cut ? 1 : 0; - // f3-engine (a380/notes/followup/f3-engine.md E2): a segment with both ends on the same joint ring is a seam (jf / jm), not outline + // f3-engine (E2): a segment with both ends on the same joint ring is a seam (jf / jm), not outline let joints = 0; if (run.jt !== null) for (let j = 0; j < pts.length; j++) { @@ -3130,7 +3130,7 @@ function t3EmitTube(run, cam, f) { f.hullN = 0; } -// ---- T.hull runtime (kit patch 6, a380/notes/kit-patches.md): convex polyhedra, faceted or ring lofts with +// ---- T.hull runtime (kit patch 6): convex polyhedra, faceted or ring lofts with // smooth tone bands. Flat faces (caps, clip flats, faceted hulls) are `face` roles with the kit's smoothed // staircase; smooth faces are drawn into the round's tone sheets s0..s4, cut along the iso-lines of the facing // score interpolated linearly over each face's fan triangles, so the bands slide continuously as the part turns. @@ -3190,7 +3190,7 @@ function t3PrepareHull(run, part) { run.fv.set(face.v, run.fo[j]); if (face.c) run.fc.set(face.c.subarray(0, face.v.length), run.fo[j]); } - // f3-engine (a380/notes/followup/f3-engine.md E5): a hull's own sub-band count, `spec.hk` sub-bands per tone step (T.hull's `subBands`) + // f3-engine (E5): a hull's own sub-band count, `spec.hk` sub-bands per tone step (T.hull's `subBands`) run.hk = part.spec.hk ?? T3_HK; run.ht = run.hk === T3_HK ? T3_HT : t3BandsOf(run.hk); run.hRoles = Int32Array.from({ length: run.ht.length + 1 }, (_, t) => run.role[`h${t}`] ?? -1); @@ -3377,7 +3377,7 @@ function t3EmitHull(run, cam, f) { // the sheets as lists joined once (a380 perf, kit-patches.md 19): a string grown by += is a rope the canvas painter // flattened on its first read every frame // (the 13 lists are the run's own, emptied each frame) - // f3-engine (a380/notes/followup/f3-engine.md E5): the part's own sub-band count (spec.hk sub-bands per tone step; 3 by default) + // f3-engine (E5): the part's own sub-band count (spec.hk sub-bands per tone step; 3 by default) const HT = run.ht ?? T3_HT; const HN = HT.length + 1; const HK = run.hk ?? T3_HK; @@ -3578,7 +3578,7 @@ function t3Apart(A, an, B, bn, pad) { return false; } -// f4-engine (a380/notes/followup/f4-engine.md, the cycle rule): the area (px²) where two frames' convex pieces (the hull, +// f4-engine (the cycle rule): the area (px²) where two frames' convex pieces (the hull, // or a tube's quads) overlap, summed over the piece pairs (an upper bound of the fills' overlap); it stops counting // at `limit`. Only a stalled sort's cold pass calls it const T3_SLIVER = 0.25; @@ -4119,7 +4119,7 @@ function t3Order(layer, frames, cams, previous, stats, scene) { } } } - // f4-engine (a380/notes/followup/f4-engine.md, the cycle rule): a cycle no apart or thin edge opens, met again in + // f4-engine (the cycle rule): a cycle no apart or thin edge opens, met again in // the cold pass (so a warm GJK side is not the cause), drops its edge whose frames overlap least if that area is // under T3_SLIVER px² (the audit's least real overlap): the frames' hulls hold the fills, so the order of that // pair can differ from the true one on less than that area. A forced pick (every edge into one part dropped) @@ -4242,7 +4242,7 @@ function t3Keep(values) { return keep; } -// ---- f3-engine: per-view camera elevation (a380/notes/followup/f3-engine.md E1) ------------------------------------- +// ---- f3-engine: per-view camera elevation (E1) ------------------------------------- // A state may carry `$elevation` (degrees, 0 < e < 90): the cameras of that state look down at that elevation instead of // the projection's P.elevation, keeping its azimuth, scale and origin. The order's stored planes are planes in 3D (valid // from any view); only which side faces the reader depends on the view vector, and t3Order reads it from these cameras.