Because of Suspense/Async initiation issues with Jolt @isaac-mason's original library created a global object called Raw and accessing it was done with Raw.module
The jolt demos don't have to do this because they wait for the JoltInit promise before doing anything, and by then Jolt is correctly established on the Window as a global. So instead of new Raw.module.Vec3() for example, they do new Jolt.Vec3()
- I'm not even sure it's possible to do the
Jolt item as a global. I've not seen other libraries pull this off.
- With recent physics component system issues, we are likely going to need a global object we can access for singleton purposes.
If we decide to/have to keep it, should we continue to call it 'Raw.module` or would a semantic name be better?
Because of Suspense/Async initiation issues with Jolt @isaac-mason's original library created a global object called
Rawand accessing it was done withRaw.moduleThe jolt demos don't have to do this because they wait for the
JoltInitpromise before doing anything, and by thenJoltis correctly established on the Window as a global. So instead ofnew Raw.module.Vec3()for example, they donew Jolt.Vec3()Joltitem as a global. I've not seen other libraries pull this off.If we decide to/have to keep it, should we continue to call it 'Raw.module` or would a semantic name be better?