From e9afeb6a63e26a4cb64e98673569b6908af8ca42 Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Mon, 10 Dec 2018 16:19:39 -0800 Subject: [PATCH] restore removed strokeend event --- src/components/saber-controls.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/saber-controls.js b/src/components/saber-controls.js index 852e2b9..efb6519 100644 --- a/src/components/saber-controls.js +++ b/src/components/saber-controls.js @@ -127,6 +127,7 @@ AFRAME.registerComponent('saber-controls', { endStroke: function () { if (!this.swinging || this.strokeDuration < this.data.strokeMinDuration) { return; } + this.el.emit('strokeend'); this.swinging = false; // Stroke finishes. Reset swinging state. this.accumulatedDistance = 0;