The bug was due to forggeting to bind this to the snapShotOfCurrentFrame function

This commit is contained in:
Michael Chung committed 2025-05-09 18:05:43 -04:00
1 parent 2d01073434
commit 866e80d6af
2 files changed
+4 -3

No files matched your search

@@ -840,7 +840,7 @@ class Editor {
}
const uuid = crypto.randomUUID();
const file = new File([ab], `${uuid}.png`, { type: mimeString });
console.log("snapShotOfCurrentFrame Function Called 2");
return { base64Snapshot, file };
}
@@ -342,13 +342,14 @@ export const PageEditor = () => {
handleCameraFocalLengthChange={handleCameraFocalLengthChange}
onAspectRatioSelect={onAspectRatioSelect}
setEnginePrompt={(prompt) => {
console.log("setEnginePrompt", prompt);
if (!editorEngine) {
console.log("editorEngine is not available");
return;
}
editorEngine!.positive_prompt = prompt;
}}
snapshotCurrentFrame={editorEngine?.snapShotOfCurrentFrame}
snapshotCurrentFrame={editorEngine?.snapShotOfCurrentFrame.bind(editorEngine)}
/>
<LoadingDots