开源项目
官网:https://github.com/mrdoob/three.js
教程:https://github.com/josdirksen/learning-threejs
常用公式
gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
modelViewMatrix = camera.matrixWorldInverse * matrixWorld(不变)
相机坐标(x,y不变) = camera.matrixWorldInverse(position和quaternion变了) * 世界坐标(不变)
设备坐标x = (画布坐标x / 画布宽度) * 2 - 1
设备坐标y = -(画布坐标y / 画布高度) * 2 + 1
画布坐标x = (设备坐标x + 1) / 2 * 画布宽度
画布坐标y = -(设备坐标y - 1) / 2 * 画布高度