-
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
Add world.removeContactMaterial
method
#128
Add world.removeContactMaterial
method
#128
Conversation
After this is merged I can update |
2cc5994
to
897ced5
Compare
src/world/World.ts
Outdated
if (idx !== -1) { | ||
this.contactmaterials.splice(idx, 1) | ||
} | ||
this.contactMaterialTable.delete(cmat.materials[0].id, cmat.materials[1].id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (idx !== -1) { | |
this.contactmaterials.splice(idx, 1) | |
} | |
this.contactMaterialTable.delete(cmat.materials[0].id, cmat.materials[1].id) | |
if (idx === -1) { | |
return | |
} | |
this.contactmaterials.splice(idx, 1) | |
this.contactMaterialTable.delete(cmat.materials[0].id, cmat.materials[1].id) |
why is contactMaterialTable.delete
not under the check?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I copied from removeConstraint
method.
No objections to the suggested change, thanks!
Pushed update.
897ced5
to
834d989
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
world.removeContactMaterial
method
removeContactMaterial
toWorld
removeContraint
delete
toTupleDictionary
Map
object which has similar methods & use case