MCPcopy Create free account
hub / github.com/QuarkGluonPlasma/react-course-code / addVolumeNode

Function addVolumeNode

audio-flow/src/App.tsx:56–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

54 }
55
56 function addVolumeNode() {
57 const id = Math.random().toString().slice(2, 8);
58 const data = { gain: 0.5 };
59 const position = { x: 0, y: 0 };
60 const type = 'volume';
61
62 setNodes([...nodes, {id, type, data, position}])
63 createAudioNode(id, type, data);
64 }
65
66 return (
67 <div style={{ width: '100vw', height: '100vh'}}>

Callers

nothing calls this directly

Calls 1

createAudioNodeFunction · 0.90

Tested by

no test coverage detected