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

WebGL #34

Open
franckmolto opened this issue Aug 12, 2016 · 3 comments
Open

WebGL #34

franckmolto opened this issue Aug 12, 2016 · 3 comments

Comments

@franckmolto
Copy link

Well, it's not exactly an issue, but it would be great to have a build for WebGL. It seems that it has already been done with pevious version of bullet, using Emscripten.

Regards

@franckmolto
Copy link
Author

@asimplestd
Copy link

Hi,
‘Plugins’ folder doesn’t contain WebGL entry. Do you plan to add one? The issue is old and probably something has changed since 2016.
Thanks in advance!

@Phong13
Copy link
Owner

Phong13 commented Oct 26, 2021

I don't have plans to add a WebGL entry.

Bullet Physics is a big plugin written in pure C++ code. In theory a WebGL build can be added by adding all the Bullet Source to the il2cpp folder and Unity will magically compile it into the rest of its IL2CPP c++ code as it is being built. For WebGL this includes converting the compiled code to Javascript.

I am reluctant to try this for a few reasons:
This process is different than dropping .dlls into the plugin's forlder.
Also I am very skeptical that this will work. C++ is a very quirky language. High performance C++ usually does a lot of tricks with pointers that cannot be done in higher level languages like Javascript. I would be very surprised if the code worked in Javascript. Also I think the performance would be terrible. There is a good reason Bullet was written in C++ and not a high level interpreted language like Javascript.

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

3 participants