Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example code for Animating on custom events (#4635) #5552

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kewalkishang
Copy link

Description:
Need for example regarding the use of custom events to trigger animations in A-Frame. The current documentation does not explicitly show how to use the .emit() function to start animations based on custom events, which can be confusing for new users.

Changes proposed:

  • Created a glitch example that demonstrates how to trigger animations using startEvents, pauseEvents, resumeEvents for custom events and then emitting them.
  • Added a link to the glitch example in the animation doc.

@kewalkishang kewalkishang changed the title Example code for Animating on custom events (aframevr#4635) Example code for Animating on custom events #4635 Jun 30, 2024
@kewalkishang kewalkishang changed the title Example code for Animating on custom events #4635 Example code for Animating on custom events (#4635) Jun 30, 2024
@dmarcos
Copy link
Member

dmarcos commented Jul 1, 2024

Thanks. The example uses an old version of A-Frame (1.6.0). Also I don't see any animations being triggered. I might be missing something

@kewalkishang
Copy link
Author

Hi @dmarcos, thanks for the review.
Updated A-Frame to the latest version (Had made the example a while back).
The animation is on the cube. It changes its color from Red to blue in 2.5 seconds now(It was 5 seconds before). The idea was to give users ample time to pause the animation in between and try the pauseEvents and resumeEvents as well.
Do let me know how I can make the example even better.

Best,
Kewal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants