Reputation: 6154
When changing the camera from perspective to orthographic, the cameras position also seem to change so that 0,0,0 is located in the top left hand corner.
Is this behaviour correct?
See Example
var h = window.innerHeight;
var w = window.innerWidth;
var viewSize = h;
var aspectRatio = w/h; //1 unit should be one pixel
var left = (-aspectRatio * viewSize) / 2;
var right = (aspectRatio * viewSize) / 2;
var top = viewSize / 2;
var bottom = -viewSize / 2;
var near = 1;
var far = 100;
camera = new THREE.OrthographicCamera( left, right, top, bottom, near, far );
camera = new THREE.PerspectiveCamera(50, window.innerWidth / window.innerHeight, 1, 10000);
camera.position.z = 500;
Upvotes: 2
Views: 402
Reputation: 104793
CSS3DRenderer
does not support OrthographicCamera
.
three.js r.73
Upvotes: 2