feat(effects): extinguish fire with water/rain and ambient SFX volume
Water and rain erase fire under a tight brush hit radius; add looping fire/rain ambients and an Effects sound slider that also scales one-shot effect SFX. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
/** Общая громкость звуков эффектов (огонь ambient + one-shot). 0…1. */
|
||||
|
||||
let effectsSfxGain = 0.75;
|
||||
|
||||
export function clampEffectsSfxGain(v: number): number {
|
||||
if (!Number.isFinite(v)) return 0.75;
|
||||
return Math.max(0, Math.min(1, v));
|
||||
}
|
||||
|
||||
export function getEffectsSfxGain(): number {
|
||||
return effectsSfxGain;
|
||||
}
|
||||
|
||||
export function setEffectsSfxGain(v: number): number {
|
||||
effectsSfxGain = clampEffectsSfxGain(v);
|
||||
return effectsSfxGain;
|
||||
}
|
||||
Reference in New Issue
Block a user