From 0b8bc8a89949f238baaa495ca85aece30a38af99 Mon Sep 17 00:00:00 2001 From: JannisX11 Date: Thu, 19 Jan 2023 21:21:33 +0100 Subject: [PATCH] Fix size issue with orthographic camera in GIF recorder Fix loading error on older browsers --- js/interface/dialog.js | 1 - js/io/project.js | 2 ++ js/preview/screenshot.js | 6 +++++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/js/interface/dialog.js b/js/interface/dialog.js index 672e6e51..4a0b9496 100644 --- a/js/interface/dialog.js +++ b/js/interface/dialog.js @@ -805,7 +805,6 @@ window.Dialog = class Dialog { var bar = $(this.object).find(`.form_bar_${form_id}`) if (bar.length) return bar; } - static stack = [] } window.Dialog.stack = []; diff --git a/js/io/project.js b/js/io/project.js index f3e873f4..4392652d 100644 --- a/js/io/project.js +++ b/js/io/project.js @@ -492,6 +492,8 @@ function setupProject(format) { Modes.options.edit.select(); } else if (format.paint_mode) { Modes.options.paint.select(); + } else if (format.animation_mode) { + Modes.options.animate.select(); } if (typeof Format.onSetup == 'function') { Format.onSetup(Project, false) diff --git a/js/preview/screenshot.js b/js/preview/screenshot.js index 6b1842f8..f917a099 100644 --- a/js/preview/screenshot.js +++ b/js/preview/screenshot.js @@ -323,8 +323,12 @@ const Screencam = { // Update camera NoAAPreview.controls.target.copy(preview.controls.target); NoAAPreview.camera.position.copy(preview.camera.position); - if (NoAAPreview.isOrtho && NoAAPreview.camera.zoom != preview.camera.zoom) { + if (NoAAPreview.isOrtho) { NoAAPreview.camera.zoom = preview.camera.zoom; + NoAAPreview.camera.top = preview.camera.top; + NoAAPreview.camera.bottom = preview.camera.bottom; + NoAAPreview.camera.right = preview.camera.right; + NoAAPreview.camera.left = preview.camera.left; NoAAPreview.camOrtho.updateProjectionMatrix(); }