From 9858a688ec8640c3f46fd4524648146396469db3 Mon Sep 17 00:00:00 2001 From: RandomGamingDev Date: Wed, 25 Oct 2023 19:43:31 -0400 Subject: [PATCH] swapped the lines so that defaultEyeZ's value of 800 applies in the calculations for defaultCameraFOV --- src/webgl/p5.Camera.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webgl/p5.Camera.js b/src/webgl/p5.Camera.js index 5812f43c08..922ccee2b2 100644 --- a/src/webgl/p5.Camera.js +++ b/src/webgl/p5.Camera.js @@ -1946,12 +1946,12 @@ p5.Camera = class Camera { // @TODO: combine this function with _setDefaultCamera to compute these values // as-needed _computeCameraDefaultSettings() { - this.defaultCameraFOV = - 2 * Math.atan(this._renderer.height / 2 / this.defaultEyeZ); this.defaultAspectRatio = this._renderer.width / this._renderer.height; this.defaultEyeX = 0; this.defaultEyeY = 0; this.defaultEyeZ = 800; + this.defaultCameraFOV = + 2 * Math.atan(this._renderer.height / 2 / this.defaultEyeZ); this.defaultCenterX = 0; this.defaultCenterY = 0; this.defaultCenterZ = 0;