I have a 4000px x 3000px image texture that I'm adding to a Mesh/Plane.
var img = new THREE.MeshBasicMaterial({
map: THREE.ImageUtils.loadTexture('myimage.png')
});
this.plane = new THREE.Mesh(new THREE.PlaneGeometry(4000, 3000, img);
this.scene.add(this.plane);
I'm also using OrbitControls to control this plane. I've limited the controls to only zoom in and out and pan for now. Very little rotation. As I zoom in and out (dollyIn/dollyOut), I'd like to get the bounding box of the viewable area of the plane. By viewable area, I mean what the user can visibly see of the image texture in the browser at the current state.
If I'm completely zoomed out, my bounding box should be = [[0,0],[4000,3000]]. If I'm zoomed in then my bounding box could be = [[100, 200], [400, 500]].
How can this be achieved in three.js?