question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minimum pixelRatio of 2 on manual.

See original GitHub issue

Shoudn’t this be min instead of max?

https://github.com/mrdoob/three.js/blob/0946935372f79e100ebeb2e3883d144d4ca5f80e/manual/resources/threejs-lesson-utils.js#L20

It is causing some tutorial pages (Fundamentals -> Primitives, for instance) to crash on firefox with a 2k monitor.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
greggmancommented, Feb 15, 2022

Oh, and my original comment was wrong. It’s Math.max because things looked crappy on a dpr 1 monitor and so 2 min was for extra antialiasing

1reaction
Mugen87commented, Feb 14, 2022

The problem is that forcing a minimum pixel ratio of two might lead to drawing buffer sizes that a device can’t handle. I think it’s more safe to always use window.devicePixelRatio like in the examples.

Read more comments on GitHub >

github_iconTop Results From Across the Web

-webkit-device-pixel-ratio - CSS: Cascading Style Sheets | MDN
The -webkit-device-pixel-ratio is a non-standard Boolean CSS media feature which is an alternative to the standard resolution media feature.
Read more >
javascript - -webkit-min-device-pixel-ratio: 2 - Stack Overflow
You're applying styles according to device pixel ratio, it checks for device pixel ratio and apply defined styles.
Read more >
Device Pixel Ratio dpr - imgix Documentation
Device pixel ratio (DPR) is an easy way to convert between device-independent pixels and device pixels (also called "CSS pixels"), so that high-DPR...
Read more >
Cannot compile "@media only screen and (-o-min-device ...
When compiling a file containing: @media only screen and (-o-min-device-pixel-ratio: 2/1) An error is shown (a meaningless one, on a completely different ...
Read more >
Support different pixel densities - Android Developers
Two screens of the same size may have a different number of pixels ... recognized after the user's finger has moved by at...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found