Three.JS 从世界坐标系转换到屏幕坐标系

 var projector = new THREE.Projector();  

 var world_vector = new THREE.Vector3(0,0,1);  

 var vector = projector.projectVector(world_vector, camera);  

 var halfWidth = window.innerWidth / 2;
var halfHeight = window.innerHeight / 2; var result = { x: Math.round(vector.x * halfWidth + halfWidth),
y: Math.round(-vector.y * halfHeight + halfHeight) };
上一篇:html中,文件上传时使用的的样式自定义


下一篇:第三个Sprint冲刺第八天