some memory savings in beat.js

This commit is contained in:
Kevin Ngo
2018-10-02 04:52:50 -07:00
parent 18aa58d1d4
commit df87763e6f
2 changed files with 115 additions and 88 deletions

View File

@@ -20,6 +20,12 @@ AFRAME.registerComponent('debug-controller', {
primaryHand = document.getElementById('rightHand');
secondaryHand = document.getElementById('leftHand');
window.addEventListener('click', evt => {
if (!evt.isTrusted) { return; }
primaryHand.emit('triggerdown');
primaryHand.emit('triggerup');
});
if (AFRAME.utils.getUrlParameter('debug') === 'oculus') {
primaryHand.emit('controllerconnected', {name: 'oculus-touch-controls'});
secondaryHand.emit('controllerconnected', {name: 'oculus-touch-controls'});