Add per-node scene music volume control
Author a music track and volume (0-100%) per story node; the runtime scales it to 0-1 and applies it without restarting the track when only the level changes. Adds migration 024, threads music_volume through the repository/runtime, and gives the node inspector a volume slider. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -155,7 +155,7 @@ export function App() {
|
||||
|
||||
// Scene music follows the current node (null inherits; a finished playthrough stops).
|
||||
useEffect(() => {
|
||||
if (runtimeNode?.musicUrl) audio.setMusic(runtimeNode.musicUrl)
|
||||
if (runtimeNode?.musicUrl) audio.setMusic(runtimeNode.musicUrl, runtimeNode.musicVolume)
|
||||
else if (playthrough?.status === 'finished') audio.setMusic(null)
|
||||
}, [runtimeNode, playthrough])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user