restore finishEncoding function
This commit is contained in:
parent
c79476e7a9
commit
2de03ff7f7
15
src/main.js
15
src/main.js
|
|
@ -5064,6 +5064,19 @@ async function setupVideoExport(ext, path, canvas, exportContext) {
|
||||||
|
|
||||||
// audioEncoder.configure(audioConfig)
|
// 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) => {
|
const processFrame = async (currentFrame) => {
|
||||||
if (currentFrame < root.maxFrame) {
|
if (currentFrame < root.maxFrame) {
|
||||||
// Update progress bar
|
// Update progress bar
|
||||||
|
|
@ -5966,7 +5979,7 @@ function stage() {
|
||||||
for (let child of context.selection) {
|
for (let child of context.selection) {
|
||||||
if (!context.activeObject.currentFrame) continue;
|
if (!context.activeObject.currentFrame) continue;
|
||||||
if (!context.activeObject.currentFrame.keys) 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 +=
|
context.activeObject.currentFrame.keys[child.idx].x +=
|
||||||
mouse.x - context.lastMouse.x;
|
mouse.x - context.lastMouse.x;
|
||||||
context.activeObject.currentFrame.keys[child.idx].y +=
|
context.activeObject.currentFrame.keys[child.idx].y +=
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue