For information, vtkIncrementalOctreePointLocator already exists in VTK.js
vtkIncrementalOctreePointLocator