Repository navigation
feat(juice): particle system, screen shake, hit flash, squash & stretch, bloom hooks - #7
Merged
Merged
Conversation
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.
B1 — Juice & effekter (arkadkänsla)
src/effects/Particles.ts— objektpoolat partikelsystem (position, velocity, gravity, drag, life, size, color, glow, additiv flagga), burst()/emit(), rendering via SpriteBatch (additiv för glow); recept: fragment-pickup, enemy-death, player-death, jump puffs, landing dust, muzzle flash, explosionsrc/effects/ScreenShake.ts— trauma-baserad skakning med dämpning, kopplad till renderer-kamera-offsetsrc/effects/HitFlash.ts— vit flash vid skada (sprite-nivå) + kort skärmflashsrc/effects/SquashStretch.ts— återanvändbar spring-back-komponent (hopp/landning)src/effects/BloomPulse.ts— energi-envelope → bloom-intensitet viarenderer.setBloomOptions()(återställs exakt)src/effects/JuiceSystem.ts— en fasad med event-recept (fragmentPickup/enemyDeath/playerDeath/jump/land/shoot/explosion/hurt/bossWarning) som spelaren/fiender konsumerarP alive/cap · shake % · bloom x.xx)Avvikelser: effects ligger i
src/effects/(dedikerad katalog håller B-vågen sammanhållen); pool-assertion strukturell (stabila identiteter + cap) eftersom GC-timing inte är tillförlitlig i Vitest; vertikal shake rör gameplay-sprites (parallax saknar Y-hook).Verifierat: typecheck 0 fel, 187/187 tester (44 nya), build + lint clean.