stevensona/shader-toy

Feature Request: Keyboard Input

Malacath-92 opened this issue · 1 comments

Just as shadertoy.com we should support keyboard input. Ideally we would have the same interface (e.g. a 256x3 texture specifying:

  1. the js keycode on x,
  2. on y == 0 a toggle,
  3. on y == 1 a pressed (this frame),
  4. on y == 2 a down (as in button is held).

I personally miss a release (this frame), which we could support optionally by a setting.

Additionally I think we should inject code for querying the key-states for ease of use. Unless anyone has an idea why shadertoy.com does not allow that.

I am working on this on my fork. So I document this here to avoid any duplicate work being done.