mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-16 17:31:24 +01:00
fix: 3d view - don't allow download obj for globe
(cherry picked from commit 75ae52e953)
This commit is contained in:
parent
b8c0e0df69
commit
2bc008f52c
2 changed files with 15 additions and 7 deletions
|
|
@ -5472,19 +5472,19 @@
|
|||
<div data-tip="Set map rotation speed. Set to 0 is you want to toggle off the rotation">
|
||||
<div>Rotation:</div>
|
||||
<input id="options3dMeshRotationRange" type="range" min="0" max="10" step=".1" />
|
||||
<input id="options3dMeshRotationNumber" type="number" min="0" max="10" step=".1" style="width: 3em" />
|
||||
<input id="options3dMeshRotationNumber" type="number" min="0" max="10" step=".1" style="width: 4em" />
|
||||
</div>
|
||||
|
||||
<div data-tip="Set height scale">
|
||||
<div>Height scale:</div>
|
||||
<input id="options3dScaleRange" type="range" min="0" max="100" />
|
||||
<input id="options3dScaleNumber" type="number" min="0" max="1000" style="width: 3em" />
|
||||
<input id="options3dScaleNumber" type="number" min="0" max="1000" style="width: 4em" />
|
||||
</div>
|
||||
|
||||
<div data-tip="Set scene lightness">
|
||||
<div>Lightness:</div>
|
||||
<input id="options3dLightnessRange" type="range" min="0" max="100" />
|
||||
<input id="options3dLightnessNumber" type="number" min="0" max="500" style="width: 3em" />
|
||||
<input id="options3dLightnessNumber" type="number" min="0" max="500" style="width: 4em" />
|
||||
</div>
|
||||
|
||||
<div data-tip="Set sun position (x, y, z) to define shadows">
|
||||
|
|
@ -5524,7 +5524,7 @@
|
|||
<div data-tip="Set globe rotation speed. Set to 0 is you want to toggle off the rotation">
|
||||
<div>Rotation:</div>
|
||||
<input id="options3dGlobeRotationRange" type="range" min="0" max="10" step=".1" />
|
||||
<input id="options3dGlobeRotationNumber" type="number" min="0" max="10" step=".1" style="width: 3em" />
|
||||
<input id="options3dGlobeRotationNumber" type="number" min="0" max="10" step=".1" style="width: 4em" />
|
||||
</div>
|
||||
|
||||
<div data-tip="Set globe texture resolution">
|
||||
|
|
|
|||
|
|
@ -485,10 +485,17 @@ function changeDialogsTheme(themeColor, transparency) {
|
|||
}
|
||||
|
||||
function changeZoomExtent(value) {
|
||||
const min = Math.max(+byId("zoomExtentMin").value, 0.01);
|
||||
const max = Math.min(+byId("zoomExtentMax").value, 200);
|
||||
Zoom.scaleExtent([min, max]);
|
||||
const zoomExtentMin = byId("zoomExtentMin");
|
||||
const zoomExtentMax = byId("zoomExtentMax");
|
||||
|
||||
if (+zoomExtentMin.value > +zoomExtentMax.value) {
|
||||
[zoomExtentMin.value, zoomExtentMax.value] = [zoomExtentMax.value, zoomExtentMin.value];
|
||||
}
|
||||
const min = Math.max(+zoomExtentMin.value, 0.01);
|
||||
const max = Math.min(+zoomExtentMax.value, 200);
|
||||
zoomExtentMin.value = min;
|
||||
zoomExtentMax.value = max;
|
||||
zoom.scaleExtent([min, max]);
|
||||
const scale = minmax(+value, 0.01, 200);
|
||||
Zoom.scaleTo(svg, scale);
|
||||
}
|
||||
|
|
@ -1056,6 +1063,7 @@ export function toggle3dOptions() {
|
|||
const globe = byId("canvas3d").dataset.type === "viewGlobe";
|
||||
options3dMesh.style.display = globe ? "none" : "block";
|
||||
options3dGlobe.style.display = globe ? "block" : "none";
|
||||
options3dOBJSave.style.display = globe ? "none" : "inline-block";
|
||||
options3dScaleRange.value = options3dScaleNumber.value = ThreeD.options.scale;
|
||||
options3dLightnessRange.value = options3dLightnessNumber.value = ThreeD.options.lightness * 100;
|
||||
options3dSunX.value = ThreeD.options.sun.x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue