From 1ce6be7d63274e7daa5d674d37adf7dbe8eb2fd9 Mon Sep 17 00:00:00 2001 From: Patrick Manalich Date: Tue, 27 Jun 2017 10:36:39 -0700 Subject: [PATCH] Additional commentation and setting z dimension to 0 --- scripts/system/spectatorCamera.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/system/spectatorCamera.js b/scripts/system/spectatorCamera.js index 103ef7eb6b..5ea9ab3fae 100644 --- a/scripts/system/spectatorCamera.js +++ b/scripts/system/spectatorCamera.js @@ -100,10 +100,10 @@ var cameraRotation; var cameraPosition; //The negative y dimension for viewFinderOverlay is necessary for now due to the way Image3DOverlay - // draws textures, but should be looked into at some point. Also the z dimension doesn't matter - // so it is set to the glassPaneWidth + // draws textures, but should be looked into at some point. Also the z dimension shouldn't affect + // the overlay since it is an Image3DOverlay so it is set to 0 var glassPaneWidth = 0.16; - var viewFinderOverlayDim = { x: glassPaneWidth, y: -glassPaneWidth, z: glassPaneWidth }; + var viewFinderOverlayDim = { x: glassPaneWidth, y: -glassPaneWidth, z: 0 }; function spectatorCameraOn() { // Sets the special texture size based on the window it is displayed in, which doesn't include the menu bar spectatorFrameRenderConfig.resetSizeSpectatorCamera(Window.innerWidth, Window.innerHeight); @@ -307,11 +307,11 @@ var squareScale = verticalScale * (1 + (1 - (1 / (geometryChanged.width / geometryChanged.height)))); if (geometryChanged.height > geometryChanged.width) { //vertical window size - viewFinderOverlayDim = { x: (glassPaneWidth * verticalScale), y: (-glassPaneWidth * verticalScale), z: glassPaneWidth }; + viewFinderOverlayDim = { x: (glassPaneWidth * verticalScale), y: (-glassPaneWidth * verticalScale), z: 0 }; } else if ((geometryChanged.width / geometryChanged.height) < glassPaneRatio) { //square-ish window size, in-between vertical and horizontal - viewFinderOverlayDim = { x: (glassPaneWidth * squareScale), y: (-glassPaneWidth * squareScale), z: glassPaneWidth }; + viewFinderOverlayDim = { x: (glassPaneWidth * squareScale), y: (-glassPaneWidth * squareScale), z: 0 }; } else { //horizontal window size - viewFinderOverlayDim = { x: glassPaneWidth, y: -glassPaneWidth, z: glassPaneWidth }; + viewFinderOverlayDim = { x: glassPaneWidth, y: -glassPaneWidth, z: 0 }; } // The only way I found to update the viewFinderOverlay without turning the spectator camera on and off is to delete and recreate the