Closed Sean-Bradley closed 3 months ago
Well, I upgraded and got the error you mentioned. The error appears when first initializing rapier, so it's possible that something in the rapier API got changed.
Unfortunately, that's about all I can determine. I don't know if there's a migration guide which explains what changed in 0.12.0. I haven't been doing much JavaScript programming in the last year (I've been working in Rust) so I haven't paid much attention to rapier.js.
Thanks, anyway. I will continue with version 0.11.2 for now since it works pretty good anyway. I will keep looking around for clues either way.
To let you know, I solved it by using @dimforge/rapier3d-compat@.12.0
instead.
npm run build
then npx vite preview
now works for v0.12.0
I am happy to create a pull request for this if you want.
Unfortunately, one of the purposes of this "example" project is to demonstrate how to use Rapier without needing to resort to the "compat" option. As you probably know, rapier-compat doesn't take advantage of the WASM-loading features of the bundler, and instead uses a binhex-encoded binary blob, which is significantly larger and therefore increases the loading time for the app.
Ok, thanks. That makes sence. It's back to the drawing board for now.
With
@dimforge/rapier3d@0.11.2
as is used in this current repo.npm run build
thennpx vite preview
is OKBut if updating to latest
rapier3d@0.12.0
npm run build
thennpx vite preview
fails with errorIf i downgrade it works again
npm run build
thennpx vite preview
is OK