Repository navigation
Add the HUD and photo mode to the golden_line example - #357
Merged
Merged
Conversation
Port hud.js: the clock and phase of the day, the weather, the next station with its distance and approach line, the speed gauge, the buttons and their tips, the camera label and the photo toast. Words go through ImGui with the page's fonts and metrics; the shapes go through a full-screen pass that lays them over the frame in sRGB-encoded values, as the page blends, in place of the blit (the back buffer is SRGBA8). H or the photo button hides it all, a click or Escape brings it back, and / shows the keys; -nohud turns it off, -hud shows it in a -test still. Donut_ImGuiCreateFont returns null for a missing font file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Ports the original's HUD (
src/ui/hud.js) and photo mode into the golden_line example.What's in
core/golden_line_hud.ts): the clock and time of day, the weather, the next station with its distance and approach line, the speed gauge (14 ticks), the buttons with their tooltips, the camera/controls label and the photo-mode toast.shaders/golden_line_hud.hlsl). That pass takes the blit's place and blends in sRGB-encoded values, the way the page blends; where no shape covers, the frame passes through unchanged. The back buffer is SRGBA8, so ImGui's text colours are linearized./shows the controls; 1–5, C and D show the camera label.-nohudturns the HUD off;-huddraws the whole HUD in a-teststill (that frame isn't checked).Donut_ImGuiCreateFontreturns null for a missing font file instead of a dangling pointer.Verification
hud.jsrun under node (1060 lines).ctest -R golden_linepasses 6/6.-hudstills: identical across gc, own and rc; Vulkan and D3D12 debug layers clean.Known gaps
🤖 Generated with Claude Code