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

Fix infinite loop on impulse #28

Conversation

diarmidmackenzie
Copy link
Member

@diarmidmackenzie diarmidmackenzie commented Jan 6, 2023

A fix for #24, together with some refactoring to improve code robustness in the future.

I've verified all examples with the latest code, withh both 1.3.0 and 1.4.0. All run clean.

Some unit tests would be nice, but the existing UTs are so undeveloped that that's a big task for the future, rather than something I want to take on now.

Property indicates whether or not the body has a shape, so give it a name that reflects that.
…ed when hasShape is false.

_play or _pause being invoked when hasShape (previously called isLoaded) can lead to applyImpulse and __applyImpulse values getting messed up.
@diarmidmackenzie diarmidmackenzie marked this pull request as ready for review January 6, 2023 09:50
Copy link
Member

@vincentfretin vincentfretin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I read all your thread in the issue. The changes here looks clean.

@diarmidmackenzie diarmidmackenzie merged commit bf61f08 into c-frame:master Jan 6, 2023
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