From 5947ddc1172cd2831ed507b2d47d87421b81277f Mon Sep 17 00:00:00 2001 From: Brian Peiris <brianpeiris@gmail.com> Date: Fri, 2 Nov 2018 15:42:15 -0700 Subject: [PATCH] Add hoverable-visuals to all super-spawners --- src/components/hoverable-visuals.js | 5 +++-- src/components/super-spawner.js | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/hoverable-visuals.js b/src/components/hoverable-visuals.js index 60471dc61..aa33cd441 100644 --- a/src/components/hoverable-visuals.js +++ b/src/components/hoverable-visuals.js @@ -8,7 +8,8 @@ const interactorTwoTransform = []; */ AFRAME.registerComponent("hoverable-visuals", { schema: { - cursorController: { type: "selector" } + cursorController: { type: "selector" }, + enableSweepingEffect: { type: "boolean", default: true } }, init() { // uniforms and boundingSphere are set from the component responsible for loading the mesh. @@ -54,7 +55,7 @@ AFRAME.registerComponent("hoverable-visuals", { } for (const uniform of this.uniforms.values()) { - uniform.hubs_EnableSweepingEffect.value = true; + uniform.hubs_EnableSweepingEffect.value = this.data.enableSweepingEffect; uniform.hubs_SweepParams.value = this.sweepParams; uniform.hubs_HighlightInteractorOne.value = !!interactorOne; diff --git a/src/components/super-spawner.js b/src/components/super-spawner.js index 7ff4e1189..c5e557401 100644 --- a/src/components/super-spawner.js +++ b/src/components/super-spawner.js @@ -85,6 +85,8 @@ AFRAME.registerComponent("super-spawner", { this.onSpawnEvent = this.onSpawnEvent.bind(this); this.sceneEl = document.querySelector("a-scene"); + + this.el.setAttribute("hoverable-visuals", { cursorController: "#cursor-controller", enableSweepingEffect: false }); }, play() { -- GitLab