You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature request: Ability to set the pixel density of the HTML canvas. At resolutions with pixel density greater than one, Ebitengine always scales the HTML Canvas size (Canvas size * DeviceScaleFactor). It would be nice to have an option to disable this. The equivalent of pixelDensity() in the p5.js library.
Additional info
The canvas's width and height properties are set to 800 because you are running this sketch on a high DPI (i.e. Apple Retina) display. When p5.js detects this it sets pixel density to 2 by default so it's taking 800 pixel square of graphics and squishing it into a 400 "pixel" square on the screen. If you want an image that is exactly 400 actual pixels, you could set pixel density to 1 in your setup() function: pixelDensity(1).
Operating System
What feature would you like to be added?
Feature request: Ability to set the pixel density of the HTML canvas. At resolutions with pixel density greater than one, Ebitengine always scales the HTML Canvas size (
Canvas size * DeviceScaleFactor
). It would be nice to have an option to disable this. The equivalent of pixelDensity() in the p5.js library.Additional info
Why is this needed?
Reasons for this feature:
The text was updated successfully, but these errors were encountered: