Have you tried Turf.js? It goes pretty far when it comes to in-browser spatial analysis. Baremaps is more about the server side of web mapping. We currently use MapLibre for rendering the vector tiles we produce in the browser and plan to support 3d tiles in the future.
I should try Turf again. The core problem last time was that it fundamentally does not support “Simple”/ Euclidean coordinate systems. When I want to do analysis on flatland indoor maps, it does all the math wrong.