Skip to content

Commit

Permalink
Update main.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Spiri0 authored Sep 15, 2024
1 parent ae17b28 commit fe053ae
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,26 +109,26 @@ class Main extends entity.Entity{

RAF() {

requestAnimationFrame((t) => {
requestAnimationFrame((t) => {

if (this.previousRAF === null) {
this.previousRAF = t;
} else {
if (this.previousRAF === null) {
this.previousRAF = t;
} else {
/*
const cameraDistance = this.camera_.position.length();
if(cameraDistance >= 5000){
this.MoveCameraToOrigin();
}
*/
const deltaTime = (t - this.previousRAF);
this.Step(deltaTime);
this.threejs_.Render();
this.previousRAF = t;
}
const deltaTime = (t - this.previousRAF);
this.Step(deltaTime);
this.threejs_.Render();
this.previousRAF = t;
}

this.RAF();
});
}
this.RAF();
});
}



Expand Down

0 comments on commit fe053ae

Please sign in to comment.