-
Notifications
You must be signed in to change notification settings - Fork 133
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
Rename .computeAABB() to .updateAABB(); #77
Conversation
Hello, could you motivate the reason behind this PR? |
Changing computeAABB() to updateAABB() for the Body class has been on the todo for a while. Also, the current format is computeX() and updateX(), where computeX() usually has parameters and returns a value, while updateX() has no parameters and changes internal variables. computeAABB does not return anything or accept parameters, and instead updates the internal AABB for the body. Therefore, I think it makes more sense to change it to updateAABB(). |
True, it was as @todo in a jsdoc comment. However I don't know about this one, three.js uses the word compute for these kind of methods. What do you guys think @stockhuman @codynova? |
I do think it makes sense to bring the method name inline with the other patterns throughout Cannon, but I also see value in bringing our method names more inline with Three. We could consider changing our other update method names to be closer to the pattern in Three, but that seems like it could cause a lot of churn, and we'd have to rethink our method naming scheme. Let's wait and see what Mike thinks. @marcofugaro I think you get the final decision. |
Hey folks. As when I first saw this issue, I still broadly agree with the change & can now echo Cody. I'd go ahead an honour the old todo. |
Right, didn't notice that in the Body the pattern was |
No description provided.