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

support friction float #17742

Closed
wants to merge 0 commits into from
Closed

support friction float #17742

wants to merge 0 commits into from

Conversation

longchuan
Copy link
Contributor

support friction float

Copy link

github-actions bot commented Oct 19, 2024

👍 Package size ⤵ -24 bytes, old: 5446736, new: 5446712

Interface Check Report

This pull request does not change any public interfaces !

return this._restitution;
}

set restitution (value) {
set restitution(value) {
if (!math.equals(this._restitution, value)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we also need to fix _restitution here since it's also a float?

return this._friction;
}

set friction (value) {
if (!math.equals(this._friction, value)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps, we need to check whether the value is changed by math.approx rather than math.equals.
Because if value is not changed, the PhysicsMaterial.EVENT_UPDATE event should not be emitted.

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