diff --git a/docs/components/renderer.md b/docs/components/renderer.md index 8a3c75d53a0..aa5f5b3ba2a 100644 --- a/docs/components/renderer.md +++ b/docs/components/renderer.md @@ -34,8 +34,8 @@ It also configures presentation attributes when entering WebVR/WebXR. | foveationLevel | Amount of foveation used in VR to improve perf, from 0 (min) to 1 (max). | 1 | | sortTransparentObjects | Whether to sort transparent objects (far to near) before rendering | false | | physicallyCorrectLights | Whether to use physically-correct light attenuation. | false | -| maxCanvasWidth | Maximum canvas width. Uses the size multiplied by device pixel ratio. Does not limit canvas width if set to -1. | 1920 | -| maxCanvasHeight | Maximum canvas height. Behaves the same as maxCanvasWidth. | 1920 | +| maxCanvasWidth | Maximum canvas width. Uses the size multiplied by device pixel ratio. Does not limit canvas width if set to -1. | -1 | +| maxCanvasHeight | Maximum canvas height. Behaves the same as maxCanvasWidth. | -1 | | multiviewStereo | Enables the use of the OCULUS_multiview extension. | false | | logarithmicDepthBuffer | Whether to use a logarithmic depth buffer. | auto | | precision | Fragment shader [precision][precision] : low, medium or high. | high | diff --git a/src/core/scene/a-scene.js b/src/core/scene/a-scene.js index 00d90a800e2..fc7eaf2a13f 100644 --- a/src/core/scene/a-scene.js +++ b/src/core/scene/a-scene.js @@ -598,7 +598,7 @@ class AScene extends AEntity { powerPreference: 'high-performance' }; - this.maxCanvasSize = {height: 1920, width: 1920}; + this.maxCanvasSize = {height: -1, width: -1}; if (this.hasAttribute('renderer')) { rendererAttrString = this.getAttribute('renderer'); diff --git a/src/systems/renderer.js b/src/systems/renderer.js index 97d2eaba9f7..758e2f8410b 100644 --- a/src/systems/renderer.js +++ b/src/systems/renderer.js @@ -13,8 +13,8 @@ module.exports.System = registerSystem('renderer', { antialias: {default: 'auto', oneOf: ['true', 'false', 'auto']}, highRefreshRate: {default: utils.device.isOculusBrowser()}, logarithmicDepthBuffer: {default: 'auto', oneOf: ['true', 'false', 'auto']}, - maxCanvasWidth: {default: 1920}, - maxCanvasHeight: {default: 1920}, + maxCanvasWidth: {default: -1}, + maxCanvasHeight: {default: -1}, multiviewStereo: {default: false}, physicallyCorrectLights: {default: false}, exposure: {default: 1, if: {toneMapping: ['ACESFilmic', 'linear', 'reinhard', 'cineon']}},