This is the examples page for the super-hands A-Frame component package for super-easy hand controller interactivity in A-Frame WebVR experiences.
Hand controls with physics (CANNON.js)
Mouse cursor based version for desktop
Hand controls with physics (Ammo.js)
Mouse cursor based version for desktop
color-randomizer changes the color of entities dropped inside of the color changer boxExample of super-hands interactivity with roomscale tracked controllers
and aframe-physics-system. Also showcases creating a simple
custom reaction component.
AFRAME.registerComponent('color-randomizer', {
play: function() {
this.el.addEventListener('drag-drop', function(evt) {
evt.detail.dropped.setAttribute('material', 'color',
'#'+(Math.random()*0xFFFFFF<<0).toString(16))
// notify super-hands that the gesture was accepted
evt.preventDefault()
})
}
})
Credit for random color generator code: Mohsen via StackOverflow
Gaze and laser pointer controls without physics
Mouse cursor based version for desktop
event-set component listening for the 'drag-drop' event
super-hands can also be use with other types of input
including 3DOF controllers, mouse, and touch. In these cases, a
raycasting can be used intead of collision detection.
The confugration below works with the A-Frame raycaster
component.
super-hands="colliderEvent: raycaster-intersection;
colliderEventProperty: els;
colliderEndEvent: raycaster-intersection-cleared;
colliderEndEventProperty: clearedEls"
This scene also shows the fallback movement that occurs when physics is not available.