diff --git a/src/components/active-color.js b/src/components/active-color.js index 7cd2453..6fe10fd 100644 --- a/src/components/active-color.js +++ b/src/components/active-color.js @@ -19,6 +19,9 @@ AFRAME.registerComponent('active-color', { el.setAttribute('material', 'color', this.data.color); } else { el.setAttribute('material', 'color', this.defaultColor); + if (el.components.animation__mouseleave) { + setTimeout(() => { el.emit('mouseleave', null, false); }); + } } }, }); diff --git a/src/index.html b/src/index.html index ac4dfcd..2f32af7 100644 --- a/src/index.html +++ b/src/index.html @@ -44,7 +44,7 @@ - +