Repository navigation
spec(t27f): reel host entry points for wasm hosts (Closes #9980) - #9982
Merged
Merged
Conversation
A wasm export carries scalars only and gen-js emits no bodies, so a host could not run reel.t27's camera and screen mapping without re-implementing them. Add scalar entry points that name the demo reel and compose camera with screen mapping: corner_dx/dy, demo_frames, demo_scene_at, demo_still, demo_sx/sy, demo_r, demo_corner_sx/sy. gHashTag/t27-mcp t27f_view draws stills from a wasm build of the Zig output. Tests: hexagon_corners_close_the_cell, demo_entry_points_match_the_reel, overview_still_fits_every_frame (every corner of every cell on every preset). Refs #9965 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Consumer: gHashTag/t27-mcp#3 (t27f_view) builds these entry points into wasm/reel.wasm and draws the demo stills from them. |
gHashTag
enabled auto-merge (squash)
October 17, 2026 15:10
Contributor
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.
Summary
This PR adds scalar host entry points to
specs/t27f/reel.t27, so a wasm host can draw stills of the demo reel without re-implementing the spec's math. Closes #9980. Refs #9965.A wasm export carries scalars only, and
gen-jsemits constants but no bodies. So the new entry points take the demo reel by name rather than as arrays. They also compose the camera with the screen mapping inside the spec, so the host only draws what they return:corner_dx(i)andcorner_dy(i): corner i of a pointy-top hexagon, in world units;demo_frames(),demo_scene_at(f)anddemo_still(scene): the demo reel's frame clock;demo_sx,demo_syanddemo_r: world coordinates to screen pixels at frame f, for a given preset;demo_corner_sxanddemo_corner_sy: a cell's corner on screen.The consumer is gHashTag/t27-mcp
t27f_view, which runs the bodies from a wasm build of this file's Zig output and reads the constants from itsgen-jsoutput.Tests added
hexagon_corners_close_the_cell: opposite corners mirror, the top corner is at -HEX_R, and the side corners are at +/-HALF_W.demo_entry_points_match_the_reel:overview_still_fits_every_frame: every corner of every cell at the overview still lies inside the frame on all three presets (486 asserts).Evidence (Railway lab, compiler 0.5.2 built at 57474a4)
corner_dy(0)flipped fails 2 tests;>=changed to>indemo_stillfails 1 test;camera_cyreplaced byOVERVIEW_CYindemo_syfails 1 test. It survived until the lens-still assert was added, because cell 10's y equals OVERVIEW_CY.specs/t27f/reel.t27:1ec53e9f89801946c7c265049e20b775dbf4d71822bd4c00b262c827a3e76f87.The header no longer says that no host imports the file. It now names
t27f_viewas the only host. It still says that no video has been rendered.🤖 Generated with Claude Code