Navmesh significantly slower in latest version

After upgrading to Babylon.js alpha 60, we notice the navmesh generation is significantly slower with the same configuration. In order to make the upgrade work, we had to switch away from the CDN recast.js and use the recast-detour package (see Using Recast.js via NPM package import).

It looks like recast.js in recast-detour is roughly 2x the size of the recast.js in the Babylon CDN. Is it possible that the npm package is not using a release build? Anyone have any ideas?

@Cedric might have some ideas, I’m sure he can take a look next week :slight_smile:

1 Like

I was able to fix this by not using recast-detour and being sure to call window.Recast() before initialization.

I was also attempting to manually build recast-detour, but wasn’t able to find the source anywhere? Does anyone know how that package is built?

Here are the recast build files
.Extensions/recastjs at master · BabylonJS/Extensions · GitHub

Here is the latest build, including all the wasm.
.Babylon.js/dist/preview release at master · BabylonJS/Babylon.js · GitHub

Hmm yeah I was aware of the extensions/recastjs, but I was confused by the package.json containing a different name than recast-detour. How does the npm package recast-detour get published? The size of the built recast.js file is also 2x the size in recast-detour.

Let me publish a new npm version. I’ll clean up the package.json as well.

Package.json update

New package released:

3 Likes

Thanks Cedric, the new package seemed to solve the performance problem.

1 Like