Skip to content

Jungle Rabbit: drop prewarmScene, which the preloader now does - #1673

Merged
obiot merged 1 commit into
masterfrom
chore/jungle-rabbit-dead-code
Sep 16, 2026
Merged

obiot merged 1 commit into
masterfrom
chore/jungle-rabbit-dead-code

Conversation

@obiot

@obiot obiot commented Sep 16, 2026

Copy link
Copy Markdown
Member

prewarmScene drew the whole scene once behind the loading screen to pay the first-draw shader cost early. It shipped in #1670 as an unwired export, with a debug leftover in it:

scenery.ts:92    * NOT WIRED UP. It works — it does link the programs…
scenery.ts:237   // TEMP: hold so the warm-up can be observed    ← waits 90 frames; the logic wants 2

My pre-commit sweep grepped for TODO|FIXME|XXX|HACK and matched none of those, which is how it got in.

Why delete rather than wire it up

It is now redundant as well as dead:

Keeping a function that advertises itself as working-but-unused is worse than not having it.

What goes

195 lines, the eight imports that existed only for it, and a comment in createGame.ts describing the loading screen popping its logo out on LOADER_COMPLETE — which stopped being true when that teardown moved to stage destroy.

Verified: the example renders with no page errors, types and lint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NGvtaUNATVCVxD2qcbiY4t

`prewarmScene` drew the whole scene once behind the loading screen to pay the
first-draw shader cost early. It shipped in #1670 as an unwired export — with
a `// TEMP` hold left in it that waits 90 frames where the logic wants 2. My
pre-commit sweep grepped for TODO/FIXME/XXX/HACK and matched none of them.

It is redundant as well as dead now. `renderer.prewarm()` runs from
`loader.preload()` by default, so this example gets the engine's programs
built behind the loading screen without doing anything, and the stall the
function was written for is covered by the transition fade that #1671 made
render. Its own documented blocker also still stands: the built-in progress
bar is a world-space renderable, so a 3D warm-up scene buries it.

195 lines, plus the eight imports that existed only for it and a comment in
`createGame.ts` that described the loading screen popping its logo out on
`LOADER_COMPLETE` — which stopped being true when that teardown moved to
stage destroy.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NGvtaUNATVCVxD2qcbiY4t
Copilot AI lite review requested due to automatic review settings September 16, 2026 10:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@obiot
obiot merged commit a22193f into master Sep 16, 2026
6 checks passed
@obiot
obiot deleted the chore/jungle-rabbit-dead-code branch September 16, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants