Open Chemrat opened 6 years ago
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 7 days. Feel free to re-open at any time if this issue is still relevant.
Given that browsers do support them, I think emscripten should.
https://www.w3.org/TR/pointerevents2/#dom-pointerevent-pressure
Qt's wasm plugin uses emscripten, and Qt supports pen tablets. So this would potentially pave the way for Qt-based drawing applications to be portable not only between desktop and mobile operating systems, but also to the browser.
This issue has been automatically marked as stale because there has been no activity in the past year. It will be closed automatically if no further activity occurs in the next 30 days. Feel free to re-open at any time if this issue is still relevant.
Hi is it possible to have a look at this please? I also very much need this feature for a drawing app
SDL3 now has SDL_pen.h as well
It does, and we've just cut this API down dramatically so we could reasonably target lots more platforms, including Emscripten.
What SDL3 needs from Emscripten is access to Pointer Events, and I suppose we could wedge in some Javascript code to hook into the browser via EM_ASM
, but it would be nicer if there were an equivalent of emscripten_set_mousedown_callback
(etc) for these, as that's what SDL uses for everything else. Among other reasons, the Emscripten functions do a lot of stuff behind the scenes I'm not really qualified to manage, and don't really understand without a background in Emscripten internals magic. :)
Although I suppose that a Pointer Events equivalent would probably be mostly this same code with different details?
I've skimmed through C++ HTML5 API and seems like there is API for mouse and touch events, but not for pen events (pointer events with tilt and pressure)