MeshWalk.js is a JS library which helps your TPS game development with three.js.
examples
See following demos and check the source code with some comments. (You need three.js via peerDependencies or importmap)
examples with recast-navigation-js: