Animation Only Works On Initial Event, Breaks On Subsequent Events
See original GitHub issueHere’s my component
<a-entity class="player-button" id="back-button"
geometry="primitive: plane; height: 1; width: 1"
position="0 0 0"
material="shader: flat; src: #back; transparent: true;"
animation__enter="property: scale; easing: linear; dir: forward; dur: 100; to: 1.2 1.2 1.2; startEvents: mouseenter;"
animation__leave="property: scale; easing: linear; dir: forward; dur: 100; to: 1 1 1; startEvents: mouseleave;">
</a-entity>
animation__enter
happens once and then never happens on subsequent mouseenter
events. What’s weird is that it does actually change the scale it just ceases to animate the change (pops into place).
Further more, after executing animation__enter
, animation__leave
never works. Once again, the values change on the event, but there’s no animation.
It’s very hard to see in this video http://recordit.co/qa9op6AeIc but what happens is that the initial enter animation works but then on mouseleave it breaks. Then I hover over the pause button and the same thing happens, enter works but all else fails from then on in – meaning each component gets one chance to animate. Very weird.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Animation event not triggering - Unity Forum
Currently in my game a lot of events are triggered from within an animation and occasionally they seem to be skipped over.
Read more >Animations don't occur when the same animation is requested ...
Animations only either autoplay or are triggered by events. You can add an event to startEvents and emit it on the entity when...
Read more >Highcharts pie chart slice animation only works when an error ...
After playing with the code I found out that if I have a window resize event handler with jQuery that throws any error...
Read more >Using CSS animations - CSS: Cascading Style Sheets | MDN
Specifies whether an animation's first iteration should be forward or backward and whether subsequent iterations should alternate direction ...
Read more >An Interactive Guide to CSS Transitions - Josh W Comeau
It's the first animation tool that most front-end devs learn, ... transition can take a number of values, but only two are required:....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am having a similar issuse with these animations:
The first time either of the startEvents are called the animation works perfectly. On subsequent calls the material colour changes but there is no tranisitions, like the duration has been set to 0.
Yes, I needed this fix as well, so I forked the original repo and merged the fix into my master. Thanks for it.