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

RAPIER.BodyStatus needs to be updated to RAPIER.RigidBodyType in the "getting started" codepen example #48

Open
josephrocca opened this issue Oct 4, 2021 · 2 comments · May be fixed by dimforge/rapier.rs#47

Comments

@josephrocca
Copy link

The example codepen linked from this "getting started" page of the docs errors due to RAPIER.BodyStatus not existing. Per the v0.7.0 changelog it needs to be updated to RAPIER.RigidBodyType, or use the shorthand .newStatic()/.newDynamic().

I'm not able to submit a pull request to fix this because the code is on CodeMirror rather than Github. I wonder if there's some way to move the example code to Github but also keep them interactive/editable like on codepen? It would be handy if codepen had a URL-based import like https://codepen.io/?js=https://github.com/dimforge/rapier.js/path/to/example.js

@BraidenPsiuk
Copy link

Hey @josephrocca, I actually found that Codepen example by looking at the Getting Started page too. I left a comment on the pen asking for help earlier today and then Googled an answer out of desperation and was happy to see I wasn't the only one having the issue! Your fix worked, thanks! I'm linking your work-around in my comment on the pen so others may find it as well.

This definitely seems like it could be a deterrent for people interested in using the library if the only example on Codepen isn't working- which is unfortunate, since this seems like an awesome lib.

Also, at first glance, I expected the simulation to actually be rendered and play out in a scene, and the fact that it didn't made it feel broken as well (even though it isn't). I understand the desire to keep the pen simple without importing a rendering library and add all the extra code to make that happen, that defeats the point of a "short and sweet" pen showing how to get started with the lib and without extra resources. So it probably should stay as it is besides the fix you suggested... but I'm hoping when the pen is fixed, Sébastien can also add

Check the console to see results!

in the HTML section so people don't just see a white screen and assume it's broken :)

@NodeGuy
Copy link

NodeGuy commented Sep 29, 2022

I fixed the CodePen example, made it more idiomatic, and added "short and sweet" rendering without a library:

https://codepen.io/StubbornCreature/pen/dyedmKZ

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 a pull request may close this issue.

3 participants