diff --git a/docs/components/animation.md b/docs/components/animation.md index dfefa80fb08..b50b7d338c6 100644 --- a/docs/components/animation.md +++ b/docs/components/animation.md @@ -9,8 +9,6 @@ examples: src: https://glitch.com/edit/#!/aframe-animation-events?path=index.html:1:0 - title: Generated Animations src: https://glitch.com/~aframe-shooting-stars - - title: Animating on Custom Events - src: https://glitch.com/~aframe-custom-event-emitted-animation --- [animationtimeline]: https://www.npmjs.com/package/aframe-animation-timeline-component @@ -142,7 +140,8 @@ We can use the `startEvents` property to animate upon events: geometry="primitive: box" 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__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";> ``` @@ -150,7 +149,7 @@ We can use the `startEvents` property to animate upon events: [Remix the Animating on Events Glitch][eventsglitch]. -To start an animation by explicitly emitting an event, 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);