feat: couple terrain surge and sun bloom to the soundtrack's low end
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
} from 'vue';
|
||||
import { createAudioController } from '@/audio/create-audio-controller';
|
||||
import { createBrowserSoundtrackEngine } from '@/audio/soundtrack-engine';
|
||||
import { setMusicPulseAudible } from '@/audio/music-pulse';
|
||||
import type {
|
||||
AudioController,
|
||||
AudioUiState,
|
||||
@@ -65,6 +66,10 @@ export function useAudioEngine(sources: AudioEngineSources): AudioEngineBinding
|
||||
watch(sources.chapter, (intent) => controller?.setChapterIntent(intent), { flush: 'sync' });
|
||||
watch(sources.drive, (sample) => controller?.setDriveEnergy(sample), { flush: 'sync' });
|
||||
watch(sources.volume, (value) => controller?.setVolume(value));
|
||||
// The world only answers the music the visitor can actually hear.
|
||||
watch(state, (next) => {
|
||||
setMusicPulseAudible(next.kind === 'running' && !next.muted && next.volume > 0);
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
ensureController();
|
||||
|
||||
Reference in New Issue
Block a user