Comments (1)
Copying my response from the Discord. Maybe it'll be useful to someone else too, if this thread shows up in a Google search.
From your project.xml file:
<window width="1024" height="768"/>
When you set the <window>
width and height to something lower than the browser window dimensions for the html5 target, a lower rendering quality is expected with our default index.html template because that template still makes the canvas fill the entire browser view port. In other words, it is scaled up from a lower resolution. It should be a little blurry.
When you bump up scaling outside of OpenFL, the browser's window.devicePixelRatio
is increased. That's the value OpenFL uses to determine how much it should scale itself for HiDPI screens. So OpenFL is rendering at higher quality than it normally would for the window dimensions that you specified (but closer to what it would be if you had specified no window dimensions at all). Since the canvas still fills the same amount of space in the browser window, it ends up looking crisper.
Both behaviors are expected when you specify window dimensions in project.xml for the html5 target.
from openfl.
Related Issues (20)
- [HTML5] Unable load the raw bytes of a sound file. HOT 4
- [Flash] Type coercion failure when loading maps from SharedObject HOT 1
- [HashLink] Explicit cast from the OpenGLRenderer class HOT 2
- File.creationDate showing wrong date on macOS Ventura HOT 6
- HTML5: openfl.display.Graphics.drawGraphicsData() does not correctly close a connected path HOT 1
- es6 generation fails under certain conditions HOT 2
- TextField High Memory Usage When Incrementing Large Numbers HOT 16
- Rounded Rectangle swf asset renders incorrectly HOT 4
- Add support for 2.5D properties like rotationX and rotationY
- Sounds over a certain length do not play properly. HOT 3
- Text Field fails to render certain Unicode characters HOT 6
- [html5] FileReferenceList doesn't dispatch Event.CANCEL HOT 1
- DropShadowFilter renders incorrectly when applied onto a TextField HOT 1
- OpenFL is compatible with old devices on WeChat IOS, which can cause`__scissorRectangle` An error occurred during off screen rendering;
- FlashPlayer does not change its size HOT 4
- Custom fonts don't support bold or italic variants on Windows HOT 3
- Uncaught TypeError: Cannot read properties of null (reading 'duration') - Sound.hx:761
- TextField does not handle <img> on platforms other than Flash HOT 3
- The Hashlink profiler does not work with OpenFL HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openfl.