Repository navigation
chore: open-source tooling, CI and faster WebGL start-up - #1
Merged
Merged
Conversation
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.
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.
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.
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.
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.
… 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.
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.
…d 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.
…kpit 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.
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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tooling for the open-source release, plus a WebGL start-up speed-up.
Tooling
LICENSE);kit/keeps its own MIT licence.package.json:npm run build,check,typecheck,site,serve,deploy. TypeScript and Wrangler are the only dev dependencies; the figure still builds with Node alone.tscas a checker over plain JavaScript. Files opt in with// @ts-check;model.mjsandworld.mjsare the first, with aStatetypedef for the flight model.ci.yml): type check, figure checks and the flight-model test on every push and PR.release.yml): av*tag builds both single-file pages and attaches them to the release. The built pages are no longer tracked (each rebuild added about 4 MB to history).deploy.yml,wrangler.jsonc): deploys air.pla.ne on pushes tomain. It is skipped until the repository secretsCLOUDFLARE_API_TOKENandCLOUDFLARE_ACCOUNT_IDare set. The link-preview images are captured on SwiftShader (no GPU on the runner); tested locally, about 2.5 min.CONTRIBUTING.md; code comments no longer point at the unpublisheda380/notes/files.WebGL start-up
Window pieces, wash targets and nacelles are drawn from uniform tables instead of being baked into the GLSL, and every program has one source for both themes.
Parity: 15 states per theme, captured before and after. 28 of 30 match exactly; two differ in one 2×2 spot at a window or door edge. The canvas painter and the no-WebGL fallback pass, and the take-off blinds and beacon still render correctly.
Notes
kit/turn.mjsandkit/turn-fixed.mjscome from the upstream Anatomy kit; splitting them would make kit updates harder to take in.