Example of using Hype Drag Gesture
This example uses Hype Action Events, Hype Matter Helper and Hype Drag Gesture to offer drag and drop support with precise drop zones and snapping. Note that this drag'n'drop approach relies on the Matter engine offered by Tumult Hype to determine arbitrary shape intersections. Hence, the export will include the physics engine.
This gesture offers the following events:
data-drag-start-action
data-drag-move-action
data-drag-end-action
data-drop-success-action
data-drop-fail-action
data-intersection-start-action
data-intersection-end-action
And the following selector defining the drop target
data-drop-selector
This example also uses a snapping mechanism, data-snap-target
, but that is specific to this particular example and implemented in the document rather than being part of the gesture.
Example_Hype_Drag_Gesture.hype.zip (177,4 KB)