sparkar-sound
v0.4.0
Published
A wrapped SparkAR audio tool.
Downloads
1
Readme
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 ARImport
Sound
moduleimport { Sound } from './Sound'; // Your script...
~~You can also Click Here to Download a Sample Project.~~
npm
Add package with
yarn
ornpm
yarn add sparkar-sound
or
npm i sparkar-sound
Load in the required module
import { Sound } from 'sparkar-sound' // Your script...
Usage
Please make sure the speaker and audio playback controller have the same name.
async function main(){
// Declared a sound
const sfx = await Sound('sfx');
// play the sound
sfx.play();
}