A-Frame Click & Drag Component

Basic Demo

Click + Drag entities on the screen. Note the plane cannot be dragged (it does not have the "click-drag" attribute).

Try the WASD keys to move around while dragging an entity!


Events Demo

Events are fired for beginning to drag, ending a drag, and for each drag event in etween.

This example shows how those events can be used to "ghost" a dragged entity.


Physics Demo

Calculating the velocity at the time of drag end.

Combined with a physics library (for example; aframe-extras physics), we get some very nice interactions.

Try gently tossing the ball around / throwing it at the ground.


Physics Demo #2

Try gently tossing the ball at the stacked boxes!