After creating a 3D Graph with edges and vertices, I noticed that when I change the view to orthographic, everything is inverted. The edges appear inside the vertices, and I suspect it may be an issue with the normals. However, I'm uncertain if that's the root cause.
In addition, the labels above the vertices are upside down in orthographic view.
Does anyone have any suggestions on how to address this problem?
I am utilizing THREE.js for constructing this graph.
Below you can find the code responsible for 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);
}