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
I am somewhat confused as to how I am supposed to scale correctly.
When zooming out, you get more virtual pixels, but the lines won't get any smaller due to the fact the canvas gets bigger as well. Meaning that each line will simply take up more pixels than it would usually. Meaning that not scaling the cursor at all would look correct in this scenario.
Now in the opposite case, if we zoom in, we get less pixels, resulting in having to draw smaller lines. This means the cursor actually has to shrink.
However, not only the zoom factor, but also the backend size of the canvas is relevant for sizing the cursor. However, if you are have a very screen, like a 4k screen, you'll have way more pixels and no zoom. In this scenario, you'll actually run into the problem the mouse cursor can't be correctly sized due to browser virtual limitations.
I don't really know how to solve this with the current way of setting the cursor. The solution could potentially be to manually draw the cursor instead, so that we can get around the limit.
Another option would be to hard-limit the canvas size to 1600x900 virtual pixels. In this case, only downscaling would have to be handled.
The text was updated successfully, but these errors were encountered:
I am somewhat confused as to how I am supposed to scale correctly.
When zooming out, you get more virtual pixels, but the lines won't get any smaller due to the fact the canvas gets bigger as well. Meaning that each line will simply take up more pixels than it would usually. Meaning that not scaling the cursor at all would look correct in this scenario.
Now in the opposite case, if we zoom in, we get less pixels, resulting in having to draw smaller lines. This means the cursor actually has to shrink.
However, not only the zoom factor, but also the backend size of the canvas is relevant for sizing the cursor. However, if you are have a very screen, like a 4k screen, you'll have way more pixels and no zoom. In this scenario, you'll actually run into the problem the mouse cursor can't be correctly sized due to browser virtual limitations.
I don't really know how to solve this with the current way of setting the cursor. The solution could potentially be to manually draw the cursor instead, so that we can get around the limit.
Another option would be to hard-limit the canvas size to 1600x900 virtual pixels. In this case, only downscaling would have to be handled.
The text was updated successfully, but these errors were encountered: