'Zoom in and out in aframe sky element using oculus-touch-controls
using this component to zoom in and out in aframe sky element in oculus-touch-controls .
AFRAME.registerComponent('c-oculus-zoom-in-out', { init: function() {
this.el.addEventListener('thumbstickmoved', this.logThumbstick);
},
logThumbstick: function(evt) {
if (evt.detail.y < -0.95) {
console.log("UP");
}
if (evt.detail.y > 0.95) {
console.log("DOWN");
}
}
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
