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

class methods in CPP but not in JS #210

Open
elbriga opened this issue Sep 23, 2018 · 3 comments
Open

class methods in CPP but not in JS #210

elbriga opened this issue Sep 23, 2018 · 3 comments

Comments

@elbriga
Copy link

elbriga commented Sep 23, 2018

Hi all,
I want to change the rope's segment length (rest length?), but other question appeared...

Browsing the CPP source I come across many methods, like resetLinkrestLength, setRestLengthScale, updateConstants, ... in btSoftBody.cpp, that are not in the JS object (inspecting on the console).

Is there a way to access such methods in JS?

@kripken
Copy link
Owner

kripken commented Sep 24, 2018

The methods exposed to JS need to be added to ammo.idl. Can look at the history of that file to see PRs adding new things - PRs are always welcome.

(You can also remove methods from ammo.idl and rebuild, to generate a build with only what you want.)

@elbriga
Copy link
Author

elbriga commented Sep 24, 2018

Just figured it out now. Sorry for the anxiety. lol
Added the method for setting the RestLinkScale on the btSoftBody. Works like a charm!

@elbriga
Copy link
Author

elbriga commented Sep 24, 2018

Had little trouble with webidl, the apt version of emscripten on my Linux Mint complained about it.
Installing it from source did the trick

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

No branches or pull requests

2 participants