hotfix: prebake flag to skip fetch

This commit is contained in:
Felix Roos 2022-08-07 00:14:27 +02:00
parent 21b2184750
commit 8244ba7754
2 changed files with 7 additions and 5 deletions

View File

@ -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');

View File

@ -123,7 +123,7 @@ const uiHelpersMocked = {
backgroundImage: id,
};
prebake();
prebake(true);
// TODO: refactor to evalScope
extend(