mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 01:18:34 +00:00
fixed animation loop & uploading of render.
This commit is contained in:
1 parent
98c2c28ca1
commit
3e8202550c
2 files changed
+8
-5
No files matched your search
@@ -839,6 +839,9 @@ class Editor {
|
||||
if (this.generating_preview) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.rendering = false;
|
||||
|
||||
this.generating_preview = true;
|
||||
const ffmpeg = createFFmpeg({ log: true });
|
||||
await ffmpeg.load();
|
||||
@@ -1013,7 +1016,7 @@ class Editor {
|
||||
|
||||
// This initializes the generation of a video render scene is where the core work happens
|
||||
generateVideo() {
|
||||
console.log("Generating video...");
|
||||
console.log("Generating video...", this.frame_buffer);
|
||||
if (this.rendering || this.generating_preview) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -538,10 +538,10 @@ export class TimeLine {
|
||||
await this.animation_engine.clips[
|
||||
object.uuid + element.media_id
|
||||
].play(object);
|
||||
let fps = 120;
|
||||
if (isRendering) {
|
||||
fps = 60;
|
||||
}
|
||||
let fps = 60;
|
||||
//if (isRendering) {
|
||||
// fps = 60;
|
||||
//}
|
||||
this.animation_engine.clips[object.uuid + element.media_id].step(
|
||||
this.scrubber_frame_position / fps, // Double FPS for best result.
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user