Both THREE.Vector3.project and THREE.Vector3.unproject perform calculation by multiplication of the vector by two matrices.

Long answer

Some of the fundamental mathematical operations in Computer Graphics are matrix calculations. A lot of transformations can be represented and processed by matrices â€“ translation, rotation, scaling, mirroring, switching coordinate systems, â€¦ and projection.

In Three.js THREE.Vector3.project calculates the normalized coordinates of a vertex. These coordinates are in the range [-1,1]. As expected this is done by two matrix multiplications â€“ one matrix that encodes the 3D position and orientation of the camera; and a second matrix that encodes the intrinsic properties of the camera that define the size and shape of its frustum.

The opposite operation is THREE.Vector3.unproject that calculates the frustum coordinates of a vector in normalized coordinates. Naturally it is done by two matrix multiplications too â€“ the inverse matrices from the projection, but multiplied in reverse order.

Projects this vector from world space into the cameraâ€™s normalized device coordinate (NDC) space.

I know you did not, because if you did - your question would be what a hell is NDC. And then in turn if you paste that question into google you can find a pic like this:

which more or less already explains what it is (and by extension what the numbers project() returns are) - frustum warped into a cube. But you are, of course, better off reading the text that comes with the image.