
byrongamatosandClaude Sonnet 4.6
5e401afe87
refactor(h3d-carve-1b): extract render-order, note-key, camera-bootstrap, fretMid to src/geometry.js
Move 9 symbols verbatim from screen.js factory scope to geometry.js:
- RENDER_ORDER_LAYER_STACK, RENDER_ORDER_LAYER_INDEX, RENDER_ORDER_AT_Z_ZERO,
RENDER_ORDER_FAR_CLAMP — compile-time constants, now exported from geometry.js
- renderOrderForLayerAtZ — pure fn; reads K + RENDER_ORDER_* from geometry scope
- _noteKey, lowerBoundT — hot-path helpers; no external deps
- hwyFirstRelevantFrettedTime — camera bootstrap scan; no external deps
- fretMid → geoFretMid(f, uniform) — same fretX delegator pattern as Cut 1;
screen.js keeps: const fretMid = f => geoFretMid(f, _h3dFretUniform); (1 beyond-subst)
screen.js import line updated to import all 9 new exports; tombstones replace
each original definition.
Source-scan retargets:
- highway_3d_render_order.test.js: layers()/zZeroRenderOrder() now read
GEOMETRY_JS; the 5 renderOrderForLayerAtZ-internals asserts in
chordFrameRenderOrder test retargeted to geo() (call-site assert stays on src()).
- highway_3d_camera_bootstrap.test.js: extractFn now reads geoSrc (GEOMETRY_JS);
sourceBetween wiring tests remain on SCREEN_JS.
- highway_3d_panel_controls.test.js: sandbox stubs extended with 9 new names.
Class-killer tests added to highway_3d_geometry.test.js (8 new tests, 180 total):
- RENDER_ORDER_LAYER_STACK length + first/last entries
- RENDER_ORDER_LAYER_INDEX spot-checks (CHORD_FILL=0, NOTE_CORE=10)
- renderOrderForLayerAtZ far-clamp (worldZ=-5 gives 50, not 33 without max)
- renderOrderForLayerAtZ unknown-layer throws
- _noteKey |0 truncation (1.5,3)=150003 not float-derived 150008
- lowerBoundT strict lower-bound (3 in [{t:1},{t:3},{t:5}] gives 1, not 2)
- hwyFirstRelevantFrettedTime smoke (empty → null)
- geoFretMid sentinel (f=0 gives -2K≈-0.015, not 0) + ratio invariant
Mutation analysis confirmed all 8 tests fail under their named mutation before
committing (per Toby r1 lesson).
Base run (a1f7ad5): 172/172 pass.
Post-cut run: 180/180 pass.
Command: node --test tests/js/highway_3d*.test.js plugins/highway_3d/tests/*.test.js
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014uZ169yfoFYArXz962g7KW
2026-09-05 07:19:58 +02:00
..
2026-07-16 12:06:52 +02:00
2026-06-16 18:49:40 +01:00
2026-09-05 07:19:58 +02:00
2026-09-03 17:52:30 +02:00
2026-06-16 18:47:13 +02:00
2026-07-12 01:26:02 +02:00
2026-07-05 00:17:43 +02:00
2026-07-03 12:15:43 +02:00
2026-07-10 15:06:22 +02:00
2026-07-11 11:56:53 +02:00
2026-07-11 11:56:53 +02:00
2026-07-03 12:15:43 +02:00
2026-07-11 11:32:21 +02:00
2026-07-03 12:15:43 +02:00
2026-06-23 11:03:01 +02:00
2026-07-03 12:15:43 +02:00
2026-07-11 15:36:22 +02:00
2026-06-16 18:47:13 +02:00
2026-07-03 12:15:43 +02:00
2026-07-12 00:50:50 +02:00
2026-07-12 00:50:50 +02:00
2026-09-03 17:52:30 +02:00
2026-07-11 14:56:12 +02:00
2026-07-23 01:01:51 +02:00
2026-07-11 11:32:21 +02:00
2026-07-03 12:15:43 +02:00
2026-07-03 12:15:43 +02:00
2026-07-12 11:30:53 +02:00
2026-07-03 13:01:07 +02:00
2026-06-23 11:03:01 +02:00
2026-07-03 13:01:07 +02:00
2026-07-05 00:15:50 +02:00
2026-06-16 19:36:53 +01:00
2026-07-11 11:32:21 +02:00
2026-07-11 16:33:03 +02:00
2026-07-15 21:23:10 +02:00
2026-07-13 16:53:06 +02:00
2026-07-05 21:09:38 +02:00
2026-06-23 11:03:01 +02:00
2026-07-02 08:40:20 +02:00
2026-07-07 23:58:49 +02:00
2026-07-05 00:20:31 +02:00
2026-07-19 00:56:32 -05:00
2026-07-10 13:12:10 +02:00
2026-07-19 01:36:28 -05:00
2026-07-05 20:08:19 +02:00
2026-07-03 12:15:43 +02:00
2026-06-16 18:47:13 +02:00
2026-07-10 21:12:54 +02:00
2026-07-21 13:27:41 +02:00
2026-07-10 21:12:54 +02:00
2026-07-10 21:12:54 +02:00
2026-07-07 23:57:20 +02:00
2026-07-03 12:15:43 +02:00
2026-07-03 12:15:43 +02:00
2026-07-19 00:04:30 -05:00
2026-07-19 00:04:30 -05:00
2026-06-16 18:47:13 +02:00
2026-06-23 11:03:01 +02:00
2026-07-10 19:16:01 +02:00
2026-07-03 12:15:43 +02:00
2026-07-19 00:04:30 -05:00
2026-07-14 01:58:24 -04:00
2026-06-16 19:36:53 +01:00
2026-07-11 11:32:21 +02:00
2026-07-05 01:11:38 +02:00
2026-07-07 23:58:49 +02:00
2026-07-07 10:27:45 +02:00
2026-07-07 10:27:17 +02:00
2026-07-13 12:22:42 -04:00
2026-07-03 12:15:43 +02:00
2026-06-16 18:47:13 +02:00
2026-07-19 00:40:08 -05:00
2026-06-16 18:47:13 +02:00
2026-07-10 17:16:34 +02:00
2026-06-23 11:03:01 +02:00
2026-07-10 20:16:22 +02:00
2026-07-19 00:10:53 -05:00
2026-07-12 00:29:48 +02:00
2026-06-23 11:03:01 +02:00
2026-07-11 22:44:03 +02:00
2026-07-12 00:19:59 +02:00
2026-07-12 00:29:48 +02:00
2026-07-03 12:15:43 +02:00
2026-07-03 12:15:43 +02:00
2026-06-16 18:47:13 +02:00
2026-07-12 00:50:50 +02:00
2026-09-03 13:57:19 +02:00
2026-07-14 19:48:39 +02:00
2026-06-16 18:47:13 +02:00
2026-09-04 13:45:04 +02:00
2026-07-11 11:32:21 +02:00
2026-07-12 01:26:02 +02:00
2026-07-11 12:35:05 +02:00
2026-07-11 12:35:05 +02:00
2026-07-05 00:16:42 +02:00
2026-06-16 18:47:13 +02:00
2026-07-03 12:15:43 +02:00
2026-07-21 13:27:41 +02:00
2026-06-16 18:47:13 +02:00
2026-06-20 21:59:04 +02:00
2026-07-11 15:36:22 +02:00
2026-07-13 12:22:42 -04:00
2026-06-20 14:10:04 -07:00
2026-06-20 21:23:48 +02:00
2026-06-16 18:47:13 +02:00
2026-07-23 11:27:21 +02:00
2026-06-20 21:35:07 +02:00
2026-07-23 11:27:21 +02:00
2026-07-13 17:13:08 +02:00
2026-07-19 11:45:16 -04:00
2026-06-16 18:47:13 +02:00
2026-07-13 15:36:05 +02:00
2026-07-03 12:15:43 +02:00
2026-07-21 13:30:54 +02:00
2026-07-02 20:51:57 +02:00
2026-07-13 13:25:44 +02:00
2026-07-03 12:15:43 +02:00
2026-07-12 01:32:46 +02:00
2026-06-23 11:03:01 +02:00
2026-07-12 13:25:16 +02:00
2026-07-23 11:27:21 +02:00
2026-07-21 13:27:41 +02:00
2026-07-12 15:24:39 -05:00
2026-07-03 12:15:43 +02:00
2026-06-16 18:47:13 +02:00
2026-07-03 12:15:43 +02:00
2026-07-03 12:15:43 +02:00
2026-07-03 12:15:43 +02:00
2026-07-10 21:30:53 +02:00
2026-07-22 15:45:56 -04:00
2026-06-16 18:47:13 +02:00