()
| 25 | */ |
| 26 | THREEx.WindowResize = function(renderer, camera){ |
| 27 | var callback = function(){ |
| 28 | // notify the renderer of the size change |
| 29 | renderer.setSize( window.innerWidth, window.innerHeight ); |
| 30 | // update the camera |
| 31 | camera.aspect = window.innerWidth / window.innerHeight; |
| 32 | camera.updateProjectionMatrix(); |
| 33 | } |
| 34 | // bind the resize event |
| 35 | window.addEventListener('resize', callback, false); |
| 36 | // return .stop() the function to stop watching window resize |
no outgoing calls
no test coverage detected