piqnt / planck.js

2D JavaScript Physics Engine
http://piqnt.com/planck.js/
MIT License
4.87k stars 236 forks source link

docs: Update Body class documentation #259

Closed hbaklan943 closed 1 year ago

hbaklan943 commented 1 year ago

Added information about the setType and getType methods in the Body class documentation.

shakiba commented 1 year ago

This is where you need to remove @internal tag if you would like: https://github.com/piqnt/planck.js/blob/master/src/dynamics/Body.ts#L388

hbaklan943 commented 1 year ago

Sure, I am on it.

shakiba commented 1 year ago

Thanks!

Api docs also needs to be added as comments in the source code, otherwise they will be overwritten by next api doc generation.

If you like to see how it works you can run npm run typedoc. But please do not add generated docs in this PR, I will generate them a little bit later.

hbaklan943 commented 1 year ago

Hmm, so I could have generated the docs using that command. Just learned about that npm package. Now editing the source code accordingly...

hbaklan943 commented 1 year ago

I reverted the docs back to its original state and edited only the src/dynamics/Body.ts to add doc comment to method definitions, hopefully, that was what you wanted.

shakiba commented 1 year ago

I reverted the docs back to its original state and edited only the src/dynamics/Body.ts to add doc comment to method definitions, hopefully, that was what you wanted.

Yes, looks great! I will re-generate api docs tomorrow. There has been many small changes in the api for the new version, so I need to review them before publishing api docs.