Change storage to use indexDB within binary format

This commit is contained in:
2025-02-12 00:55:15 +01:00
parent 49f1cf008b
commit b9f83b6bd4
12 changed files with 244 additions and 207 deletions
+17 -8
View File
@@ -1,3 +1,5 @@
import { Mural } from "./lib/mural";
export interface RGB {
r: number;
g: number;
@@ -22,13 +24,8 @@ export interface LoadUnload {
unload: () => Promise<void> | void;
}
export interface SelectedMural {
m: MuralEx;
w: number;
h: number;
}
export interface MuralEx extends MuralOld {
export interface MuralEx {
mural: Mural;
ref: HTMLCanvasElement;
pixelCount: number;
}
@@ -43,4 +40,16 @@ export interface Rect {
y: number;
width: number;
height: number;
}
}
export interface ImportOutputMural {
type: "mural",
data: Mural
}
export interface ImportOutputImage {
type: "image",
data: HTMLImageElement;
}
export type ImportOutput = ImportOutputImage | ImportOutputMural;