Repository navigation
[1/3] feat: add the anomaly image cut, pixel stretch and 404 void - #118
Merged
Merged
Conversation
Each effect is built once from cropped copies of a stage layer's own texture, or one static drawing for the void, so nothing redraws per frame. Dev builds open a test chunk with F9; V toggles the effects.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
arudaev
marked this pull request as ready for review
October 23, 2026 21:23
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.
What and why
The anomaly language from docs/06, as three effects that go on top of any stage layer:
addImageCut(layer, area, shift, copies): the area shifted sideways and repeated.addPixelStretch(layer, area, row): one row smeared down the area into vertical streaks.add404Void(layer, area, seed): flat grey with torn edges and the broken-image icon.Cheap: every effect is built once – cropped copies of the layer's own texture (same position, scroll factor and depth) or one static
Graphics– so nothing redraws per frame. The geometry lives infx/anomalyLayout.ts(pure, Vitest-tested);fx/anomaly.tsturns it into game objects.Test chunk: in dev builds, F9 (from the HUD) opens
AnomalyTest: the first Rusty Creek chunk with each effect on it; V shows and hides them, arrows pan, Esc closes. It is registered only whenimport.meta.env.DEV, so production doesn't ship it.The story (#54: the creek turns) and the stage loader (#116) will call these on the anomaly chunks; areas are in layer texture pixels.
Verification
npm run typecheck,npm test(18 passing, 4 new),npm run build; production bundle has noAnomalyTest.Issue
Closes #37
Stack
Merge bottom up.