More matter-like stuff
Some checks failed
On Push Deploy / deploy (push) Has been cancelled

This commit is contained in:
Johnny322
2026-02-08 15:51:19 +01:00
parent 6e6a3218c8
commit 6a319f0a3e
2 changed files with 15 additions and 21 deletions

View File

@@ -399,8 +399,10 @@ export default {
for (let i = highBandStart; i < freq.length; i += 1) highSum += freq[i]
const highAvg = highSum / Math.max(1, freq.length - highBandStart) / 255
const rayTarget = Math.min(1, (lowAvg * 0.6 + highAvg * 0.9) * 1.4)
this.rayLevel = this.rayLevel * 0.7 + rayTarget * 0.3
const weightedEnergy = lowAvg * 0.4 + highAvg * 0.7
const compressed = Math.pow(Math.min(1, weightedEnergy * 1.1), 1.8)
const rayTarget = Math.min(1, compressed)
this.rayLevel = this.rayLevel * 0.78 + rayTarget * 0.22
const hueTarget = 180 + highAvg * 120
this.rayHue = this.rayHue * 0.8 + hueTarget * 0.2
this.rafId = requestAnimationFrame(tick)