This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user