From 2de03ff7f74631253e920aef275d9243bc47e721 Mon Sep 17 00:00:00 2001 From: Skyler Lehmkuhl Date: Thu, 23 Jan 2025 04:55:46 -0500 Subject: [PATCH] restore finishEncoding function --- src/main.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/main.js b/src/main.js index 9d14ab6..fdc5b64 100644 --- a/src/main.js +++ b/src/main.js @@ -5064,6 +5064,19 @@ async function setupVideoExport(ext, path, canvas, exportContext) { // audioEncoder.configure(audioConfig) + async function finishEncoding() { + const progressText = document.getElementById('progressText'); + progressText.innerText = 'Finalizing...'; + const progressBar = document.getElementById('progressBar'); + progressBar.value = 100; + await videoEncoder.flush(); + muxer.finalize(); + await writeFile(path, new Uint8Array(target.buffer)); + const modal = document.getElementById('progressModal'); + modal.style.display = 'none'; + document.querySelector("body").style.cursor = "default"; + } + const processFrame = async (currentFrame) => { if (currentFrame < root.maxFrame) { // Update progress bar @@ -5966,7 +5979,7 @@ function stage() { for (let child of context.selection) { if (!context.activeObject.currentFrame) continue; if (!context.activeObject.currentFrame.keys) continue; - if (!child.idx in context.activeObject.currentFrame.keys) continue; + if (!(child.idx in context.activeObject.currentFrame.keys)) continue; context.activeObject.currentFrame.keys[child.idx].x += mouse.x - context.lastMouse.x; context.activeObject.currentFrame.keys[child.idx].y +=