rename setSound to registerSound
This commit is contained in:
parent
ff1e6714c6
commit
6f5d096e6d
4 changed files with 10 additions and 11 deletions
|
|
@ -14,8 +14,7 @@ import { getFilter, gainNode } from './helpers.mjs';
|
|||
import { map } from 'nanostores';
|
||||
|
||||
export const soundMap = map();
|
||||
// onTrigger = ({ hap: Hap, t: number, deadline: number, duration: number, cps: number }) => AudioNode
|
||||
export function setSound(key, onTrigger, data = {}) {
|
||||
export function registerSound(key, onTrigger, data = {}) {
|
||||
soundMap.setKey(key, { onTrigger, data });
|
||||
}
|
||||
export function getSound(s) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue