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

Feat/add rest and transitionstart events #207

Merged
merged 7 commits into from
Aug 30, 2021

Conversation

looeee
Copy link
Contributor

@looeee looeee commented Aug 29, 2021

This PR adds the new rest event and corresponding restEpsilon parameter discussed in #206.

Also added a new rest-and-sleep example to show the difference between the two events, and updated the readme.

While making the example, I discovered there was no way to reliably disable the buttons when starting a new transition using one of the buttons (which call .rotateTo and .dollyTo) - so I added an additional event, transitionstart. This fires whenever any kind of transition is started, which can be either a user input or a method with enableTransition = true.

I originally wanted transitionstart to fire only for a method with enableTransition = true, but not for user control. However, internally user controls use methods such as .rotate so there's currently no way to differentiate these. Probably that's ok though.

I checked in dist/ by mistake, let me know if you want me to remove it to make the code easier to review.

@yomotsu
Copy link
Owner

yomotsu commented Aug 29, 2021

Thanks for the PR! I'll take a look.

I should have indicated that it's better to ignore the dist folder...but it's okay.

@yomotsu
Copy link
Owner

yomotsu commented Aug 30, 2021

Thanks! Just merged!
I'll publish this change to NPM this weekend.

@yomotsu yomotsu merged commit 986c450 into yomotsu:dev Aug 30, 2021
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