I can see that the issue only occurs when making enough instances.
When the loop (line 84 in the playground) is set to 5 instances the OOM doesn’t occur but when set to 10 or higher it’s consistent on the error.
Unfortunately there is not much I can do here. Recast is limited by the browser allocated memory. No other choice than limiting the geometry and resolution with recast.
I was worried that was the case .
Do you happen to know any useful information on how to limit the geometry and resolution with recast?
Thanks in advance!
You can have mesh for rendering and different mesh, simplified, for navigation. Or exclude mesh that will have no impact on navmesh computation. Or replace some meshes with convex hull.