From eb234e7999cf923bac81db9afd02cdd502c0b918 Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Thu, 20 Sep 2018 17:43:12 -0700 Subject: [PATCH] apply cursor to hand entity directly --- src/components/saber-controls.js | 2 +- src/index.html | 17 +++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/components/saber-controls.js b/src/components/saber-controls.js index e24110a..c2d71da 100644 --- a/src/components/saber-controls.js +++ b/src/components/saber-controls.js @@ -79,7 +79,7 @@ AFRAME.registerComponent('saber-controls', { this.controllerConnected = true; this.controllerType = evt.detail.name; - el.querySelector('.raycaster').setAttribute('cursor', controllerConfig.cursor || {}); + el.setAttribute('cursor', controllerConfig.cursor || {}); }, config: { diff --git a/src/index.html b/src/index.html index 0387cfd..e73f154 100644 --- a/src/index.html +++ b/src/index.html @@ -62,24 +62,21 @@ {% macro saber (hand, otherHand, color) %} + haptics="events: mouseenter; dur: 35; force: 0.075" + line="color: {{ color }}"> - {% endmacro %} @@ -91,8 +88,8 @@ id="cursorMesh" geometry="primitive: plane; width: 0.26; height: 0.26" material="shader: flat; color: white; transparent: true; src: #cursorMeshImage; side: both; depthTest: false"> - - + + {% if not IS_PRODUCTION %}