0.4.0 • Published 4 years ago

sparkar-sound v0.4.0

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

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

  1. Download Sound

  2. Drag/Drop or Import Sound.js to Spark AR

  3. Import Sound module

    import { Sound } from './Sound';
    // Your script...
  4. You can also Click Here to Download a Sample Project.

npm

  1. Add package with yarn or npm

    yarn add sparkar-sound

    or

    npm i sparkar-sound
  2. 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();
}
0.4.0

4 years ago

0.3.0

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago