diff --git a/index.html b/index.html
index 80241d98..d2d184b4 100644
--- a/index.html
+++ b/index.html
@@ -5993,6 +5993,11 @@
>
+
+
+
+
+
Sky: grid.cells.h[c] < 20) ?? null;
+ }
+
+ // If water vertex, get uniform elevation
+ if (waterCellId !== null) {
+ const packCellIndex = gridToPackCellMap.get(waterCellId);
+ const featureId = pack.cells.f[packCellIndex];
+ if (featureId === undefined) return 0;
+
+ const feature = pack.features[featureId];
+ const waterHeight = feature.type === "lake" && feature.height ? feature.height : 20;
+ return ((waterHeight - LOWER_BY_WATER) / DIVIDER) * options.scale;
+ }
+
+ // Land vertex
+ return ((height - LOWER_BY_WATER) / DIVIDER) * options.scale;
}
function extendWater(width, height) {
@@ -699,6 +735,7 @@ window.ThreeD = (function () {
script.onerror = () => resolve(false);
});
}
+
function OrbitControls(camera, domElement) {
if (THREE.OrbitControls) return new THREE.OrbitControls(camera, domElement);
diff --git a/modules/ui/options.js b/modules/ui/options.js
index 84c1a6a0..551a78e6 100644
--- a/modules/ui/options.js
+++ b/modules/ui/options.js
@@ -1051,7 +1051,7 @@ function toggle3dOptions() {
byId("options3dMeshSky").addEventListener("input", changeColors);
byId("options3dMeshWater").addEventListener("input", changeColors);
byId("options3dGlobeResolution").addEventListener("change", changeResolution);
- // byId("options3dMeshWireframeMode").addEventListener("change",toggleWireframe3d);
+ byId("options3dMeshWireframeMode").addEventListener("change", toggleWireframe3d);
byId("options3dSunColor").addEventListener("input", changeSunColor);
byId("options3dSubdivide").addEventListener("change", toggle3dSubdivision);
@@ -1116,9 +1116,9 @@ function toggle3dOptions() {
ThreeD.toggle3dSubdivision();
}
- // function toggleWireframe3d() {
- // ThreeD.toggleWireframe();
- // }
+ function toggleWireframe3d() {
+ ThreeD.toggleWireframe();
+ }
function toggleSkyMode() {
const hide = ThreeD.options.extendedWater;