Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default maxCanvasWidth/Height to -1 (no max) #5440

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading