Adapt fullscreen beat response
This commit is contained in:
1 parent
27c289483b
commit
d07221f600
3 files changed
+41
-12
No files matched your search
@@ -0,0 +1,9 @@
|
||||
export function shapeBeatPulse(value: number) {
|
||||
const strength = Math.max(0, Math.min(0.4, value))
|
||||
if (strength <= 0.2) return strength * 0.4
|
||||
if (strength <= 0.35) {
|
||||
const progress = (strength - 0.2) / 0.15
|
||||
return 0.08 + (1 - (1 - progress) ** 3) * 0.42
|
||||
}
|
||||
return 0.5 + ((strength - 0.35) / 0.05) * 0.05
|
||||
}
|
||||
Reference in new issue
Block a user