Massive overhaul: the renderers are now classes that implement Renderer; replaced webpack and rollup with vite; converted bundle-contents to "core" and "full" bundle profiles; renamed "inclusions" to "staticAssets", which are "url" base64-encoded images and "raw" text strings; renamed the Matrix component module to the JSX extension; built out a test scaffold at tools/test/index.html to manually test the various deploy options.

This commit is contained in:
Rezmason
2025-05-23 12:49:10 -07:00
parent 658f07c6ab
commit 3b837c6f06
29 changed files with 2338 additions and 6918 deletions

View File

@@ -60,8 +60,8 @@ const loadImage = (cache, regl, url, mipmap) => {
const data = new Image();
data.crossOrigin = "anonymous";
let imageURL;
if (typeof cache.get(`import::${url}`) === "function") {
imageURL = (await cache.get(`import::${url}`)()).default;
if (typeof cache.get(`url::${url}`) === "function") {
imageURL = (await cache.get(`url::${url}`)()).default;
} else {
imageURL = url;
}
@@ -103,13 +103,11 @@ const loadText = (cache, url) => {
},
loaded: (async () => {
if (url != null) {
let textURL;
if (typeof cache.get(`import::${url}`) === "function") {
textURL = (await cache.get(`import::${url}`)()).default;
if (typeof cache.get(`raw::${url}`) === "function") {
text = (await cache.get(`raw::${url}`)()).default;
} else {
textURL = url;
text = await (await fetch(url)).text();
}
text = await (await fetch(textURL)).text();
loaded = true;
}
})(),