From 6e512c9f9d7ebf3bcf7870144d74eada7c60a9e7 Mon Sep 17 00:00:00 2001 From: Dave Pagurek Date: Fri, 13 Oct 2023 09:18:07 -0400 Subject: [PATCH] Fix camera flipping on framebuffers between push/pop calls --- src/webgl/p5.Camera.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webgl/p5.Camera.js b/src/webgl/p5.Camera.js index f592732317..3ffa915876 100644 --- a/src/webgl/p5.Camera.js +++ b/src/webgl/p5.Camera.js @@ -1622,7 +1622,8 @@ p5.Camera = class Camera { 'eyeX', 'eyeY', 'eyeZ', 'centerX', 'centerY', 'centerZ', 'upX', 'upY', 'upZ', - 'cameraFOV', 'aspectRatio', 'cameraNear', 'cameraFar', 'cameraType' + 'cameraFOV', 'aspectRatio', 'cameraNear', 'cameraFar', 'cameraType', + 'yScale' ]; for (const keyName of keyNamesOfThePropToCopy) { this[keyName] = cam[keyName]; @@ -2019,6 +2020,7 @@ p5.Camera = class Camera { _cam.cameraMatrix = this.cameraMatrix.copy(); _cam.projMatrix = this.projMatrix.copy(); + _cam.yScale = this.yScale; return _cam; }