mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-10 21:28:31 +00:00
lint
This commit is contained in:
parent
53d43dc44c
commit
3ee7d0cd4f
@ -56,20 +56,21 @@ export function registerSamplesFromDB(config = userSamplesDBConfig, onComplete =
|
|||||||
|
|
||||||
return blobToDataUrl(blob).then((soundPath) => {
|
return blobToDataUrl(blob).then((soundPath) => {
|
||||||
const titlePathMap = sounds.get(parentDirectory) ?? new Map();
|
const titlePathMap = sounds.get(parentDirectory) ?? new Map();
|
||||||
|
|
||||||
titlePathMap.set(title,soundPath)
|
titlePathMap.set(title, soundPath);
|
||||||
|
|
||||||
sounds.set(parentDirectory, titlePathMap);
|
sounds.set(parentDirectory, titlePathMap);
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
|
||||||
sounds.forEach((titlePathMap, key) => {
|
sounds.forEach((titlePathMap, key) => {
|
||||||
const value = Array.from(titlePathMap.keys()).sort((a,b) => {
|
const value = Array.from(titlePathMap.keys())
|
||||||
return a.localeCompare(b)
|
.sort((a, b) => {
|
||||||
}).map(title => titlePathMap.get(title));
|
return a.localeCompare(b);
|
||||||
|
})
|
||||||
|
.map((title) => titlePathMap.get(title));
|
||||||
|
|
||||||
registerSound(key, (t, hapValue, onended) => onTriggerSample(t, hapValue, onended, value), {
|
registerSound(key, (t, hapValue, onended) => onTriggerSample(t, hapValue, onended, value), {
|
||||||
type: 'sample',
|
type: 'sample',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user