|
@@ -72,6 +72,16 @@
|
|
|
|
|
|
transition = new Transition( sceneA, sceneB );
|
|
|
|
|
|
+ window.addEventListener( 'resize', onWindowResize );
|
|
|
+
|
|
|
+ function onWindowResize() {
|
|
|
+
|
|
|
+ sceneA.resize();
|
|
|
+ sceneB.resize();
|
|
|
+ renderer.setSize( window.innerWidth, window.innerHeight );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function animate() {
|
|
@@ -208,6 +218,14 @@
|
|
|
|
|
|
};
|
|
|
|
|
|
+ this.resize = function () {
|
|
|
+
|
|
|
+ camera.aspect = window.innerWidth / window.innerHeight;
|
|
|
+ camera.updateProjectionMatrix();
|
|
|
+ this.fbo.setSize( window.innerWidth, window.innerHeight );
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function Transition( sceneA, sceneB ) {
|