Problem in preventing pointer lock controls from moving through meshes in React.js

Since three is just a rendering framework and pointer lock controls don’t include collision, you may need to write it yourself (either using Box3, simple 2D vector comparison, or ammo.js - these are ordered by complexity, so if you’re unfamiliar with vector math, I’d go with Box3 intersections, and simulate camera position as a sphere / box3 around it.)

Also, see this thread and @Mugen87’s suggesions.