Skip to content

Commit

Permalink
Change default maxCanvasWidth/Height to -1 (no max) (#5440)
Browse files Browse the repository at this point in the history
Co-authored-by: Noeri Huisman <mrxz@users.noreply.github.com>
  • Loading branch information
mrxz and mrxz authored Jan 26, 2024
1 parent 2d22d61 commit c5bab4c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/components/renderer.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion src/core/scene/a-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
4 changes: 2 additions & 2 deletions src/systems/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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']}},
Expand Down

0 comments on commit c5bab4c

Please sign in to comment.