freealise commited on
Commit
b38167c
·
verified ·
1 Parent(s): 6874d0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -578,7 +578,7 @@ async(c, o, p, d, n, m, s)=>{
578
  now = new Date().getTime();
579
  delta = now - then;
580
  then = now - (delta % interval);
581
- if (delta >= interval - tolerance) {
582
  BABYLON.Engine.LastCreatedScene.activeCamera.target = BABYLON.Engine.LastCreatedScene.activeCamera.getDirection(parallax);
583
  BABYLON.Engine.LastCreatedScene.render();
584
  }
 
578
  now = new Date().getTime();
579
  delta = now - then;
580
  then = now - (delta % interval);
581
+ if (delta >= interval - tolerance && BABYLON.Engine.LastCreatedScene.activeCamera) {
582
  BABYLON.Engine.LastCreatedScene.activeCamera.target = BABYLON.Engine.LastCreatedScene.activeCamera.getDirection(parallax);
583
  BABYLON.Engine.LastCreatedScene.render();
584
  }