问题
I'm working on a drawing program and what I need is a THREE.Object3D element that would have a constant size - just like the line has always 1px. In other words, I'm trying to put to the stage an object which size would be always the same to the viewer (so if you got closer to it, it's size wouldn't change). Similar mechanism is with THREE.Line - it's always 1px wide. I need to create a circle (or maybe other shapes also). What's the best way to do that?
回答1:
Sounds like you need to use an orthographic camera -- e.g.
var camOrtho = new THREE.OrthographicCamera(-width/2, width/2, height/2,-height/2, -100,100);
if "width" and "heaight" are the size of your canvas.
Just use that rather than the typical persective camera.
来源:https://stackoverflow.com/questions/14150703/three-js-object-with-constant-size