mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
Fix for 3d heightmap / 3d view conflict (#360)
This commit is contained in:
parent
354eb74746
commit
257cf11986
2 changed files with 21 additions and 2 deletions
|
|
@ -432,6 +432,7 @@ function changeViewMode(event) {
|
|||
const button = event.target;
|
||||
|
||||
enterStandardView();
|
||||
|
||||
if (button.classList.contains("pressed")) {
|
||||
button.classList.remove("pressed");
|
||||
viewStandard.classList.add("pressed");
|
||||
|
|
@ -442,7 +443,20 @@ function changeViewMode(event) {
|
|||
}
|
||||
}
|
||||
|
||||
function disable3dViews() {
|
||||
viewMesh.disabled = true;
|
||||
viewGlobe.disabled = true;
|
||||
}
|
||||
|
||||
function enable3dViews() {
|
||||
viewMesh.disabled = false;
|
||||
viewGlobe.disabled = false;
|
||||
}
|
||||
|
||||
function enterStandardView() {
|
||||
viewMode.querySelectorAll(".pressed").forEach(button => button.classList.remove("pressed"));
|
||||
viewStandard.classList.add("pressed");
|
||||
|
||||
if (!document.getElementById("canvas3d")) return;
|
||||
ThreeD.stop();
|
||||
document.getElementById("canvas3d").remove();
|
||||
|
|
@ -555,4 +569,4 @@ function toggle3dOptions() {
|
|||
function changeResolution() {
|
||||
ThreeD.setResolution(this.value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue