Converting webgl 3d coordinates to 2d screen coordinates (p5.js)

I'm trying to map html text on top of a webgl p5.js sphere of nodes that is rotating. I know I have to do something with a projection matrix and a view matrix in order to convert from 3d space to 2d but not sure how to get the matrix of the camera, if that's what I'm supposed to do? I found this which looked promising

You can see an Instagram vid example here:

Any help would be great. Incidentally I did something similar when using Three.js but I could get the projection matrix, with he p5.js one I'm not sure how I get that.


Sign In or Register to comment.