nartc / angular-three

🧊 THREE.js integration for Angular 🧊
https://angular-three.netlify.app/
MIT License
306 stars 26 forks source link

[Feature] Method to remove physics body #129

Closed IRobot1 closed 2 years ago

IRobot1 commented 2 years ago

NgtPhysicBody provides methods to create physics bodies. However, looking at the code, the only place/time physics bodies are deleted is when the canvas is disposed.

Can you add a method to remove a body at runtime?

nartc commented 2 years ago

Added in latest version under the PhysicBodyApi as remove() and at(index).remove(). I'll check out the PRs soon