New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add additional digitizer/pen attributes: twist (rotation) #25
Comments
Thanks for the suggestion. Can you point me at the existing native APIs for determining rotation? On Windows 8+ I see PointerPointProperties.Orientation and PointerPointProperties.Twist. It's not clear to me what the difference is between these. If someone can point to a native demo app (on Windows or otherwise) and specific device where rotation is supported, it would probably help. I have a Surface Pro 3, and AFAIK that pen supports tilt but not rotation (but I'm not completely sure). |
Don't have a device at hand to test right now, but isn't a barrel rotation going to already result in the tiltX/tiltY changing (as I'm assuming the tilt will reference some idealised "zero position" of the pen, so rotating it will result in a different set of angles)? |
Also, Surface pen doesn't support tilt as far as I know, only pressure (and no, nothing specific about rotation either) |
I don't think so. There's three axis of movement possible here. Eg. imagine the pen pointing straight up and down so tiltX and tiltY are fixed. Now roll the pen between your fingers - rotation changes without changing either tilt.
Oh sorry, I was thinking your stylus video (showing tilt) was with a Surface. What device was that again? I guess I better get one too. |
Ah yes, i can see how rotation is independent (though can interact with, when at an angle) from tiltX/tiltY. Not sure if there's a clean API for that which can be hooked into... Regarding my demo: using a Wacom Intuos Pro (has to be Pro, as the cheaper models have limited/no tilt support) |
On public-pointerevents, Dave Fleck (Wacom) replied:
|
Excellent. I'd definitely be in favor of adding this to PE as well, in that case. |
Wacom has an airbrush pen too. It has a wheel on the shaft which can be used to control strokes - like traditional airbrush flow mechanisms. It would be cool to see support for this as well. Maybe it is already handled like a normal mouse wheel, I don't know. Photoshop recognizes it as a "stylus wheel". |
The wheel is in the HID “Barrel Pressure” field (HID Usage 0x31) - sometimes referred to as “Tangential Pressure” (Mac OS). Painter and Photoshop use this. Two more missing data elements are the Secondary Barrel Switch (HID Usage 0x5A) and Transducer Serial Number (HID Usage 0x5B). Both of these have application support (Painter uses the Serial Number to store settings on a per stylus basis and Photoshop useless serial numbers for cloud login). |
That feels slightly out-of-scope to me, edging close to the discussion in #26 about gamepad/webusb. Thoughts?
Would that not be exposed as part of
Again, that feels out-of-scope here (though perhaps, leaving it up to implementations, it "could" be used to ensure that the pointer relating a particular pen always gets the same |
This seems different to than the 3d mice case to me in that it's really about art stylus scenarios which pointer events is trying to address. That said I'd consider it lower priority than pen rotation (since fewer stylus devices support it) so perhaps we should move discussion of this to a separate GitHub issue? That said, I'd be fine with adding a
Yeah, we could have a separate issue for this but I expect it to be very controversial due to privacy / fingerprinting concerns. I know there are some art uses where it's valuable, but it seems niche and controversial enough that it's unlikely to be worth this group's time at the moment. |
Living on Earth is expensive, but it does include a free trip around the sun. |
and I didn't say there was. What I'm saying is that within the definition of what we're concerned with in this working group/with this specification, this doesn't seem to fit.
I'd say let's open a new issue for that specifically. Also, clarify if this is not catered for in the current spec https://w3c.github.io/pointerevents/#the-button-property (which already covers left, middle, right, x1, x2). Keeping in mind that it's also up to browser developers, device manufacturers, etc to do the correct wiring up, which isn't something the spec itself can address.
As Rick already noted, this opens a whole can of privacy worms which is already bad enough for native applications, but can be even more complex/dangerous if exposed to the web itself, and something that presumably would apply to all sorts of HIDs, not just pen/mouse - therefore probably better suited to an upstream, more general spec like UIEvents. |
split out the barrel pressure discussion into its own issue. refocusing this issue to be specifically only about rotation / twist (HID digitizer 0x41). i'd be in favor of adding this if we can get a sense of what values we get (presumably something that denotes the angle 0-359) |
On Windows it’s 0.0 to 360.0 degrees of a pen device around its own major axis (such as when the user spins the pen in their fingers) with a default of 0.0 Dave
With the blood in the ink of the headlines |
In the call today (https://www.w3.org/2016/05/25-pointerevents-minutes.html) the question about actual devices that support rotation came up. This Wacom art pen (compatible with Intuos Pro) https://us-store.wacom.com/Product/Art-Pen-S01 supports rotation. |
Oh right, we do have one of those. If it's easy to get this value from the underlying OS, I doubt we'd have any hesitation to exposing it in Chrome (just a little bit of plumbing). |
Note that this is not the pen that comes with the Intuos Pro by default (the picture seems incorrect, as the description states "This cordless, battery-free Art Pen features a broad, chisel-shaped pen tip"). If I had a slush fund, I'd purchase this one and the airbrush for testing... (nudge nudge ;) ) |
@dfleck mentioned to me on email just now that it should be straightforward to get this from the underlying OS on Windows at least - see https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.input.pointerpointproperties.twist?f=255&MSPPError=-2147217396 |
Is the feature supported on any other platform? |
In the case of the Wacom tablet and art pen, assuming the correct drivers are installed, it is supported (and it's a standard USB HID feature). As for the "how common" question: considering that |
Well, in general we can't add web API for all the possible existing devices. And we (== web API designers) tend to add new APIs too easily and then later realize that we did something wrong and need to fix our mistakes. So that is why I'm just asking whether we think there will be use for these new attributes. But sounds like there might be enough use cases and device and OS support. (I'm assuming here that Web USB won't cover this use case.) |
On the other hand, having software support for a feature encourages On Thu, May 26, 2016 at 4:17 PM, smaug---- notifications@github.com wrote:
|
Brush and Marker rotation is used by painters, calligraphers, and comic artists to achieve a variety of strokes. Stylus rotation is the digital equivalent, and is enabled by Wacom products, Adobe Photoshop. There are already numerous web apps which support drawing and painting. Lets extend their capabilities.
https://www.youtube.com/watch?v=2gm9lM7svaY
https://www.youtube.com/watch?v=ukXJQAY0caU
The text was updated successfully, but these errors were encountered: