fix: WebGL frame rendering and opencut-wasm 0.2.8

This commit is contained in:
Maze Winther
2026-04-19 07:42:52 +02:00
parent 9da365bc01
commit 729d10592f
14 changed files with 338 additions and 127 deletions
@@ -10,7 +10,10 @@ import { useKeybindingsStore } from "@/stores/keybindings-store";
import { useTimelineStore } from "@/stores/timeline-store";
import { useEditorActions } from "@/hooks/actions/use-editor-actions";
import { loadFontAtlas } from "@/lib/fonts/google-fonts";
import { initializeGpuRenderer, isGpuAvailable } from "@/services/renderer/gpu-renderer";
import {
initializeGpuRenderer,
isGpuAvailable,
} from "@/services/renderer/gpu-renderer";
interface EditorProviderProps {
projectId: string;
@@ -62,9 +65,16 @@ export function EditorProvider({ projectId, children }: EditorProviderProps) {
setIsLoading(false);
}
} else {
setError(
err instanceof Error ? err.message : "Failed to load project",
);
const wasmPanic = (window as Window & { __wasmPanic?: string })
.__wasmPanic;
if (wasmPanic) {
delete (window as Window & { __wasmPanic?: string }).__wasmPanic;
setError(wasmPanic);
} else {
setError(
err instanceof Error ? err.message : "Failed to load project",
);
}
setIsLoading(false);
}
}