hotfix: prebake flag to skip fetch
This commit is contained in:
parent
21b2184750
commit
8244ba7754
2 changed files with 7 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import { Pattern, toMidi } from '@strudel.cycles/core';
|
||||
import { samples } from '@strudel.cycles/webaudio';
|
||||
|
||||
export function prebake() {
|
||||
export function prebake(isMock = false) {
|
||||
samples(
|
||||
{
|
||||
piano: {
|
||||
|
|
@ -41,9 +41,11 @@ export function prebake() {
|
|||
// License: CC-by http://creativecommons.org/licenses/by/3.0/ Author: Alexander Holm
|
||||
'./piano/',
|
||||
);
|
||||
fetch('EmuSP12.json')
|
||||
.then(res => res.json())
|
||||
.then(json => samples(json, './EmuSP12/'));
|
||||
if (!isMock) {
|
||||
fetch('EmuSP12.json')
|
||||
.then((res) => res.json())
|
||||
.then((json) => samples(json, './EmuSP12/'));
|
||||
}
|
||||
}
|
||||
|
||||
const maxPan = toMidi('C8');
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ const uiHelpersMocked = {
|
|||
backgroundImage: id,
|
||||
};
|
||||
|
||||
prebake();
|
||||
prebake(true);
|
||||
|
||||
// TODO: refactor to evalScope
|
||||
extend(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue