Return smoothed drag end velocity with event

This commit is contained in:
Jess Telford 2016-09-28 22:42:51 +10:00
parent 691dc21a4d
commit c7d1fe0c0c
7 changed files with 177 additions and 12 deletions

View file

@ -12,22 +12,33 @@
h1 {
font-weight: 300;
}
a {
color: #FAFAFA;
a.demo-link {
display: block;
padding: 15px 0;
}
a {
color: #FAFAFA;
}
</style>
</head>
<body>
<h1>A-Frame Click & Drag Component</h1>
<a href="basic/">Basic Demo</a>
<a class="demo-link" href="basic/">Basic Demo</a>
<p>Click + Drag entities on the screen. Note the plane cannot be dragged (it does not have the "click-drag" attribute).</p>
<p>Try the WASD keys to move around while dragging an entity!</p>
<hr />
<a href="events/">Events Demo</a>
<a class="demo-link" href="events/">Events Demo</a>
<p>Events are fired for beginning to drag, ending a drag, and for each drag event in etween.</p>
<p>This example shows how those events can be used to "ghost" a dragged entity</p>
<p>This example shows how those events can be used to "ghost" a dragged entity.</p>
<hr />
<a class="demo-link" href="physics/">Physics Demo</a>
<p>Calculating the velocity at the time of drag end.</p>
<p>Combined with a physics library (for example; <a href="https://github.com/donmccurdy/aframe-extras/tree/master/src/physics">aframe-extras physics</a>), we get some very nice interactions.</p>
<p>Try gently tossing the ball around / throwing it at the ground.</p>
<!-- GitHub Corner. -->
<a href="https://github.com/jesstelford/aframe-click-drag-component" class="github-corner">