Satie in React Three Fiber
Use the same sound scene and Three.js adapter through a component that owns loading, frame updates and cleanup.
Browser runtime
Read as Markdown1. Prepare the scene
Ask your coding agent to use satie_setup for r3f. Install the runtime and load the exported scene.contract.json before mounting the audio component.
Terminal
npm install https://www.satie.world/runtime/0.4.15/satie-runtime.tgz2. Mount once inside Canvas
Keep the contract and bindings stable between renders. SatieAudio loads the scene, follows the camera each frame and disposes on unmount. Enable Start sound only after onReady supplies the audio instance.
React · World and contract are supplied by your project
import { useState } from "react";
import { Canvas } from "@react-three/fiber";
import { SatieAudio } from "satie-runtime/react";
import type { SatieScene } from "satie-runtime/three";
// Inside your component:
const [audio, setAudio] = useState<SatieScene | null>(null);
return <>
<button disabled={!audio} onClick={() => { void audio?.start(); }}>
Start sound
</button>
<Canvas>
<World />
<SatieAudio contract={contract} onReady={setAudio}
onError={console.error} />
</Canvas>
</>;3. Use the ready instance
Send gameplay events and signals through the instance returned by onReady. Use listener, listenerOffset and listenerOrientation when the ears belong to a character rather than the render camera. For local editing, pass the mixer prop only in development.
Component props · Three.js events and release stepsSupport and validation
Maintained React wrapper over the browser runtime; component and adapter tests.
Mount inside Canvas, wait for onReady and start audio from a user gesture. Uses the web runtime.
Not yet validated: Check the browser and device used by your project.