how to use the Spatial mapping of HoloLens

This is mainly to achieve remote video annotation function;Real spatial location is obtained by environmental grid ray collision detection;

it worked in Unity by spatial mapping of HoloLens; How do I implement this feature by Three.js;

THREE.Raycaster it worked in UI or model,but not worked in real environment

i found the same question Raycast in a WebXR AR Session;Can this function be implemented on the three.js?