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

Animation can now be disabled #7

Merged
merged 6 commits into from Dec 5, 2018

Conversation

paxperscientiam
Copy link
Contributor

@paxperscientiam paxperscientiam commented Dec 4, 2018

Hey @badzong , I've added the option to disable animation -- Instance.props.animate. When false, no callback loop.

EDIT: Bear with me, made some dumb mistakes. Will update when resolved.

EDIT2: @badzong , all done. For now, FuseBox doesn't let you set the script type.

EDIT3: Just realized something. There is no need for a separate "animate" option as this is implied by staticRotation. Instead, the core logic added here can be used implicity when staticRotation is zero.

@badzong badzong merged commit 1bb974b into badzong:master Dec 5, 2018
@badzong
Copy link
Owner

badzong commented Dec 5, 2018

Basically props.animate is good idea. Setting staticRotation to zero will still draw the SVG for every Frame. I just moved the if block a few lines up.

@paxperscientiam paxperscientiam deleted the disable-animation branch December 5, 2018 15:45
@paxperscientiam
Copy link
Contributor Author

If I'm understanding the code correctly, it seems that Instance.props.fps does nothing and that, currently, there is no way to adjust the draw frequency. Is that right?

@badzong
Copy link
Owner

badzong commented Dec 5, 2018

That's a bug. See line 242. I will push a fix in a few seconds.

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.

None yet

2 participants