Skip to content

Commit

Permalink
kept only startEvents in example and redirect link fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kewalkishang committed Nov 17, 2024
1 parent 23e99a6 commit 6bd6f76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/components/animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ We can use the `startEvents` property to animate upon events:
material="color: red"
animation__mouseenter="property: components.material.material.color; type: color; to: blue; startEvents: mouseenter; dur: 500";
animation__mouseleave="property: components.material.material.color; type: color; to: red; startEvents: mouseleave; dur: 500";
animation__customevent="property: components.material.material.color; type: color; from: red; to: blue; startEvents: startanim001; pauseEvents: startanim002; resumeEvents : startanim003; dur: 500";>
animation__customevent="property: components.material.material.color; type: color; from: red; to: blue; startEvents: startanim001; dur: 500";>
</a-entity>
```

[eventsglitch]: https://glitch.com/edit/#!/aframe-animation-events?path=index.html:1:0

[Remix the Animating on Events Glitch][eventsglitch].

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:
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:

```
el.emit(`startanim001`, null, false);
Expand Down

0 comments on commit 6bd6f76

Please sign in to comment.