I try to switch between Perspective and Orthographic cameras in my script. I want object on some depth to keep it's projection size. I gave up to understand the geometry...
Could you provide some link to a simple tutorial this is too complicated for me.
For object with position.z==0
i have:
perspCamera = new THREE.PerspectiveCamera(45, W / H, 1, 1000);
perspCamera.position.z = 100;
var S=Math.tan((45/180)*Math.PI)*100;
orthoCamera = new THREE.OrthographicCamera( -S, S, S, -S, 1, 1000 );
It is incorrect.
Update:
I get it I will post an answer with codepen link