isaac-mason / recast-navigation-js

JavaScript navigation mesh construction, path-finding, and spatial reasoning toolkit. WebAssembly port of Recast Navigation.
https://recast-navigation-js.isaacmason.com
MIT License
273 stars 25 forks source link

Key Precision #435

Open marklundin opened 1 month ago

marklundin commented 1 month ago

Just wondering if it makes sense to have a prevision specifier here on the key, so that you can collapse nearby vertices?

https://github.com/isaac-mason/recast-navigation-js/blob/39ccf74307359b58145923aa454101b632912a08/packages/recast-navigation-three/src/utils/get-positions-and-indices.ts#L59

isaac-mason commented 1 month ago

That could be useful for sure, recast's voxelisation process doesn't require high precision in a lot of cases. I would be interested to see performance implications for larger inputs.

(Aside: If in creating recast-navigation/playcanvas you come across some logic in recast-navigation/three you could reuse, you could consider creating common utilities in recast-navigation/generators or recast-navigation/core)