I've gone through the working live example of CombinedCamera and with inspiration I embedded combinedcamera in my work.
camera = new THREE.CombinedCamera( width /2, height/2, 45, 0.1, 1000, -1000, 1000, 1000 );
But while using Perspective Camera, my application works fine:
But The same application, while using orthographic projection doesn't work at all and it looks so weird.
Whats the problem in my code? I want the orthographic projection in all x, y and z directions on the object. How to do that?
The width and height of the CombinedCamera
orthographic projection is from the intersection of a plane mid-way from the near and far planes of the perspective projection. If your object is small but close to the camera, it'll be rendered very small as in your second image.
Your settings have 0.1, 1000
as the near and far planes, so it's attempting to frame an object ~500 units from the camera, which is much larger than your object.
You have a number of options:
0.1, 50
- the midpoint will be ~25 units and will frame your objects as desired when switching modes.