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

Building a project using rapier 0.12 fail when creating world. #257

Open
smjnab opened this issue Jan 29, 2024 · 1 comment
Open

Building a project using rapier 0.12 fail when creating world. #257

smjnab opened this issue Jan 29, 2024 · 1 comment

Comments

@smjnab
Copy link

smjnab commented Jan 29, 2024

I created a minimal example here https://codesandbox.io/p/sandbox/rapierbuild-n3q2l6.

Click the terminal icon, pick preview to build and launch the test in the browser to the right. Use Terminal icon in the browser to open the browser console.

In the log: Uncaught TypeError: Cannot read properties of undefined (reading 'rawintegrationparameters_new').

Using Vite.js 5.0.12, Pixi.js 7.4.0 and Rapier.js 0.12. With Rapier at 0.11.2 it works fine and running in watch works fine for 0.12. As watch works, guessing something has to be updated with Vite, any info on what might have changed to cause this issue?

@smjnab
Copy link
Author

smjnab commented Jan 29, 2024

Worked around the issue by using rapier2d-compat instead. Like this to keep chunks as when using rapier2d.
import("@dimforge/rapier2d-compat").then(module => module.init().then(() => { this.rapier = module; // ... }));

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

1 participant