mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-05 17:58:55 +00:00
Fixed ffmpeg and aspect ratio. (#282)
This commit is contained in:
1 parent
f75c2a9af2
commit
1dd0ca75f7
1 file changed
+2
-1
@@ -1158,6 +1158,8 @@ class Editor {
|
||||
}
|
||||
|
||||
this.renderer.setSize(this.render_width, this.render_height);
|
||||
this.render_camera.aspect = this.render_width / this.render_height;
|
||||
this.render_camera.updateProjectionMatrix();
|
||||
this.renderer.render(this.activeScene.scene, this.render_camera);
|
||||
const imgData = this.renderer.domElement.toDataURL();
|
||||
this.activeScene.renderMode(false);
|
||||
@@ -1183,7 +1185,6 @@ class Editor {
|
||||
const blob = new Blob([output.buffer], { type: "video/mp4" });
|
||||
ffmpeg.exit()
|
||||
this.generating_preview = false;
|
||||
ffmpeg.exit();
|
||||
|
||||
try {
|
||||
const url = await this.api_manager.uploadMediaFrameGeneration(
|
||||
|
||||
Reference in new issue
Block a user