问题
I just made a 3D Graph with edges and vertices and when i change the view to orthographic all is inverted and the edges can be viewed inside the vertices, i think that is just an adjust with the normals, but im not sure if is really that.
I have Labels above these vertices and its upside down in orthographic view.
Anyone have an idea to deal with this situation?
Im using THREE.js to build this graph
Below is the code that perform the camera projections.
var width = options.width || 800,
height = options.height || 600,
near = options.near || 0.1,
far = options.far || 1000,
cam;
if (options.ortho) {
var right = width/30,
top = height/30;
var left = -right,
bottom = -top;
cam = new THREE.OrthographicCamera(left, right, bottom, top, near,
far);
} else {
var aspectRatio = width/height,
fov = options.fov || 75;
cam = new THREE.PerspectiveCamera(fov, aspectRatio, near, far);
}
回答1:
Your constructor args for OrthographicCamera
are in the wrong order. They should be:
camera = new THREE.OrthographicCamera( left, right, top, bottom, near, far );
three.js r.63
来源:https://stackoverflow.com/questions/20312740/all-is-inverted-when-i-use-orthographic-view