Merge branch 'main' of github.com:Bubobubobubobubo/Topos
This commit is contained in:
@ -21,9 +21,9 @@ if (!self.define) {
|
|||||||
|
|
||||||
const singleRequire = (uri, parentUri) => {
|
const singleRequire = (uri, parentUri) => {
|
||||||
uri = new URL(uri + ".js", parentUri).href;
|
uri = new URL(uri + ".js", parentUri).href;
|
||||||
return registry[uri] || (
|
return (
|
||||||
|
registry[uri] ||
|
||||||
new Promise(resolve => {
|
new Promise((resolve) => {
|
||||||
if ("document" in self) {
|
if ("document" in self) {
|
||||||
const script = document.createElement("script");
|
const script = document.createElement("script");
|
||||||
script.src = uri;
|
script.src = uri;
|
||||||
@ -34,9 +34,7 @@ if (!self.define) {
|
|||||||
importScripts(uri);
|
importScripts(uri);
|
||||||
resolve();
|
resolve();
|
||||||
}
|
}
|
||||||
})
|
}).then(() => {
|
||||||
|
|
||||||
.then(() => {
|
|
||||||
let promise = registry[uri];
|
let promise = registry[uri];
|
||||||
if (!promise) {
|
if (!promise) {
|
||||||
throw new Error(`Module ${uri} didn’t register its module`);
|
throw new Error(`Module ${uri} didn’t register its module`);
|
||||||
@ -47,27 +45,31 @@ if (!self.define) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
self.define = (depsNames, factory) => {
|
self.define = (depsNames, factory) => {
|
||||||
const uri = nextDefineUri || ("document" in self ? document.currentScript.src : "") || location.href;
|
const uri =
|
||||||
|
nextDefineUri ||
|
||||||
|
("document" in self ? document.currentScript.src : "") ||
|
||||||
|
location.href;
|
||||||
if (registry[uri]) {
|
if (registry[uri]) {
|
||||||
// Module is already loading or loaded.
|
// Module is already loading or loaded.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let exports = {};
|
let exports = {};
|
||||||
const require = depUri => singleRequire(depUri, uri);
|
const require = (depUri) => singleRequire(depUri, uri);
|
||||||
const specialDeps = {
|
const specialDeps = {
|
||||||
module: { uri },
|
module: { uri },
|
||||||
exports,
|
exports,
|
||||||
require
|
require,
|
||||||
};
|
};
|
||||||
registry[uri] = Promise.all(depsNames.map(
|
registry[uri] = Promise.all(
|
||||||
depName => specialDeps[depName] || require(depName)
|
depsNames.map((depName) => specialDeps[depName] || require(depName))
|
||||||
)).then(deps => {
|
).then((deps) => {
|
||||||
factory(...deps);
|
factory(...deps);
|
||||||
return exports;
|
return exports;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
define(['./workbox-b7fccfec'], (function (workbox) { 'use strict';
|
define(["./workbox-b7fccfec"], function (workbox) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
self.skipWaiting();
|
self.skipWaiting();
|
||||||
workbox.clientsClaim();
|
workbox.clientsClaim();
|
||||||
@ -77,28 +79,44 @@ define(['./workbox-b7fccfec'], (function (workbox) { 'use strict';
|
|||||||
* requests for URLs in the manifest.
|
* requests for URLs in the manifest.
|
||||||
* See https://goo.gl/S9QRab
|
* See https://goo.gl/S9QRab
|
||||||
*/
|
*/
|
||||||
workbox.precacheAndRoute([{
|
workbox.precacheAndRoute(
|
||||||
"url": "registerSW.js",
|
[
|
||||||
"revision": "3ca0b8505b4bec776b69afdba2768812"
|
{
|
||||||
}, {
|
url: "registerSW.js",
|
||||||
"url": "index.html",
|
revision: "3ca0b8505b4bec776b69afdba2768812",
|
||||||
"revision": "0.0ufj7f4tmog"
|
},
|
||||||
}], {});
|
{
|
||||||
|
url: "index.html",
|
||||||
|
revision: "0.0ufj7f4tmog",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
{}
|
||||||
|
);
|
||||||
workbox.cleanupOutdatedCaches();
|
workbox.cleanupOutdatedCaches();
|
||||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
workbox.registerRoute(
|
||||||
allowlist: [/^\/$/]
|
new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||||
}));
|
allowlist: [/^\/$/],
|
||||||
workbox.registerRoute(({
|
})
|
||||||
url
|
);
|
||||||
}) => [/^https:\/\/raw\.githubusercontent\.com\/.*/i, /^https:\/\/shabda\.ndre\.gr\/.*/i].some(regex => regex.test(url)), new workbox.CacheFirst({
|
workbox.registerRoute(
|
||||||
"cacheName": "external-samples",
|
({ url }) =>
|
||||||
plugins: [new workbox.ExpirationPlugin({
|
[
|
||||||
|
/^https:\/\/raw\.githubusercontent\.com\/.*/i,
|
||||||
|
/^https:\/\/shabda\.ndre\.gr\/.*/i,
|
||||||
|
].some((regex) => regex.test(url)),
|
||||||
|
new workbox.CacheFirst({
|
||||||
|
cacheName: "external-samples",
|
||||||
|
plugins: [
|
||||||
|
new workbox.ExpirationPlugin({
|
||||||
maxEntries: 5000,
|
maxEntries: 5000,
|
||||||
maxAgeSeconds: 2592000
|
maxAgeSeconds: 2592000,
|
||||||
}), new workbox.CacheableResponsePlugin({
|
}),
|
||||||
statuses: [0, 200]
|
new workbox.CacheableResponsePlugin({
|
||||||
})]
|
statuses: [0, 200],
|
||||||
}), 'GET');
|
}),
|
||||||
|
],
|
||||||
}));
|
}),
|
||||||
|
"GET"
|
||||||
|
);
|
||||||
|
});
|
||||||
//# sourceMappingURL=sw.js.map
|
//# sourceMappingURL=sw.js.map
|
||||||
|
|||||||
@ -254,7 +254,7 @@ export class SoundEvent extends AudibleEvent {
|
|||||||
roomfade: ["roomfade", "rfade"],
|
roomfade: ["roomfade", "rfade"],
|
||||||
roomlp: ["roomlp", "rlp"],
|
roomlp: ["roomlp", "rlp"],
|
||||||
roomdim: ["roomdim", "rdim"],
|
roomdim: ["roomdim", "rdim"],
|
||||||
sound: ["sound", "s"],
|
sound: ["s","sound"],
|
||||||
size: (value: number) => {
|
size: (value: number) => {
|
||||||
this.updateValue("roomsize", value);
|
this.updateValue("roomsize", value);
|
||||||
return this;
|
return this;
|
||||||
@ -435,8 +435,15 @@ export class SoundEvent extends AudibleEvent {
|
|||||||
const events = objectWithArraysToArrayOfObjects(this.values, [
|
const events = objectWithArraysToArrayOfObjects(this.values, [
|
||||||
"parsedScale",
|
"parsedScale",
|
||||||
]);
|
]);
|
||||||
|
|
||||||
for (const event of events) {
|
for (const event of events) {
|
||||||
superdough(event, this.nudge - this.app.clock.deviation, event.dur);
|
// Filter non superdough parameters
|
||||||
|
// TODO: Should filter relevant fields for superdough
|
||||||
|
// const filteredEvent = filterObject(event, ["analyze","note","dur","freq","s"]);
|
||||||
|
const filteredEvent = event;
|
||||||
|
// No need for note if there is freq
|
||||||
|
if(filteredEvent.freq) { delete filteredEvent.note; }
|
||||||
|
superdough(filteredEvent, this.nudge - this.app.clock.deviation, filteredEvent.dur);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user