Skip to content

Examples: Jungle Rabbit, a low-poly river endless runner - #1670

Merged
obiot merged 1 commit into
masterfrom
example/jungle-rabbit
Sep 15, 2026
Merged

obiot merged 1 commit into
masterfrom
example/jungle-rabbit

Conversation

@obiot

@obiot obiot commented Sep 15, 2026

Copy link
Copy Markdown
Member

The example 20.5 was waiting on. Held out of the tree until 20.5.0 published to npm; that happened today, so it lands now.

An endless river runner on the 3D tier — the boat holds station on screen while the course is recycled past it, so the world stays a handful of pooled objects rather than a level that grows.

What it showcases

  • InstancedMesh for bank vegetation and the boulder field — one draw call per prop type, which is what lets the valley be dense rather than suggestive
  • a rigged, animated glTF (the paddling boat), placed and driven through GLTFModel's own pos / rotate / scale — the placement API added in 20.5
  • procedural terrain and water as vertex-coloured meshes, fading toward the sky through Camera3d distance fog
  • ground shadows, transparency sorting, and a mesh-hosted ShaderEffect for the sun's lens flare — aimed from the sun disc, and depth-ordered below the HUD rather than drawn over it
  • Text gradient fills for the title and menu

Also included

scripts/backends.mjs, the three-browser screenshot harness this example was built with. Headless Chromium has no GPU and silently falls back to WebGL 2 on SwiftShader, so it cannot see a WebGPU bug at all — the headed Chrome and WebKit targets are the ones that find them, and they do not always agree with each other. That harness is how the Safari glyph-clipping bug was caught.

Verified for this PR on headed Chrome (WebGPU, Metal-3) and headed WebKit (WebGPU); pnpm lint and both tsc gates pass.

Asset licensing

Credits added to packages/examples/LICENSE.md alongside the other examples. Models are original Blender work (MIT with the rest of the source); music is Pixabay-licensed and credited on the title screen.

⚠️ The display face Crang is CC BY-NC-SA 4.0 — non-commercial use only, the one asset in the gallery that is not free for commercial reuse. Called out explicitly in LICENSE.md so anyone copying the example sees it, and the upstream licence ships next to the font.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NGvtaUNATVCVxD2qcbiY4t

An endless river runner built on the 3D tier. The boat holds station on
screen while the course is recycled past it, so the world stays a handful
of pooled objects rather than a level that grows.

What it showcases, and why it earns its place in the gallery:

- InstancedMesh for the bank vegetation and the boulder field — one draw
  call per prop type, which is what lets the valley be dense rather than
  suggestive
- a rigged, animated glTF (the paddling boat) placed and driven through
  `GLTFModel`'s own `pos` / `rotate` / `scale`
- procedural terrain and water built as vertex-coloured meshes, fading
  toward the sky through `Camera3d`'s distance fog
- ground shadows, transparency sorting and a mesh-hosted `ShaderEffect`
  for the sun's lens flare, aimed from the sun disc and drawn below the
  HUD rather than over it
- `Text` gradient fills for the title and menu, on a display face

Also adds `scripts/backends.mjs`, the three-browser screenshot harness this
example was built with. Headless Chromium has no GPU and silently falls
back to WebGL 2 on SwiftShader, so it cannot see a WebGPU bug at all; the
headed Chrome and WebKit targets are the ones that find them, and they do
not always agree with each other.

Asset credits go in `LICENSE.md` alongside the other examples. Note the
display face is CC BY-NC-SA — the one asset in the gallery that is not
free for commercial reuse — so it is called out explicitly there.

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 15, 2026 05:08

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 70a9c65 into master Sep 15, 2026
6 checks passed
@obiot
obiot deleted the example/jungle-rabbit branch September 15, 2026 05:13
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