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

What is Engine.Body? #53

Closed
samreid opened this issue Aug 11, 2021 · 4 comments
Closed

What is Engine.Body? #53

samreid opened this issue Aug 11, 2021 · 4 comments
Assignees

Comments

@samreid
Copy link
Member

samreid commented Aug 11, 2021

For #5, I saw references to Engine.Body but I wasn't sure where the implementation is. Can you clarify?

@jonathanolson
Copy link
Contributor

Each engine typically has its own body type (p2.Body is the type for p2.js), so it's just an abstraction over a reference to a body/object that can be provided back to the Engine API.

@samreid
Copy link
Member Author

samreid commented Aug 12, 2021

Is there a natural place that could be documented in a comment? Perhaps in a typedef?

@jonathanolson
Copy link
Contributor

Commented in the top of PhysicsEngine.js. A typedef doesn't really... make sense for any code. Presumably this would be doable/enforceable with TypeScript? Thoughts?

@samreid
Copy link
Member Author

samreid commented Aug 16, 2021

That seems good for now. Not sure whether TypesScript would use generics or an interface, etc. Closing.

@samreid samreid closed this as completed Aug 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants