Fix url angle in free-flight not applying correctly. Fixes: #485

This commit is contained in:
Lukas Rieger (Blue) 2023-11-18 14:45:06 +01:00
parent 6d3774f24e
commit c7af5e9639
No known key found for this signature in database
GPG Key ID: 2D09EC5ED2687FF2
2 changed files with 12 additions and 6 deletions

View File

@ -708,6 +708,12 @@ export class BlueMapApp {
}
}
switch (values[9]) {
case "flat" : this.setFlatView(0); break;
case "free" : this.setFreeFlight(0, controls.position.y); break;
default : this.setPerspectiveView(0); break;
}
controls.position.x = parseFloat(values[1]);
controls.position.y = parseFloat(values[2]);
controls.position.z = parseFloat(values[3]);
@ -717,11 +723,7 @@ export class BlueMapApp {
controls.tilt = parseFloat(values[7]);
controls.ortho = parseFloat(values[8]);
switch (values[9]) {
case "flat" : this.setFlatView(0); break;
case "free" : this.setFreeFlight(0, controls.position.y); break;
default : this.setPerspectiveView(0); break;
}
this.updatePageAddress();
return true;
}

View File

@ -204,7 +204,11 @@ export const animate = function (animationFrame, durationMs = 1000, postAnimatio
}
};
window.requestAnimationFrame(time => animation.frame(time));
if (durationMs !== 0) {
window.requestAnimationFrame(time => animation.frame(time));
} else {
animation.frame(0);
}
return animation;
}