Hey there Babylonians!
I am currently working on an extensive project in React Native, and my team is planning on using BabylonJS as a physics engine for dice rolling. I have a very simple proof of concept of the dice rolling working using a bare webpack setup as noted in the documentation, and I am currently attempting to get that same setup working in React Native. However, I am running into a few very odd issues. I got CANNON loading fine using an inject in the React Native code, however the cannon engine is acting very weird (namely locking up Babylon when a cube Physics Imposter is just resting on the ground) so I would like to switch to Ammo to see if that would resolve some of the issues, as well as get access to the more robust mesh imposter it provides. However, when I try to load Ammo.js using
import * as Ammo from 'ammo.js or even a local import (
from './ammo.js when in the same dir) I get an error saying that
fs could not be found within the project. I have gained that since React Native does not run in a Node environment, fs is not accessable, yet Ammo depends on it. (https://stackoverflow.com/a/39046690/12063739) Has anyone had any luck getting Ammo.js loaded in React Native? Thanks for the help!
(ignore my jailbreak font thanks)