More accurate and responsive stylus and finger touching.

The algorithm used to detect when and where the stylus or finger is touching the tablet has been improved.

* hovering the finger/stylus over the surface of the tablet should cause buttons to highlight.
* flicking or using the stylus like a drum stick, should more accurately click buttons on the tablet.
* stabbing the tablet quickly, should also more accurately trigger button presses.
* moving the hand/stylus from behind the tablet should be less likely to cause press events.
This commit is contained in:
Anthony J. Thibault 2017-03-07 18:19:32 -08:00
parent c7cd0fdc38
commit 836c701cb3
2 changed files with 491 additions and 373 deletions

File diff suppressed because it is too large Load diff

View file

@ -167,11 +167,10 @@ WebTablet = function (url, width, dpi, hand, clientOnly) {
isAA: HMD.active
});
var HOME_BUTTON_Y_OFFSET = (this.height / 2) - 0.009;
var HOME_BUTTON_Y_OFFSET = (this.height / 2) - (this.height / 20);
this.homeButtonID = Overlays.addOverlay("sphere", {
name: "homeButton",
localPosition: {x: -0.001, y: -HOME_BUTTON_Y_OFFSET, z: 0.0},
localRotation: Quat.angleAxis(0, Y_AXIS),
dimensions: { x: 4 * tabletScaleFactor, y: 4 * tabletScaleFactor, z: 4 * tabletScaleFactor},
alpha: 0.0,
visible: true,