This commit is contained in:
Jordan Eldredge 2021-07-17 13:07:59 -07:00
parent 38df61fbd2
commit 9fd8206e1f

View file

@ -1,7 +1,9 @@
// This module is imported early here in order to avoid a circular dependency.
import { classResolver } from "./skin/resolver";
import { normalizedObjects, getFormattedId } from "./maki/objects";
import BaseObject from "./skin/BaseObject";
import BaseObject from "./skin/makiClasses/BaseObject";
// import { addDropHandler } from "./dropTarget";
// import JSZip from "jszip";
function hack() {
// Without this Snowpack will try to treeshake out resolver causing a circular
@ -9,6 +11,20 @@ function hack() {
classResolver("A funny joke about why this is needed.");
}
/*
async function validateSkinMaki(file: Blob) {
const zip = await JSZip.loadAsync(file);
const maki = zip.filter((path) => path.endsWith(".maki"));
for (const zipFile of maki) {
console.log(zipFile.name);
const arraybuffer = await zip.loadAsync("arraybuffer");
console.log(arraybuffer);
}
}
addDropHandler(validateSkinMaki);
*/
function getClass(guid: string): typeof BaseObject | null {
try {
return classResolver(guid);