Comments (10)
Hello. I see a possible fix for this. But I don't have any means to test it on a real Retina. So I'll write back as soon as it will be ready for test.
from glfw-raub.
looks like that is just webGL example problem - that just must be added devicePixelRatio
BTW - great project have no clue why i not faced it before
from glfw-raub.
https://github.com/node-3d/glfw-raub/releases/tag/4.2.0-rc Please try an OSX binary from this pre-release, just unpack and replace it in your node_modules dir.
from glfw-raub.
https://github.com/node-3d/webgl-raub/blob/master/examples/lesson05.js
from glfw-raub.
https://github.com/node-3d/glfw-raub/blob/master/js/window.js#L221
Now some JS has to be touched, this.emit('resize', this.framebufferSize);
will probably do the trick for the correct initial size. If so, I'll pack a new release with these fixes.
from glfw-raub.
looks like that is not really correct place for change:
this.emit('resize', this.framebufferSize);
- have no effect
setTimeout(()=>this.emit('resize', this.framebufferSize), 0);
- works (but that is really bad way)
from glfw-raub.
Oh I see now, the example also tries to get width/height from "canvas" (line 59), so the changes should get a bit more thorough. But we're on the right track... I'll notify you when there is something to try.
BTW, did you try 3d-core-raub (it doesn't fix the issue, but still)? It has THREEJS bundled and some more stuff.
from glfw-raub.
im planing it to use for something different: there is language Elm, it have it own implementation of webGL
after that there is nice playground "framework" - that i forked - and created WebGL version of that..
My target is using that fork create application, that can run in glfw-openGL, from Node, that i then pack into singe executable by use of pkg
btw - all steps looks like work - need to do some clean up - and that issue was just on track while i was investigating.
any way i need custom mock of Document and Window - so that "ready to use solution" isn't for me
BTW - here is Example Game that i would like wrap into "native"
from glfw-raub.
Can you try the tag v4.2.0-rc2 for a possible fix?
I updated both binaries and js to use mostly logical sizes. Now I wonder what does cursor position report, because GLFW doc says it is in "screen coordinates" anyway.
from glfw-raub.
Fixed in [email protected]
from glfw-raub.
Related Issues (10)
- Segfault random time after window creation HOT 6
- upgrade glfw to version 3.4+ HOT 4
- ESM support HOT 4
- Cannot install HOT 7
- Error: Can't create GLFW window (in macOS GitHub Actions, works fine in Linux) HOT 1
- Mac 10.14 Mojave error HOT 4
- Vulkan API support? HOT 2
- Missing 2nd parameter (value) in call to setInputMode window.js HOT 4
- Event KeyUp and KeyDown missing some values HOT 2
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 glfw-raub.