pygfx / shadertoy

Shadertoy implementation based on wgpu-py
BSD 2-Clause "Simplified" License
11 stars 1 forks source link

Fix mouse events #14

Closed Vipitis closed 8 months ago

Vipitis commented 8 months ago

first issue in #11

the mouse even is explained in example shadertoy_glsl_mouse_event.py as well as some information in the comments on the source: https://www.shadertoy.com/view/Mss3zH

there is two issues with the current implementation when comparing the online reference with the local example:

  1. while the mouse is down, the yellow line shows up. If you release - the yellow line should vanish. (fixed in first commit)
  2. on "click" meaning the first frame when you click a white circle will show up. (in progress) a bit of a bodge where a click begins when you press the mouse button and ends when you move the mouse. This kind of resembles the behavior of the website when paused.
Korijn commented 8 months ago

Is this good to go? Code changes seem OK to me.

Vipitis commented 8 months ago

yeah, this is good as it is for now. It doesn't match the functionality of the website perfectly. But without knowing how they did it, makes it difficult to match.