Before this pull request, when in "retina land", only the draw callback and no other had its coordinate system scaled. This means that coordinates were inconsistent between draw and sketch.mouse on the one hand and all other callbacks (such as update and touchmove) on the other.
In this pull request I moved the execution of update to also be affected by the draw scaling. Furthermore I added a scaling wrapper around all other callbacks. I also removed my previous pull request which "fixes" the mouse retina coordinates for all "other" callbacks, but inconveniently breaks it for draw.
All changes affect only retina: true scenes.
Please let me know if you had another solution in mind or anything is unclear, I am happy to adjust this pull request to whatever fits the project. Thanks!
Before this pull request, when in "retina land", only the
draw
callback and no other had its coordinate system scaled. This means that coordinates were inconsistent betweendraw
andsketch.mouse
on the one hand and all other callbacks (such asupdate
andtouchmove
) on the other.In this pull request I moved the execution of
update
to also be affected by thedraw
scaling. Furthermore I added a scaling wrapper around all other callbacks. I also removed my previous pull request which "fixes" the mouse retina coordinates for all "other" callbacks, but inconveniently breaks it fordraw
.All changes affect only
retina: true
scenes. Please let me know if you had another solution in mind or anything is unclear, I am happy to adjust this pull request to whatever fits the project. Thanks!