Giter Site home page Giter Site logo

Comments (10)

raub avatar raub commented on June 18, 2024

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.

justgook avatar justgook commented on June 18, 2024

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.

raub avatar raub commented on June 18, 2024

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.

justgook avatar justgook commented on June 18, 2024

https://github.com/node-3d/webgl-raub/blob/master/examples/lesson05.js

When Start APP:
image

When Resize Window:
image

from glfw-raub.

raub avatar raub commented on June 18, 2024

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.

justgook avatar justgook commented on June 18, 2024

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.

raub avatar raub commented on June 18, 2024

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.

justgook avatar justgook commented on June 18, 2024

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.

raub avatar raub commented on June 18, 2024

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.

raub avatar raub commented on June 18, 2024

Fixed in [email protected]

from glfw-raub.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.