Sound
Sound is a simple tool to control audio with script in Spark AR.
This is the reconstructed version of sparkar-audio-objcet.
Install
Import
-
Drag/Drop or Import
Sound.js
to Spark AR -
Import
Sound
module;// Your script... -
You can also Click Here to Download a Sample Project.
npm
-
Add package with
yarn
ornpm
yarn add sparkar-soundor
npm i sparkar-sound -
Load in the required module
// Your script...
Usage
Please make sure the speaker and audio playback controller have the same name.
{ // Declared a sound const sfx = await ; // play the sound sfx;}