You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example code for Animating on custom events (#4635) (#5552)
* Added a link to a glitch example in the animation doc for animating using custom events (#4635)
* Removed the link to the custom event glitch examples, Added a custom event in the existing example and link to emitting custom events.
* kept only startEvents in example and redirect link fix
* animation and emit eventname changes
[Remix the Animating on Events Glitch][eventsglitch].
150
151
151
-
To start an animation by explicitly emitting an event, you can do the following:
152
+
To start an animation by explicitly [emitting a custom event](https://aframe.io/docs/1.6.0/introduction/javascript-events-dom-apis.html#emitting-an-event-with-emit), you can do the following:
152
153
153
154
```
154
-
el.emit(`startanim001`, null, false);
155
+
el.emit(`triggeranimation`, null, false);
155
156
```
156
157
157
158
The [third parameter of emit](https://aframe.io/docs/1.6.0/core/entity.html#emit-name-detail-bubbles) set to "false" parameter ensures the event won't bubble up to parents, so that you can target the animation at just one particular element.
0 commit comments