restore removed strokeend event

This commit is contained in:
Kevin Ngo
2018-12-10 16:19:39 -08:00
parent 8c9a50b550
commit e9afeb6a63

View File

@@ -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;