Code Monkey home page Code Monkey logo

Comments (10)

asny avatar asny commented on August 11, 2024

Oh no. You are absolutely right, and it is also in the 0.7 release 😞 Will look into it as soon as I have time. If anyone wants to try to fix it, please go ahead 💪

from three-d.

asny avatar asny commented on August 11, 2024

@kklibo You actually said it was in 0.7 release, so not on master? I cannot reproduce it anymore on 0.7 nor master, but I also think I have seen it before, so it might be something that occurs in some specific circumstances that I can't figure out. It works a bit weird on firefox also so I will try to fix that. If you have some more input, please let me know 👍

from three-d.

kklibo avatar kklibo commented on August 11, 2024

I just went back through my repo and did a more thorough round of tests. The problem occurs in Firefox and Chromium with three-d:

  • 0.7.3
  • 0.7.0
  • 0.6.0
  • 0.5.0

I went back to 0.4.2, but I wasn't using dynamic sizing back then. I was pretty sure this issue was new, but it's possible that I just never noticed.

It's possible that the problem is in my code, but I can't think of where it would be. I don't think I ever set a render area or window size, I just receive it from three-d and use it in rendering calculations. Any ideas?

from three-d.

asny avatar asny commented on August 11, 2024

So the error is consistent? I have seen it once in a while but it went away with a refresh which is the reason why I did not do anything about it. I have absolutely no idea what to do, it is really hard to fix something you cannot reproduce. I think the bug is most likely in canvas.rs which has all of the resize logic so very limited amount of code to look into, but it could also be in web_sys or even lower level.

from three-d.

kklibo avatar kklibo commented on August 11, 2024

Yeah, it's 100% consistent on my project. I spent about 45 minutes taking a look at canvas.rs and making some changes, but I couldn't get the problem to go away or change at all.

When I modify the canvas size, it changes the resolution of the graphics which are written into the graphics area in the browser window (causing blurring when it isn't 1:1), but that graphics area remains the same size: slightly too large for the browser window (and the scrollbars remain).

If you can think of anything else to try, I'm available to test it. In the mean time, I'm working on uploading a (very early) version of my project soon: it may make sense to revisit this when that's available.

from three-d.

asny avatar asny commented on August 11, 2024

Yet again, thanks for your effort! 👍 I cannot reproduce it at all on my laptop, so I was thinking that maybe it is the setup (my best guess is the screen). I will do some experiments soon on whatever hardware I have.

And I think it is wise to leave it for a moment 🙏 And sounds super nice that you are ready with an (early) version 💪

from three-d.

kklibo avatar kklibo commented on August 11, 2024

@asny Here's a (very early) version of my project:
https://github.com/kklibo/panorama-explorer
Running this in a browser should show the view area size problem (and a small subset of a panorama series near Shoreline Ampitheatre in Mountain View, CA).

from three-d.

asny avatar asny commented on August 11, 2024

Super nice to actually see it, got it running in no time 💥 My only feedback is that it is a bit hard to zoom with a touchpad 🙂

Now that I can see your code, I found out why you have troubles and I don't. I had added some CSS styling to the index.html file:

<canvas style="position: absolute;top:0;bottom: 0;left: 0;right: 0;margin:auto;"></canvas>

instead of:

<canvas id="canvas" height="720" width="1280" />

which is what you have in your index.html. I guess you have tested the examples with that index.html and not the revised one at github?

Anyway, change that line in your index.html and it should work 🎉

from three-d.

kklibo avatar kklibo commented on August 11, 2024

Perfect, It works now.
Yeah, my index.html was ancient, and Intellij was "helping" me by hiding the content of that canvas line.

Re: touchpad zoom: this UI is very temporary, but there are zoom buttons on the control window. Are they too small? I haven't used a tablet in years, so I really don't know what it takes to make the UI usable.

from three-d.

asny avatar asny commented on August 11, 2024

Good it is working 👍

Perfectly all right, the zoom buttons works so it is not a big problem. I didn't test on a tablet but a MacBook with a touchpad. And I actually think the examples zoom doesn't work that well with both touchpad and mouse wheel, so maybe I have something to fix as well 🙂

from three-d.

Related Issues (20)

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.