summaryrefslogtreecommitdiff
path: root/test-client/particles.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-09-25 00:31:43 +0200
committermetamuffin <metamuffin@disroot.org>2024-09-25 00:31:43 +0200
commite4aae7680926d5023a22776d0c332d22c735b034 (patch)
tree6769b9bb62ac61423557af7718929348bfc8aa1c /test-client/particles.ts
parenta36e8d2f23c659cea1e12654cff9c7565a9762b6 (diff)
downloadhurrycurry-e4aae7680926d5023a22776d0c332d22c735b034.tar
hurrycurry-e4aae7680926d5023a22776d0c332d22c735b034.tar.bz2
hurrycurry-e4aae7680926d5023a22776d0c332d22c735b034.tar.zst
tc: particle hue
Diffstat (limited to 'test-client/particles.ts')
-rw-r--r--test-client/particles.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/test-client/particles.ts b/test-client/particles.ts
index ba695cc0..e84e9c91 100644
--- a/test-client/particles.ts
+++ b/test-client/particles.ts
@@ -14,7 +14,7 @@ export function draw_particles() {
}
export function particle_count() { return particles.size }
-export function particle_splash(pos: V2) {
+export function particle_splash(pos: V2, hue: number) {
for (let i = 0; i < 64; i++) {
const p = new Particle()
p.px = pos.x + 0.5
@@ -25,7 +25,7 @@ export function particle_splash(pos: V2) {
p.vy = Math.cos(a) * r
p.decay = 4.
p.tr = Math.sqrt(Math.random()) * 1.
- p.c = `hsl(${Math.random() * 0.2 + 0.7}turn, 100%, 50%)`
+ p.c = `hsl(${Math.random() * 0.2 - 0.1 + hue}turn, 100%, 50%)`
p.r = Math.random() * 0.1 + 0.03
particles.add(p)
}