Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

SoundProps

Property Type Default value Description
bus? "voice" | "effects" | "music" | "interface" | AudioBusName AudioBusName.Effects The bus of the page’s audio mixer it plays into, whose effects it passes through and whose volume slider it follows, as Godot’s AudioStreamPlayer.bus names one.
fadeInSeconds? number 0 Seconds it takes to rise from silence to its volume, counted on the audio clock from when it starts playing, so a slow load never cuts the fade short, as Unreal’s UAudioComponent::FadeIn.
fadeOutSeconds? number 0 Seconds it takes to fall from its level to silence once it unmounts or its url changes, counted on the audio clock, before it stops, as Unreal’s UAudioComponent::FadeOut.
loop? boolean false Starts again each time it ends, rather than playing once.
maxDistance? number undefined Metres from the listener at which a placed sound falls silent, fading in a straight line from minDistance, as Unity’s linear rolloff; left out, it fades on without end, by the inverse of its distance.
minDistance? number 1 Metres from the listener within which a placed sound plays at its full volume, as Unity’s AudioSource.minDistance.
position? Vector3Tuple undefined Where it plays from, [x, y, z] in metres, outside an Entity: a sound of a place that no entity of its own stands at.
url string undefined The file, a ?url import or one of sounds.
volume? number 1 0 is silent and 1 is the file as recorded.