feat(#215): debris particles behind the rock, and a jump that moves it#216
Open
cnotv wants to merge 1 commit into
Open
feat(#215): debris particles behind the rock, and a jump that moves it#216cnotv wants to merge 1 commit into
cnotv wants to merge 1 commit into
Conversation
Chips are thrown from just forward of the rock's contact patch whenever it is on the ground and moving, then immediately left behind. They are pooled: a fixed set is recycled oldest-first, so a long run never allocates. The whole trail draws in two instanced meshes — the chips, and a slightly larger copy drawn back-faces-only that reads as an ink outline around each one — so the hand-drawn stroke costs one extra draw call rather than one per particle. Their colours are the path and the rock. Not the rock's tint, which is the multiplier applied over a dark albedo and on its own is a pale peach that disappears against the path; the rock's apparent colour is its own constant. The jump was firing all along and moving the rock nine centimetres. An impulse is momentum, so it has to grow with the mass, and tripling the rock to 72 had left the old figure launching it at 1.3 m/s. It now clears roughly its own height. Contact for debris is judged with more room than the jump's, because the rock leaves the deck briefly over every crest and the trail flickered. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
✅ Deploy Preview for cnotv-generative-art ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Closes #215
Summary
Debris kicked up behind the rock while it is grounded and moving, and a fix for the jump, which was firing all along but moving the rock nine centimetres.
Key Changes
Debris
New
game/debris.ts. Chips are thrown from just forward of the rock's contact patch and immediately left behind, so they read as scuffed off the ground rather than falling out of the ball.Jump
JUMP_IMPULSEwas still tuned for the rock's old mass. An impulse is momentum, so it has to grow with the mass: at 95 against a mass of 72 the rock launched at 1.3 m/s and rose nine centimetres — indistinguishable from nothing happening. It now clears roughly its own height.Contact tolerance
Debris judges ground contact with more room than the jump does. The rock leaves the deck briefly over every crest, and sharing the jump's stricter probe made the trail flicker.
Added on top of the initial plan
ROCK_TINT, which is the multiplier applied over a dark albedo — on its own a pale peach. Both palette colours were then pale sand on a pale sand path and the chips were invisible even while the pool reported them alive. The rock's apparent colour is now its own constant.Test Plan
pnpm test:unit— 1729 passed, 22 of them new: particle integration under gravity, lifetime and fade, launch direction and spread, the two-mesh structure and back-face stroke, pooling under sustained emission, and emission pacing.pnpm lint— 0 errors.pnpm type-check— clean.🤖 Generated with Claude Code