Skip to content

Commit

Permalink
Merge pull request #6471 from davepagurek/fix/flipped-fbo-camera
Browse files Browse the repository at this point in the history
Fix camera flipping on framebuffers between push/pop calls
  • Loading branch information
Qianqianye authored Oct 13, 2023
2 parents bd770c4 + 6e512c9 commit e81ff0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/webgl/p5.Camera.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -2019,6 +2020,7 @@ p5.Camera = class Camera {

_cam.cameraMatrix = this.cameraMatrix.copy();
_cam.projMatrix = this.projMatrix.copy();
_cam.yScale = this.yScale;

return _cam;
}
Expand Down

0 comments on commit e81ff0a

Please sign in to comment.