Corrected bug and avoid sending to DB when not necessary

This commit is contained in:
Thomas FORGIONE 2015-07-06 18:36:00 +02:00
parent 986d221681
commit d4332f27fb
1 changed files with 5 additions and 2 deletions

View File

@ -56,6 +56,9 @@ window.onbeforeunload = function() {
init();
if (initMainScene !== L3D.initPeach && initMainScene !== L3D.initSponza)
logfps();
else
L3D.BD.disable();
animate();
function logfps() {
@ -231,8 +234,8 @@ function onWindowResize() {
previewer.domElement.height = container_size.height();
renderer.setSize(container_size.width(), container_size.height());
cameras.forEach(function(camera) {camera.aspect = container_size.width() / container_size.height();});
cameras.forEach(function(camera) {camera.updateProjectionMatrix();});
cameras.forEach(function(camera) {camera.camera.aspect = container_size.width() / container_size.height();});
cameras.forEach(function(camera) {camera.camera.updateProjectionMatrix();});
render();
}