[x3d-public] touchTime for all pointing device sensors ?

Michalis Kamburelis michalis.kambi at gmail.com
Wed Oct 25 16:18:40 PDT 2017


2017-10-25 18:05 GMT+02:00 Andreas Plesch <andreasplesch at gmail.com>:
> touchTime is very similar to isActive except that the mouse still has
> to be over the shape when the mouse button is released. Since isOver
> and isActive are already fields for drag sensors, perhaps touchTime
> should be as well.
>
> touchTime is often used to get a startTime for an TimeSensor to
> trigger an animation. So an example application would be have a drag
> sensor which also acts as a start button; a bit contrived but not very
> much so.
>
> It is true that most of the times the mouse ends up outside of the
> shape after dragging. So touchTime would not be useful as a trigger to
> do something after dragging ends.
>
> But I am looking more for examples where it would lead to some,
> unintended conflict if touchTime were used on a drag sensor.
>

It is technically possible to implement touchTime on all
pointing-device sensors, indeed. But I'm not sure is there a good
use-case for it.

touchTime is like an "OnClick" event of numerous UI libraries.

If a drag sensor reacts to clicks (in addition to reacting to
dragging)... it feels a bit surprising (from the user's point of
view). When you drag something, you don't usually care where is the
pointer at the end, the only thing that matters is how far you
dragged. As you write, "most of the times the mouse ends up outside of
the shape after dragging". It could be surprising that some behavior
(generation of touchTime) is different depending on whether the mouse
was inside or outside the shape at the end.

Drag sensor is like a scrollbar in a traditional 2D UI, while
TouchSensor is like a button. Handling "clicks" on a drag sensor is a
bit like combining scrollbar with a button functionality. Traditional
UIs don't do it --- if you click on a scrollbar, without moving your
mouse, nothing happens.

None of this is a strong argument against adding touchTime to other
pointing-device sensors, so I may definitely be wrong :) I'm mostly
following my intuitions from 2D UI here.

Regards,
Michalis



More information about the x3d-public mailing list