- slicing box default off

- default geology tab
- dynmic email link from service contact
- egdi_disclaimer.html
- add model and border groups to Map.ts
This commit is contained in:
Arno Kaimbacher 2021-07-06 11:08:59 +02:00
parent e27fcaddb2
commit 65a099547c
16 changed files with 504 additions and 458 deletions

View File

@ -16,7 +16,7 @@
"request": "launch", "request": "launch",
"name": "Launch Chrome against localhost", "name": "Launch Chrome against localhost",
// "port": 9222, // "port": 9222,
"url": "http://localhost:8080", "url": "http://localhost:8080?modelid=20",
"webRoot": "${workspaceFolder}", "webRoot": "${workspaceFolder}",
"breakOnLoad": true, "breakOnLoad": true,
"runtimeExecutable": "C:/ProgramData/scoop/apps/googlechrome/current/chrome.exe", "runtimeExecutable": "C:/ProgramData/scoop/apps/googlechrome/current/chrome.exe",

56
egdi_disclaimer.html Normal file
View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>GeoTief 3DViewer - Haftungsausschlu&szlig;</title>
<style type="text/css">
#container {
width: 770px;
/* Mit einer Breite, die 20 Pixel unter der vollen Breite von 800 Pixel liegt, können Sie dem Browser-Chrome Rechnung tragen und gleichzeitig eine horizontale Bildlaufleiste vermeiden. */
margin: 0 auto;
/* Durch automatische Ränder (in Verbindung mit einer Breite) wird die Seite zentriert. */
text-align: justify;
/* Hierdurch wird die Einstellung text-align: center im Body-Element überschrieben. */
}
</style>
</head>
<body style="font-family:Verdana, Geneva, sans-serif; text-align:center; font-size:0.9em">
<div id="container">
<p>
<div style="margin-bottom: 1em"><strong>Disclaimer/Haftungsausschluss GBA:</strong></div>
</p>
<p>
Dem in diesem Web Viewer dargestellten, geologischen 3D Modell liegen verschiedene Untergrunddaten zugrunde.
Diese umfassen u. A. geologische Strukturkarten, Profilschnitte, Bohrprofile, geophysikalische Messungen
etc.
Diese Informationen dienen nach Prüfung ihrer Plausibilität als Interpretationsgrundlage für die
Erststellung eines geologischen 3D Modells.
Die Qualität der modellierten Grenzflächen ist abhängig von Dichte und Qualität der verwendeten Datenpunkte,
der regional-geologischen Expertise der modellierenden Personen und der geologischen Komplexität des zu
modellierenden Gebiets.
</p>
<p>
Wenngleich die Geologische Bundesanstalt die verwendeten Informationen mit bestem Wissen und Gewissen bei
der Modellerstellung berücksichtigt hat,
garantiert die Geologische Bundesanstalt weder Vollständigkeit noch Richtigkeit des Modells.
Daraus abgeleitete Informationen (z.B. virtuelle Bohrprofile) entsprechen dem Modell aber nicht der
Realität!
Die Geologische Bundesanstalt haftet weder für Fehler oder Unzulänglichkeiten des Modells, noch für jegliche
Ansprüche oder Kosten,
die durch den Gebrauch des Modells entstehen könnten.
Darüber hinaus gibt das dargestellte Modell nur die Interpretation der bei der Erstellung verwendeten
Untergrunddaten wieder.
Zukünftige oder neu herangezogene Daten sowie technische Fortschritte können die Qualität des Modells
verbessern.
</p>
</div>
</body>
</html>

View File

@ -72,12 +72,12 @@
<a id="menu-dowload-button" class="navbar-item" type="submit" download="file.png"> <a id="menu-dowload-button" class="navbar-item" type="submit" download="file.png">
Download Map Download Map
</a> </a>
<a class="navbar-item"> <a id="menu-disclaimer-button" target="_blank" href="egdi_disclaimer.html" class="navbar-item">
Contact Disclaimer
</a> </a>
<hr class="navbar-divider"> <hr class="navbar-divider">
<a class="navbar-item"> <a id="menu-email-button" class="navbar-item">
Report an issue Contact
</a> </a>
</div> </div>
</div> </div>
@ -184,7 +184,7 @@
<div class="control"> <div class="control">
<label class="checkbox"> <label class="checkbox">
<input type="checkbox" id="chkSlicingBox" <input type="checkbox" id="chkSlicingBox"
autocomplete="off" checked> autocomplete="off">
slicing box slicing box
</label> </label>
</div> </div>

319
package-lock.json generated
View File

@ -12,7 +12,6 @@
"@fortawesome/fontawesome-free": "^5.15.2", "@fortawesome/fontawesome-free": "^5.15.2",
"@types/three": "^0.129.1", "@types/three": "^0.129.1",
"bulma": "^0.9.2", "bulma": "^0.9.2",
"hull.js": "^0.2.11",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"proj4": "^2.6.3", "proj4": "^2.6.3",
@ -33,7 +32,7 @@
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"img-loader": "^4.0.0", "img-loader": "^4.0.0",
"mini-css-extract-plugin": "^1.3.1", "mini-css-extract-plugin": "^2.0.0",
"node-sass": "^6.0.0", "node-sass": "^6.0.0",
"resolve-url-loader": "^4.0.0", "resolve-url-loader": "^4.0.0",
"sass-loader": "^12.1.0", "sass-loader": "^12.1.0",
@ -1733,9 +1732,9 @@
"peer": true "peer": true
}, },
"node_modules/@types/debug": { "node_modules/@types/debug": {
"version": "4.1.5", "version": "4.1.6",
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.6.tgz",
"integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==", "integrity": "sha512-7fDOJFA/x8B+sO1901BmHlf5dE1cxBU8mRXj8QOEDnn16hhGJv/IHxJtZhvsabZsIMn0eLIyeOKAeqSNJJYTpA==",
"dev": true, "dev": true,
"peer": true "peer": true
}, },
@ -1778,9 +1777,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "15.12.5", "version": "16.0.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.5.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.0.0.tgz",
"integrity": "sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg==", "integrity": "sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg==",
"dev": true "dev": true
}, },
"node_modules/@types/normalize-package-data": { "node_modules/@types/normalize-package-data": {
@ -1790,9 +1789,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/three": { "node_modules/@types/three": {
"version": "0.129.1", "version": "0.129.2",
"resolved": "https://registry.npmjs.org/@types/three/-/three-0.129.1.tgz", "resolved": "https://registry.npmjs.org/@types/three/-/three-0.129.2.tgz",
"integrity": "sha512-31VTcjAQNggIrCH9NVotTYsr5Ws/QMGGTaMK6RP3EgyzW2WEuZdm25TNidd6PJ3e4a6/hbswNacnTsjwc7ksbw==" "integrity": "sha512-fZDNRtUFnq3baNjDiAzi4QoHYcczWtEdsduH/tpiwk91fbVk8COJiT/iLoN3tIOjLKMySoYsjUfP0VTmUfZKLw=="
}, },
"node_modules/@webassemblyjs/ast": { "node_modules/@webassemblyjs/ast": {
"version": "1.11.0", "version": "1.11.0",
@ -2359,9 +2358,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001241", "version": "1.0.30001242",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001241.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001242.tgz",
"integrity": "sha512-1uoSZ1Pq1VpH0WerIMqwptXHNNGfdl7d1cJUFs80CwQ/lVzdhTvsFZCeNFslze7AjsQnb4C85tzclPa1VShbeQ==", "integrity": "sha512-KvNuZ/duufelMB3w2xtf9gEWCSxJwUgoxOx5b6ScLXC4kPc9xsczUVCPrQU26j5kOsHM4pSUL54tAZt5THQKug==",
"dev": true, "dev": true,
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
@ -2744,12 +2743,12 @@
} }
}, },
"node_modules/css-loader/node_modules/schema-utils": { "node_modules/css-loader/node_modules/schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
}, },
@ -2814,9 +2813,9 @@
} }
}, },
"node_modules/debug": { "node_modules/debug": {
"version": "4.3.1", "version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"ms": "2.1.2" "ms": "2.1.2"
@ -2921,9 +2920,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.3.762", "version": "1.3.768",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.762.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.768.tgz",
"integrity": "sha512-LehWjRpfPcK8F1Lf/NZoAwWLWnjJVo0SZeQ9j/tvnBWYcT99qDqgo4raAfS2oTKZjPrR/jxruh85DGgDUmywEA==", "integrity": "sha512-I4UMZHhVSK2pwt8jOIxTi3GIuc41NkddtKT/hpuxp9GO5UWJgDKTBa4TACppbVAuKtKbMK6BhQZvT5tFF1bcNA==",
"dev": true "dev": true
}, },
"node_modules/emoji-regex": { "node_modules/emoji-regex": {
@ -3143,9 +3142,9 @@
"dev": true "dev": true
}, },
"node_modules/fastq": { "node_modules/fastq": {
"version": "1.11.0", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz",
"integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@ -3187,12 +3186,12 @@
} }
}, },
"node_modules/file-loader/node_modules/schema-utils": { "node_modules/file-loader/node_modules/schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
}, },
@ -3602,11 +3601,6 @@
"npm": ">=1.3.7" "npm": ">=1.3.7"
} }
}, },
"node_modules/hull.js": {
"version": "0.2.11",
"resolved": "https://registry.npmjs.org/hull.js/-/hull.js-0.2.11.tgz",
"integrity": "sha512-WEmMRCFqoZA0d7bD9KY9RK0rTBKRfNqDExi8OvFz5A57hpywyc0Wd5N4egF9cU+E69p1KjE/fTIYU4CjOgXdZQ=="
},
"node_modules/human-signals": { "node_modules/human-signals": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
@ -4228,47 +4222,31 @@
} }
}, },
"node_modules/mini-css-extract-plugin": { "node_modules/mini-css-extract-plugin": {
"version": "1.6.2", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.2.tgz", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.1.0.tgz",
"integrity": "sha512-WhDvO3SjGm40oV5y26GjMJYjd2UMqrLAGKy5YS2/3QKJy2F7jgynuHTir/tgUUOiNQu5saXHdc8reo7YuhhT4Q==", "integrity": "sha512-SV1GgjMcfqy6hW07rAniUbQE4qS3inh3v4rZEUySkPRWy3vMbS3jUCjMOvNI4lUnDlQYJEmuUqKktTCNY5koFQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"loader-utils": "^2.0.0", "schema-utils": "^3.0.0"
"schema-utils": "^3.0.0",
"webpack-sources": "^1.1.0"
}, },
"engines": { "engines": {
"node": ">= 10.13.0" "node": ">= 12.13.0"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/webpack" "url": "https://opencollective.com/webpack"
}, },
"peerDependencies": { "peerDependencies": {
"webpack": "^4.4.0 || ^5.0.0" "webpack": "^5.0.0"
}
},
"node_modules/mini-css-extract-plugin/node_modules/loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"dependencies": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
},
"engines": {
"node": ">=8.9.0"
} }
}, },
"node_modules/mini-css-extract-plugin/node_modules/schema-utils": { "node_modules/mini-css-extract-plugin/node_modules/schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
}, },
@ -6040,12 +6018,12 @@
} }
}, },
"node_modules/terser-webpack-plugin/node_modules/schema-utils": { "node_modules/terser-webpack-plugin/node_modules/schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
}, },
@ -6306,12 +6284,12 @@
} }
}, },
"node_modules/url-loader/node_modules/schema-utils": { "node_modules/url-loader/node_modules/schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
}, },
@ -6383,9 +6361,9 @@
} }
}, },
"node_modules/webpack": { "node_modules/webpack": {
"version": "5.41.1", "version": "5.42.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.41.1.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.42.1.tgz",
"integrity": "sha512-AJZIIsqJ/MVTmegEq9Tlw5mk5EHdGiJbDdz9qP15vmUH+oxI1FdWcL0E9EO8K/zKaRPWqEs7G/OPxq1P61u5Ug==", "integrity": "sha512-msikozzXrG2Hdx+dElq0fyNvxPFsaM2dKLc/l+xkMmhO/1qwVJ9K9gY+fi/49MYWcpSP7alnK5Q78Evrd1LiqQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/eslint-scope": "^3.7.0", "@types/eslint-scope": "^3.7.0",
@ -6393,7 +6371,7 @@
"@webassemblyjs/ast": "1.11.0", "@webassemblyjs/ast": "1.11.0",
"@webassemblyjs/wasm-edit": "1.11.0", "@webassemblyjs/wasm-edit": "1.11.0",
"@webassemblyjs/wasm-parser": "1.11.0", "@webassemblyjs/wasm-parser": "1.11.0",
"acorn": "^8.2.1", "acorn": "^8.4.1",
"browserslist": "^4.14.5", "browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2", "chrome-trace-event": "^1.0.2",
"enhanced-resolve": "^5.8.0", "enhanced-resolve": "^5.8.0",
@ -6495,13 +6473,16 @@
} }
}, },
"node_modules/webpack-sources": { "node_modules/webpack-sources": {
"version": "1.4.3", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz",
"integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", "integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"source-list-map": "^2.0.0", "source-list-map": "^2.0.1",
"source-map": "~0.6.1" "source-map": "^0.6.1"
},
"engines": {
"node": ">=10.13.0"
} }
}, },
"node_modules/webpack-sources/node_modules/source-map": { "node_modules/webpack-sources/node_modules/source-map": {
@ -6514,12 +6495,12 @@
} }
}, },
"node_modules/webpack/node_modules/schema-utils": { "node_modules/webpack/node_modules/schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
}, },
@ -6531,28 +6512,6 @@
"url": "https://opencollective.com/webpack" "url": "https://opencollective.com/webpack"
} }
}, },
"node_modules/webpack/node_modules/source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/webpack/node_modules/webpack-sources": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz",
"integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==",
"dev": true,
"dependencies": {
"source-list-map": "^2.0.1",
"source-map": "^0.6.1"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/which": { "node_modules/which": {
"version": "2.0.2", "version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
@ -7964,9 +7923,9 @@
"peer": true "peer": true
}, },
"@types/debug": { "@types/debug": {
"version": "4.1.5", "version": "4.1.6",
"resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.5.tgz", "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.6.tgz",
"integrity": "sha512-Q1y515GcOdTHgagaVFhHnIFQ38ygs/kmxdNpvpou+raI9UO3YZcHDngBSYKQklcKlvA7iuQlmIKbzvmxcOE9CQ==", "integrity": "sha512-7fDOJFA/x8B+sO1901BmHlf5dE1cxBU8mRXj8QOEDnn16hhGJv/IHxJtZhvsabZsIMn0eLIyeOKAeqSNJJYTpA==",
"dev": true, "dev": true,
"peer": true "peer": true
}, },
@ -8009,9 +7968,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "15.12.5", "version": "16.0.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-15.12.5.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.0.0.tgz",
"integrity": "sha512-se3yX7UHv5Bscf8f1ERKvQOD6sTyycH3hdaoozvaLxgUiY5lIGEeH37AD0G0Qi9kPqihPn0HOfd2yaIEN9VwEg==", "integrity": "sha512-TmCW5HoZ2o2/z2EYi109jLqIaPIi9y/lc2LmDCWzuCi35bcaQ+OtUh6nwBiFK7SOu25FAU5+YKdqFZUwtqGSdg==",
"dev": true "dev": true
}, },
"@types/normalize-package-data": { "@types/normalize-package-data": {
@ -8021,9 +7980,9 @@
"dev": true "dev": true
}, },
"@types/three": { "@types/three": {
"version": "0.129.1", "version": "0.129.2",
"resolved": "https://registry.npmjs.org/@types/three/-/three-0.129.1.tgz", "resolved": "https://registry.npmjs.org/@types/three/-/three-0.129.2.tgz",
"integrity": "sha512-31VTcjAQNggIrCH9NVotTYsr5Ws/QMGGTaMK6RP3EgyzW2WEuZdm25TNidd6PJ3e4a6/hbswNacnTsjwc7ksbw==" "integrity": "sha512-fZDNRtUFnq3baNjDiAzi4QoHYcczWtEdsduH/tpiwk91fbVk8COJiT/iLoN3tIOjLKMySoYsjUfP0VTmUfZKLw=="
}, },
"@webassemblyjs/ast": { "@webassemblyjs/ast": {
"version": "1.11.0", "version": "1.11.0",
@ -8493,9 +8452,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001241", "version": "1.0.30001242",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001241.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001242.tgz",
"integrity": "sha512-1uoSZ1Pq1VpH0WerIMqwptXHNNGfdl7d1cJUFs80CwQ/lVzdhTvsFZCeNFslze7AjsQnb4C85tzclPa1VShbeQ==", "integrity": "sha512-KvNuZ/duufelMB3w2xtf9gEWCSxJwUgoxOx5b6ScLXC4kPc9xsczUVCPrQU26j5kOsHM4pSUL54tAZt5THQKug==",
"dev": true "dev": true
}, },
"caseless": { "caseless": {
@ -8796,12 +8755,12 @@
} }
}, },
"schema-utils": { "schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
} }
@ -8839,9 +8798,9 @@
"dev": true "dev": true
}, },
"debug": { "debug": {
"version": "4.3.1", "version": "4.3.2",
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz",
"integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==",
"dev": true, "dev": true,
"requires": { "requires": {
"ms": "2.1.2" "ms": "2.1.2"
@ -8919,9 +8878,9 @@
} }
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.3.762", "version": "1.3.768",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.762.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.768.tgz",
"integrity": "sha512-LehWjRpfPcK8F1Lf/NZoAwWLWnjJVo0SZeQ9j/tvnBWYcT99qDqgo4raAfS2oTKZjPrR/jxruh85DGgDUmywEA==", "integrity": "sha512-I4UMZHhVSK2pwt8jOIxTi3GIuc41NkddtKT/hpuxp9GO5UWJgDKTBa4TACppbVAuKtKbMK6BhQZvT5tFF1bcNA==",
"dev": true "dev": true
}, },
"emoji-regex": { "emoji-regex": {
@ -9092,9 +9051,9 @@
"dev": true "dev": true
}, },
"fastq": { "fastq": {
"version": "1.11.0", "version": "1.11.1",
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.0.tgz", "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz",
"integrity": "sha512-7Eczs8gIPDrVzT+EksYBcupqMyxSHXXrHOLRRxU2/DicV8789MRBRR8+Hc2uWzUupOs4YS4JzBmBxjjCVBxD/g==", "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"requires": { "requires": {
@ -9123,12 +9082,12 @@
} }
}, },
"schema-utils": { "schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
} }
@ -9432,11 +9391,6 @@
"sshpk": "^1.7.0" "sshpk": "^1.7.0"
} }
}, },
"hull.js": {
"version": "0.2.11",
"resolved": "https://registry.npmjs.org/hull.js/-/hull.js-0.2.11.tgz",
"integrity": "sha512-WEmMRCFqoZA0d7bD9KY9RK0rTBKRfNqDExi8OvFz5A57hpywyc0Wd5N4egF9cU+E69p1KjE/fTIYU4CjOgXdZQ=="
},
"human-signals": { "human-signals": {
"version": "2.1.0", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",
@ -9902,34 +9856,21 @@
"dev": true "dev": true
}, },
"mini-css-extract-plugin": { "mini-css-extract-plugin": {
"version": "1.6.2", "version": "2.1.0",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.6.2.tgz", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.1.0.tgz",
"integrity": "sha512-WhDvO3SjGm40oV5y26GjMJYjd2UMqrLAGKy5YS2/3QKJy2F7jgynuHTir/tgUUOiNQu5saXHdc8reo7YuhhT4Q==", "integrity": "sha512-SV1GgjMcfqy6hW07rAniUbQE4qS3inh3v4rZEUySkPRWy3vMbS3jUCjMOvNI4lUnDlQYJEmuUqKktTCNY5koFQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"loader-utils": "^2.0.0", "schema-utils": "^3.0.0"
"schema-utils": "^3.0.0",
"webpack-sources": "^1.1.0"
}, },
"dependencies": { "dependencies": {
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.0.tgz",
"integrity": "sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ==",
"dev": true,
"requires": {
"big.js": "^5.2.2",
"emojis-list": "^3.0.0",
"json5": "^2.1.2"
}
},
"schema-utils": { "schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
} }
@ -11254,12 +11195,12 @@
} }
}, },
"schema-utils": { "schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
} }
@ -11438,12 +11379,12 @@
} }
}, },
"schema-utils": { "schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
} }
@ -11500,9 +11441,9 @@
} }
}, },
"webpack": { "webpack": {
"version": "5.41.1", "version": "5.42.1",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.41.1.tgz", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.42.1.tgz",
"integrity": "sha512-AJZIIsqJ/MVTmegEq9Tlw5mk5EHdGiJbDdz9qP15vmUH+oxI1FdWcL0E9EO8K/zKaRPWqEs7G/OPxq1P61u5Ug==", "integrity": "sha512-msikozzXrG2Hdx+dElq0fyNvxPFsaM2dKLc/l+xkMmhO/1qwVJ9K9gY+fi/49MYWcpSP7alnK5Q78Evrd1LiqQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/eslint-scope": "^3.7.0", "@types/eslint-scope": "^3.7.0",
@ -11510,7 +11451,7 @@
"@webassemblyjs/ast": "1.11.0", "@webassemblyjs/ast": "1.11.0",
"@webassemblyjs/wasm-edit": "1.11.0", "@webassemblyjs/wasm-edit": "1.11.0",
"@webassemblyjs/wasm-parser": "1.11.0", "@webassemblyjs/wasm-parser": "1.11.0",
"acorn": "^8.2.1", "acorn": "^8.4.1",
"browserslist": "^4.14.5", "browserslist": "^4.14.5",
"chrome-trace-event": "^1.0.2", "chrome-trace-event": "^1.0.2",
"enhanced-resolve": "^5.8.0", "enhanced-resolve": "^5.8.0",
@ -11531,31 +11472,15 @@
}, },
"dependencies": { "dependencies": {
"schema-utils": { "schema-utils": {
"version": "3.0.0", "version": "3.1.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==", "integrity": "sha512-tTEaeYkyIhEZ9uWgAjDerWov3T9MgX8dhhy2r0IGeeX4W8ngtGl1++dUve/RUqzuaASSh7shwCDJjEzthxki8w==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/json-schema": "^7.0.6", "@types/json-schema": "^7.0.7",
"ajv": "^6.12.5", "ajv": "^6.12.5",
"ajv-keywords": "^3.5.2" "ajv-keywords": "^3.5.2"
} }
},
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
},
"webpack-sources": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz",
"integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==",
"dev": true,
"requires": {
"source-list-map": "^2.0.1",
"source-map": "^0.6.1"
}
} }
} }
}, },
@ -11599,13 +11524,13 @@
} }
}, },
"webpack-sources": { "webpack-sources": {
"version": "1.4.3", "version": "2.3.0",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.4.3.tgz", "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-2.3.0.tgz",
"integrity": "sha512-lgTS3Xhv1lCOKo7SA5TjKXMjpSM4sBjNV5+q2bqesbSPs5FjGmU6jjtBSkX9b4qW87vDIsCIlUPOEhbZrMdjeQ==", "integrity": "sha512-WyOdtwSvOML1kbgtXbTDnEW0jkJ7hZr/bDByIwszhWd/4XX1A3XMkrbFMsuH4+/MfLlZCUzlAdg4r7jaGKEIgQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"source-list-map": "^2.0.0", "source-list-map": "^2.0.1",
"source-map": "~0.6.1" "source-map": "^0.6.1"
}, },
"dependencies": { "dependencies": {
"source-map": { "source-map": {

View File

@ -7,7 +7,6 @@
"@fortawesome/fontawesome-free": "^5.15.2", "@fortawesome/fontawesome-free": "^5.15.2",
"@types/three": "^0.129.1", "@types/three": "^0.129.1",
"bulma": "^0.9.2", "bulma": "^0.9.2",
"hull.js": "^0.2.11",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"proj4": "^2.6.3", "proj4": "^2.6.3",
@ -30,7 +29,7 @@
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"img-loader": "^4.0.0", "img-loader": "^4.0.0",
"mini-css-extract-plugin": "^1.3.1", "mini-css-extract-plugin": "^2.0.0",
"node-sass": "^6.0.0", "node-sass": "^6.0.0",
"resolve-url-loader": "^4.0.0", "resolve-url-loader": "^4.0.0",
"sass-loader": "^12.1.0", "sass-loader": "^12.1.0",

View File

@ -28,7 +28,7 @@ export class Selection extends Layer {
constructor(parameters, low, high) { constructor(parameters, low, high) {
super(); super();
this.type = 'Selection'; this.type = 'Selection';
this.visible = true; this.visible = false;
this.opacity = 1; this.opacity = 1;
for (var k in parameters) { for (var k in parameters) {
this[k] = parameters[k]; this[k] = parameters[k];
@ -98,6 +98,7 @@ export class Selection extends Layer {
onAdd(map) { onAdd(map) {
this.map = map; this.map = map;
this.build(this.getScene()); this.build(this.getScene());
this.setVisible(this.visible);
this.emit('add'); this.emit('add');
if (this.map.layers) { if (this.map.layers) {

View File

@ -3,6 +3,7 @@ import { Uint16BufferAttribute } from 'three/src/core/BufferAttribute';
import { Vector3 } from 'three/src/math/Vector3'; import { Vector3 } from 'three/src/math/Vector3';
import { Float32BufferAttribute } from 'three/src/core/BufferAttribute'; import { Float32BufferAttribute } from 'three/src/core/BufferAttribute';
import { eventMixin } from '../core/eventMixin'; import { eventMixin } from '../core/eventMixin';
import { Plane } from 'three/src/math/Plane';
class UpdatableBoxGeometry extends BufferGeometry { class UpdatableBoxGeometry extends BufferGeometry {
@ -10,11 +11,14 @@ class UpdatableBoxGeometry extends BufferGeometry {
indexArray: Array<number>; indexArray: Array<number>;
uvs: Array<number>; uvs: Array<number>;
groupStart: number; groupStart: number;
clipPlanes: Array<Plane>;
constructor(vertices: Array<Vector3>) { constructor(vertices: Array<Vector3>) {
// call parent constructor // call parent constructor
super(); super();
this.clipPlanes = [new Plane(new Vector3(0, 1, 0))];
this.type = 'UpdatableBoxGeometry'; this.type = 'UpdatableBoxGeometry';
this.indexArray = new Array(); this.indexArray = new Array();
this.vertices = new Array(); this.vertices = new Array();
@ -23,11 +27,11 @@ class UpdatableBoxGeometry extends BufferGeometry {
// helper variables for material index // helper variables for material index
this.groupStart = 0; this.groupStart = 0;
this.buildPlane(0, vertices[0], vertices[1], vertices[5], vertices[4], 0); //y1 south this.buildPlane(0, vertices[0], vertices[1], vertices[5], vertices[4], 0); //y1 south 0 1 2 3
this.buildPlane(4, vertices[0], vertices[2], vertices[3], vertices[1], 1); //z1 bottom this.buildPlane(4, vertices[0], vertices[2], vertices[3], vertices[1], 1); //z1 bottom 4 5 6 7
this.buildPlane(8, vertices[0], vertices[4], vertices[6], vertices[2], 2); //x1 east this.buildPlane(8, vertices[0], vertices[4], vertices[6], vertices[2], 2); //x1 east 8 9 10 11
this.buildPlane(12, vertices[7], vertices[5], vertices[1], vertices[3], 3); //x2 west this.buildPlane(12, vertices[7], vertices[5], vertices[1], vertices[3], 3); //x2 west 12 13 14 15
this.buildPlane(16, vertices[7], vertices[3], vertices[2], vertices[6], 4); //y2 nort this.buildPlane(16, vertices[7], vertices[3], vertices[2], vertices[6], 4); //y2 nort 15 16 17 18
this.buildPlane(20, vertices[7], vertices[6], vertices[4], vertices[5], 5); //z2 this.buildPlane(20, vertices[7], vertices[6], vertices[4], vertices[5], 5); //z2
this.setFromPoints(this.vertices); this.setFromPoints(this.vertices);
@ -68,8 +72,25 @@ class UpdatableBoxGeometry extends BufferGeometry {
update() { update() {
this.setFromPoints(this.vertices); this.setFromPoints(this.vertices);
this.attributes.position.needsUpdate = true; this.attributes.position.needsUpdate = true;
this.computeBoundingBox();
this.computeBoundingSphere(); this.computeBoundingSphere();
this.dispatchEvent( { type: 'update', message: "example" } ); this.dispatchEvent({ type: 'update', message: "example" } );
}
clippingPlanes() {
const a = this.gVect(0);
const b = this.gVect(1);
const c = this.gVect(2);
this.clipPlanes[0] = new Plane(new Vector3(0, -1, 0), a.y);
// this.clipPlanes[0]= new Plane(new Vector3(-1, 0, 0), a.x);
return this.clipPlanes[0];
}
// grab position from geometry
private gVect(idx) {
return new Vector3().fromBufferAttribute(this.attributes.position, idx);
} }
} }

View File

@ -4,9 +4,11 @@ import { LineBasicMaterial } from 'three/src/materials/LineBasicMaterial';
import { ShaderMaterial } from 'three/src/materials/ShaderMaterial'; import { ShaderMaterial } from 'three/src/materials/ShaderMaterial';
import { uniforms } from "./uniforms"; import { uniforms } from "./uniforms";
import { shader } from './shader'; import { shader } from './shader';
import { DoubleSide, BackSide, FrontSide, EqualStencilFunc, KeepStencilOp, DecrementStencilOp, IncrementStencilOp, InvertStencilOp, GreaterStencilFunc, NeverStencilFunc, LessStencilFunc, LessEqualStencilFunc } from 'three/src/constants'; import { DoubleSide, BackSide, FrontSide, EqualStencilFunc, KeepStencilOp, DecrementStencilOp, IncrementStencilOp, InvertStencilOp } from 'three/src/constants';
import { DecrementWrapStencilOp, IncrementWrapStencilOp } from 'three/src/constants'; import { DecrementWrapStencilOp, IncrementWrapStencilOp } from 'three/src/constants';
import { NotEqualStencilFunc, ReplaceStencilOp, AlwaysStencilFunc } from 'three/src/constants'; import { NotEqualStencilFunc, ReplaceStencilOp, AlwaysStencilFunc } from 'three/src/constants';
import { Vector3 } from 'three/src/math/Vector3';
import { Plane } from 'three/src/math/Plane';
// let profileMaterial = new ShaderMaterial({ // let profileMaterial = new ShaderMaterial({
// // metalness: 0.1, // // metalness: 0.1,
@ -22,34 +24,40 @@ import { NotEqualStencilFunc, ReplaceStencilOp, AlwaysStencilFunc } from 'three/
// vertexShader: shader.vertex, // vertexShader: shader.vertex,
// fragmentShader: shader.fragment // fragmentShader: shader.fragment
// }); // });
// y normal will not clip models on northern hemisphere
// but why not -1 ??
function dummyPlane() {
const normal = new Vector3( 0, 1, 0 );
return new Plane( normal, 0 );
}
let featureMat = new MeshStandardMaterial({
color: 0xC1FF07,
metalness: 0.1,
roughness: 0.75,
flatShading: true,
side: DoubleSide,
// clippingPlanes: [ dummyPlane() ]
});
let profileMaterial = new MeshStandardMaterial( { let profileMaterial = new MeshStandardMaterial( {
color: 0xE91E63, color: 0xE91E63,
metalness: 0.1, metalness: 0.1,
roughness: 0.75, roughness: 0.75,
flatShading: true, flatShading: true,
stencilWrite: true, stencilWrite: true,
stencilRef: 0, // stencilRef: 0,
stencilFunc: NotEqualStencilFunc, stencilFunc: NotEqualStencilFunc,
stencilFail: ReplaceStencilOp, stencilFail: ReplaceStencilOp,
stencilZFail: ReplaceStencilOp, stencilZFail: ReplaceStencilOp,
stencilZPass: ReplaceStencilOp stencilZPass: ReplaceStencilOp,
// stencilFunc: NotEqualStencilFunc, // stencilFunc: NotEqualStencilFunc,
// stencilFail: ReplaceStencilOp, // stencilFail: ReplaceStencilOp,
// stencilZFail: ReplaceStencilOp, // stencilZFail: ReplaceStencilOp,
// stencilZPass: ReplaceStencilOp // stencilZPass: ReplaceStencilOp
} ); } );
let stencilMaterial = new ShaderMaterial({
depthWrite: false,
depthTest: false,
colorWrite: false,
stencilWrite: true,
stencilFunc: AlwaysStencilFunc,
// uniforms: uniforms.clipping,
vertexShader: shader.vertexClipping,
fragmentShader: shader.fragmentClippingFront,
});
let frontStencilMaterial = new ShaderMaterial({ let frontStencilMaterial = new ShaderMaterial({
depthWrite: false, depthWrite: false,
depthTest: false, depthTest: false,
@ -59,6 +67,7 @@ let frontStencilMaterial = new ShaderMaterial({
uniforms: uniforms.clipping, uniforms: uniforms.clipping,
vertexShader: shader.vertexClipping, vertexShader: shader.vertexClipping,
fragmentShader: shader.fragmentClippingFront, fragmentShader: shader.fragmentClippingFront,
// clippingPlanes: [dummyPlane()],
side: FrontSide, side: FrontSide,
// stencilFail: DecrementWrapStencilOp, // stencilFail: DecrementWrapStencilOp,
// stencilZFail: DecrementWrapStencilOp, // stencilZFail: DecrementWrapStencilOp,
@ -77,6 +86,7 @@ let backStencilMaterial = new ShaderMaterial({
uniforms: uniforms.clipping, uniforms: uniforms.clipping,
vertexShader: shader.vertexClipping, vertexShader: shader.vertexClipping,
fragmentShader: shader.fragmentClippingFront, fragmentShader: shader.fragmentClippingFront,
// clippingPlanes: [ dummyPlane() ],
side: BackSide, side: BackSide,
// stencilFail: IncrementWrapStencilOp, // stencilFail: IncrementWrapStencilOp,
// stencilZFail: IncrementWrapStencilOp, // stencilZFail: IncrementWrapStencilOp,
@ -102,21 +112,6 @@ let Invisible = new ShaderMaterial({
side: DoubleSide side: DoubleSide
}); });
// export const profileMat = new MeshStandardMaterial( {
// color: 0xE91E63,
// metalness: 0.1,
// roughness: 0.75,
// flatShading: true,
// stencilWrite: true,
// // stencilRef: 0,
// stencilFunc: NotEqualStencilFunc,
// stencilFail: ReplaceStencilOp,
// stencilZFail: ReplaceStencilOp,
// stencilZPass: ReplaceStencilOp
// } );
function toBack(mat) { function toBack(mat) {
const material = mat.clone(); const material = mat.clone();
material.side = BackSide, material.side = BackSide,
@ -140,7 +135,7 @@ function toFront(mat) {
export { export {
toBack, toBack,
toFront, toFront,
stencilMaterial, featureMat,
profileMaterial, profileMaterial,
frontStencilMaterial, frontStencilMaterial,
backStencilMaterial, backStencilMaterial,

12
src/js/constants.ts Normal file
View File

@ -0,0 +1,12 @@
declare const POINT_URL: string;
declare const EDGE_URL: string;
declare const SERVICE_URL: string;
const _EDGE_URL = EDGE_URL;
const _POINT_URL = POINT_URL;
const _SERVICE_URL = SERVICE_URL;
export {_EDGE_URL as EDGE_URL};
export {_POINT_URL as POINT_URL};
export {_SERVICE_URL as SERVICE_URL};

View File

@ -101,7 +101,7 @@ export class BoreholePopup extends Control {
domEvent.on(this._clearButton, 'click', domEvent.preventDefault); domEvent.on(this._clearButton, 'click', domEvent.preventDefault);
domEvent.on(this._clearButton, 'click', this.close, this);; domEvent.on(this._clearButton, 'click', this.close, this);;
// this._toggleVisibility(false); this._setVisibility(false);
if (!this.options.parentDiv) { if (!this.options.parentDiv) {
return container; return container;

View File

@ -8,6 +8,7 @@ import * as util from './utilities';
import { TinLayer } from '../layer/TinLayer'; import { TinLayer } from '../layer/TinLayer';
import { PerspectiveCamera } from 'three/src/cameras/PerspectiveCamera'; import { PerspectiveCamera } from 'three/src/cameras/PerspectiveCamera';
import { Vector3 } from 'three/src/math/Vector3'; import { Vector3 } from 'three/src/math/Vector3';
import { Group } from 'three';
class Map extends OrbitControls { class Map extends OrbitControls {
@ -27,6 +28,10 @@ class Map extends OrbitControls {
public basemaps: Object; public basemaps: Object;
public baseExtent: Object; public baseExtent: Object;
public currentBasemap; public currentBasemap;
public contact: string;
private _modelNode: Group;
private _stencilNode: Group;
private _profileNode: Group;
constructor(x, y, z, scene, container) { constructor(x, y, z, scene, container) {
@ -57,6 +62,7 @@ class Map extends OrbitControls {
this.size = size; this.size = size;
this.camera = camera; this.camera = camera;
this.container = container; this.container = container;
this.scene = scene;
this.length = x.max - x.min; this.length = x.max - x.min;
this.width = y.max - y.min; this.width = y.max - y.min;
this.height = z.max - z.min; this.height = z.max - z.min;
@ -68,6 +74,12 @@ class Map extends OrbitControls {
x: x, x: x,
y: y y: y
}; };
this._modelNode = new Group();
this._stencilNode = new Group();
this._profileNode = new Group();
this.scene.add(this._modelNode);
this.scene.add(this._stencilNode);
this.scene.add(this._profileNode);
//init the control corners //init the control corners
if (this._initControlPos) { if (this._initControlPos) {
@ -100,9 +112,22 @@ class Map extends OrbitControls {
map._initControls(); map._initControls();
map.title = modelData.model.model_name; map.title = modelData.model.model_name;
map.contact = modelData.model.model_owner;
return map; return map;
} }
get modelNode(): Group {
return this._modelNode;
}
get stencilNode(): Group {
return this._stencilNode;
}
get profileNode(): Group {
return this._profileNode;
}
get layers() { get layers() {
return this._layers; return this._layers;
} }

View File

@ -2,6 +2,7 @@ import { EventEmitter } from '../core/EventEmitter';
import { BoreholePopup } from '../controls/BoreholePopup'; import { BoreholePopup } from '../controls/BoreholePopup';
import { Map } from '../core/Map'; import { Map } from '../core/Map';
import { Scene } from 'three/src/scenes/Scene'; import { Scene } from 'three/src/scenes/Scene';
import { Group } from 'three';
abstract class Layer extends EventEmitter { abstract class Layer extends EventEmitter {
@ -58,6 +59,10 @@ abstract class Layer extends EventEmitter {
return this._map.scene; return this._map.scene;
} }
getModelNode(): Group {
return this._map.scene;
}
// @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this // @method bindPopup(content: String|HTMLElement|Function|Popup, options?: Popup options): this
// Binds a popup to the layer with the passed `content` and sets up the // Binds a popup to the layer with the passed `content` and sets up the
// neccessary event listeners. If a `Function` is passed it will receive // neccessary event listeners. If a `Function` is passed it will receive

View File

@ -6,7 +6,6 @@ import { Layer } from './Layer';
import { BitStream } from '../lib/bitstream'; import { BitStream } from '../lib/bitstream';
import { Vector3 } from 'three/src/math/Vector3'; import { Vector3 } from 'three/src/math/Vector3';
import { MyMeshStandardMaterial } from '../clip/MyMeshStandardMaterial'; import { MyMeshStandardMaterial } from '../clip/MyMeshStandardMaterial';
import { MeshBasicMaterial } from 'three/src/materials/MeshBasicMaterial';
import { Group } from 'three/src/objects/Group'; import { Group } from 'three/src/objects/Group';
import { TextureLoader } from 'three/src/loaders/TextureLoader'; import { TextureLoader } from 'three/src/loaders/TextureLoader';
import proj4 from 'proj4/dist/proj4-src'; import proj4 from 'proj4/dist/proj4-src';
@ -20,22 +19,20 @@ import { uniforms } from '../clip/uniforms';
import { UpdatableBoxGeometry } from '../clip/UpdatableBoxGeometry'; import { UpdatableBoxGeometry } from '../clip/UpdatableBoxGeometry';
import { Scene } from 'three/src/scenes/Scene'; import { Scene } from 'three/src/scenes/Scene';
import * as material from '../clip/material'; import * as material from '../clip/material';
import { POINT_URL, EDGE_URL } from "../constants";
import { Plane } from 'three/src/math/Plane'; import { Plane } from 'three/src/math/Plane';
import { PlaneGeometry } from '../clip/PlaneGeometry'; import { PlaneGeometry } from '../clip/PlaneGeometry';
import { Line3 } from 'three/src/math/Line3'; import { Line3 } from 'three/src/math/Line3';
import { LineBasicMaterial } from 'three/src/materials/LineBasicMaterial'; // import { LineBasicMaterial } from 'three/src/materials/LineBasicMaterial';
import { LineSegments } from 'three/src/objects/LineSegments'; // import { LineSegments } from 'three/src/objects/LineSegments';
import { PointsMaterial } from 'three/src/materials/PointsMaterial'; // import { PointsMaterial } from 'three/src/materials/PointsMaterial';
import { Points } from 'three/src/objects/Points'; // import { Points } from 'three/src/objects/Points';
import { Line } from 'three/src/objects/Line'; // import { Line } from 'three/src/objects/Line';
import hull from 'hull.js/src/hull';
import { Color } from 'three/src/math/Color'; import { Color } from 'three/src/math/Color';
// const POINTURL = 'https://geusegdi01.geus.dk/geom3d/data/nodes/';
// const EDGEURL = 'https://geusegdi01.geus.dk/geom3d/data/triangles/';
const POINTURL = 'https://geusegdi01.geus.dk/geom3d/data/nodes/';
const EDGEURL = 'https://geusegdi01.geus.dk/geom3d/data/triangles/';
export class Point3 extends Vector3 { export class Point3 extends Vector3 {
// public x: number; // public x: number;
@ -128,6 +125,10 @@ class TinLayer extends Layer {
tolerance: number = 0.01; tolerance: number = 0.01;
pointsOfIntersection: BufferGeometry; pointsOfIntersection: BufferGeometry;
borderMaterial; borderMaterial;
xLocalPlane;
yLocalPlane;
pointUrl: string;
edgeUrl: string;
constructor(params) { constructor(params) {
super(); super();
@ -147,6 +148,18 @@ class TinLayer extends Layer {
this.q = true; this.q = true;
this.uniforms = uniforms; this.uniforms = uniforms;
this.borderGroup = new Group(); this.borderGroup = new Group();
this.xLocalPlane = new Plane(new Vector3(-1, 0, 0), 4508490);
this.yLocalPlane = new Plane(new Vector3(0, 1, 0), 2350280);
this.pointUrl = 'https://geusegdi01.geus.dk/geom3d/data/nodes/';
this.edgeUrl = 'https://geusegdi01.geus.dk/geom3d/data/triangles/';
if (POINT_URL != "") {
this.pointUrl = POINT_URL;
}
if (EDGE_URL != "") {
this.edgeUrl = EDGE_URL;
}
} }
buildBorder(vertices) { buildBorder(vertices) {
@ -155,9 +168,7 @@ class TinLayer extends Layer {
let color = parseInt(this.color, 16); let color = parseInt(this.color, 16);
let planeGeom = this.planeGeom = new PlaneGeometry(this.box.vertices[12], this.box.vertices[13], this.box.vertices[14], this.box.vertices[15]);
let planeGeom = new PlaneGeometry(this.box.vertices[0], this.box.vertices[1], this.box.vertices[2], this.box.vertices[3]);
let caps = { let caps = {
// red // red
color: { type: "c", value: new Color(color) } color: { type: "c", value: new Color(color) }
@ -169,10 +180,7 @@ class TinLayer extends Layer {
// this.borderMesh.name = 'stencilFeatureBack_' + this.index; // this.borderMesh.name = 'stencilFeatureBack_' + this.index;
this.borderMesh.name = 'profilePlane_' + this.name; this.borderMesh.name = 'profilePlane_' + this.name;
// this.borderMesh.onAfterRender = this.debugRenderOrder; // this.borderMesh.onAfterRender = this.debugRenderOrder;
let self = this;
// this.boxMesh = new Mesh(box, material.profileMaterial);
// //let planeGeom = this.planeGeom = new PlaneGeometry(vertices[0], vertices[1], vertices[5], vertices[4]); // //let planeGeom = this.planeGeom = new PlaneGeometry(vertices[0], vertices[1], vertices[5], vertices[4]);
@ -224,10 +232,13 @@ class TinLayer extends Layer {
lineCA = new Line3(); lineCA = new Line3();
// let pointOfIntersection = new Vector3(); // let pointOfIntersection = new Vector3();
// box.addEventListener("update", (event) => { box.addEventListener("update", (event) => {
// let ar = new Array(this.box.vertices[0], this.box.vertices[1], this.box.vertices[2], this.box.vertices[3]); let ar = new Array(this.box.vertices[12], this.box.vertices[13], this.box.vertices[14], this.box.vertices[15]);
// this.planeGeom.setFromPoints(ar); this.planeGeom.setFromPoints(ar);
// this.planeGeom.update(); this.planeGeom.update();
self.xLocalPlane.constant = self.box.vertices[12].x;
// this.borderGroup.clear(); // this.borderGroup.clear();
@ -327,24 +338,10 @@ class TinLayer extends Layer {
// }); });
// this.frontStencil = new Scene();
// let frontMesh = new Mesh(this.geometry.clone(), material.frontStencilMaterial);
// frontMesh.userData.layerId = this.index;
// this.frontStencil.add(frontMesh);
// this.backStencil = new Scene();
// let backMesh = new Mesh(this.geometry.clone(), material.backStencilMaterial);
// backMesh.userData.layerId = this.index;
// this.backStencil.add(frontMesh);
// this.capsScene = new Scene();
// this.capsScene.add(this.borderMesh);
} }
debugRenderOrder() {
private debugRenderOrder() {
console.log(this.name); console.log(this.name);
} }
@ -462,35 +459,6 @@ class TinLayer extends Layer {
return index; return index;
} }
// animate() {
// let gl = this._map.renderer.getContext();
// if (gl != undefined && this.capsScene != undefined) {
// gl.enable(gl.STENCIL_TEST);
// // this.renderer.state.setStencilFunc( true );
// // gl.stencilFunc( gl.ALWAYS, 1, 0xff );
// // gl.stencilOp( gl.REPLACE, gl.REPLACE, gl.REPLACE );
// gl.stencilFunc(gl.ALWAYS, 1, 0xff);
// gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);
// this._map.renderer.render(this.backStencil, this._map.camera);
// gl.stencilFunc(gl.ALWAYS, 1, 0xff);
// gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);
// this._map.renderer.render(this.frontStencil, this._map.camera);
// gl.stencilFunc(gl.EQUAL, 1, 0xff);
// gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);
// this._map.renderer.render(this.capsScene, this._map.camera);
// // disable stencil test
// gl.disable(gl.STENCIL_TEST);
// }
// }
setWireframeMode(wireframe) { setWireframeMode(wireframe) {
this.materialsArray.forEach(function (mat) { this.materialsArray.forEach(function (mat) {
//if (m.w) return; //if (m.w) return;
@ -508,14 +476,15 @@ class TinLayer extends Layer {
scaleZ(z) { scaleZ(z) {
this.scale = z; this.scale = z;
this.objectGroup.scale.z = z; // this.objectGroup.scale.z = z;
this.mainMesh.scale.z = z;
this.emit('scale-change', z); this.emit('scale-change', z);
} }
async onAdd(map) { async onAdd(map) {
proj4.defs("EPSG:4312", "+proj=longlat +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +no_defs"); proj4.defs("EPSG:4312", "+proj=longlat +ellps=bessel +towgs84=577.326,90.129,463.919,5.137,1.474,5.297,2.4232 +no_defs");
proj4.defs("EPSG:3034", "+proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"); proj4.defs("EPSG:3034", "+proj=lcc +lat_1=35 +lat_2=65 +lat_0=52 +lon_0=10 +x_0=4000000 +y_0=2800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");
await this.build(this.getScene()); await this.build(this.getModelNode());
map.update(); map.update();
} }
@ -699,7 +668,7 @@ class TinLayer extends Layer {
} }
async build(app_scene) { async build(modelNode) {
let geometry = this.geometry = new BufferGeometry(); let geometry = this.geometry = new BufferGeometry();
let vertices = await (this.points(this.featuregeom_id)); let vertices = await (this.points(this.featuregeom_id));
@ -813,11 +782,23 @@ class TinLayer extends Layer {
flatShading: true, flatShading: true,
side: DoubleSide, side: DoubleSide,
}, this.uniforms.clipping); }, this.uniforms.clipping);
// }, this.uniforms.clipping);
// this.material = new MeshStandardMaterial({
// color: color,
// metalness: 0.1,
// roughness: 0.75,
// flatShading: true,
// side: DoubleSide,
// clippingPlanes: [ this.xLocalPlane ]
// });
} }
this.materialsArray.push(this.material); this.materialsArray.push(this.material);
let mesh = this.mainMesh = new Mesh(geometry, this.material); let mesh = this.mainMesh = new Mesh(geometry, this.material);
mesh.name = this.name;
mesh.userData.layerId = this.index; mesh.userData.layerId = this.index;
mesh.castShadow = true; mesh.castShadow = true;
mesh.receiveShadow = true; mesh.receiveShadow = true;
@ -825,6 +806,9 @@ class TinLayer extends Layer {
// if (app_scene) { // if (app_scene) {
// app_scene.add(this.objectGroup); // app_scene.add(this.objectGroup);
// } // }
if (modelNode) {
modelNode.add(this.mainMesh);
}
} }
private _addObject(object, queryable) { private _addObject(object, queryable) {
@ -845,13 +829,13 @@ class TinLayer extends Layer {
} }
async points(geomId) { async points(geomId) {
const url = POINTURL + geomId; const url = this.pointUrl + geomId;
const buffer = await this._request(url); const buffer = await this._request(url);
return this._unpackVertices(buffer); return this._unpackVertices(buffer);
} }
async edges(geomId) { async edges(geomId) {
const url = EDGEURL + geomId; const url = this.edgeUrl + geomId;
const buffer = await this._request(url); const buffer = await this._request(url);
return this._unpackEdges(buffer); return this._unpackEdges(buffer);
} }

View File

@ -21,8 +21,7 @@ import * as domUtil from './core/domUtil';
import { PickingTool } from './clip/PickingTool'; import { PickingTool } from './clip/PickingTool';
import { ShowModal } from './components/ShowModal'; import { ShowModal } from './components/ShowModal';
import * as material from './clip/material'; import * as material from './clip/material';
import { Group } from 'three/src/objects/Group'; import { Color } from 'three/src/math/Color';
import { Selection } from './clip/Selection'; import { Selection } from './clip/Selection';
import _ from "lodash"; import _ from "lodash";
@ -65,9 +64,9 @@ class Application {
let parentContainer = document.getElementById("app"); let parentContainer = document.getElementById("app");
this.dialog = new ShowModal("Help", parentContainer, { klass: "fm_about" }); this.dialog = new ShowModal("Help", parentContainer, { klass: "fm_about" });
// this.dialog = new MobileDialog("Help", container, { klass: "fm_about" });
this.aboutIcon = document.querySelector('#menu-about-icon'); this.aboutIcon = document.querySelector('#menu-about-icon');
// this.createScene(); this.menuEmailButton = document.querySelector('#menu-email-button');
// this.addEventListeners(); // this.addEventListeners();
} }
async build() { async build() {
@ -94,6 +93,11 @@ class Application {
} }
debugRenderOrder() {
console.log(this.name);
}
async createScene() { async createScene() {
let dirNode = document.getElementsByTagName("body")[0]; let dirNode = document.getElementsByTagName("body")[0];
if (browser.touch == true && browser.mobile == true) { if (browser.touch == true && browser.mobile == true) {
@ -175,91 +179,106 @@ class Application {
// this.camera.position.set(0, -0.1, 150); // this.camera.position.set(0, -0.1, 150);
// this.camera.lookAt(new Vector3(0, 0, 0)); // this.camera.lookAt(new Vector3(0, 0, 0));
const queryString = window.location.search;
const urlParams = new URLSearchParams(queryString);
let modelid = 20;
let serviceUrl = 'https://geusegdi01.geus.dk/meta3d/rpc/model_meta_all?modelid=';
if (urlParams.has('modelid')) {
modelid = urlParams.get('modelid');
}
if (SERVICE_URL != "") {
serviceUrl = SERVICE_URL;
}
let map = this.map = await Map.build( let map = this.map = await Map.build(
this.scene, this.scene,
this.container, this.container,
'https://geusegdi01.geus.dk/meta3d/rpc/model_meta_all?modelid=20' serviceUrl + modelid
); );
this.mapTitle = document.querySelector('#map-title'); this.mapTitle = document.querySelector('#map-title');
this.mapTitle.innerHTML += map.title; this.mapTitle.innerHTML += map.title;
this.menuEmailButton.href = 'mailto:' + map.contact;
map.on('ready', () => { map.on('ready', () => {
this.selectionBox.setUniforms(); this.selectionBox.setUniforms();
// this.capsScene.add(this.selectionBox.boxMesh); // this.capsScene.add(this.selectionBox.boxMesh);
// this.scene.add(this.selection.displayMeshes); // this.scene.add(this.selection.displayMeshes);
// this.scene.add(this.selection.touchMeshes); // this.scene.add(this.selection.touchMeshes);
this.map.addLayer(this.selectionBox);
let modelNode = new Group(); this.map.addLayer(this.selectionBox);
let profileNode = new Group(); // this.selectionBox.toggle();
let stencilNode = new Group();
for (const [i, layer] of Object.entries(this.map.layers)) { for (const [i, layer] of Object.entries(this.map.layers)) {
// let layer = map.layers[i]; // let layer = map.layers[i];
if (layer instanceof TinLayer && layer.name != "Topography") { if (layer instanceof TinLayer && layer.name != "Topography") {
modelNode.add(layer.mainMesh); // modelNode.add(layer.mainMesh);
// this.capsScene.add(layer.borderMesh);
profileNode.add(layer.borderMesh);
// const stencilMaterial = material.stencilMaterial.clone(); // let f_color = parseInt(layer.color, 16);
// let featureMaterial = this.material = new MyMeshStandardMaterial({
// color: f_color,
// metalness: 0.1,
// roughness: 0.75,
// flatShading: true,
// side: DoubleSide,
// }, uniforms.clipping);
// featureMaterial.color = new Color(f_color);
// // featureMaterial.clippingPlanes[0] = layer.xLocalPlane;
let stencilFeatureBack = new Mesh(layer.geometry, material.backStencilMaterial.clone()); // let volume = new Mesh(layer.geometry, featureMaterial);
// // featureMaterial.clippingPlanes[0] = layer.yLocalPlane;
// // featureMaterial.clipIntersection = false;
// volume.name = layer.name + i;
// map.modelNode.add(volume);
// volume.onAfterRender = this.debugRenderOrder;
let backStencilMaterial = material.backStencilMaterial;
let stencilFeatureBack = new Mesh(layer.geometry, backStencilMaterial);
stencilFeatureBack.name = 'stencilFeatureBack_' + i; stencilFeatureBack.name = 'stencilFeatureBack_' + i;
stencilFeatureBack.userData.layerId = layer.index; stencilFeatureBack.userData.layerId = layer.index;
stencilNode.add(stencilFeatureBack); // backStencilMaterial.clippingPlanes[0] = layer.xLocalPlane;
map.stencilNode.add(stencilFeatureBack);
// stencilFeatureBack.onAfterRender = this.debugRenderOrder;
let stencilFeatureFront = new Mesh(layer.geometry, material.frontStencilMaterial.clone());
let frontStencilMaterial = material.frontStencilMaterial;
let stencilFeatureFront = new Mesh(layer.geometry, frontStencilMaterial);
stencilFeatureFront.name = 'stencilFeatureFront_' + i; stencilFeatureFront.name = 'stencilFeatureFront_' + i;
stencilFeatureFront.userData.layerId = layer.index; stencilFeatureFront.userData.layerId = layer.index;
stencilNode.add(stencilFeatureFront); // frontStencilMaterial.clippingPlanes[0] = layer.xLocalPlane;
map.stencilNode.add(stencilFeatureFront);
// stencilFeatureFront.onAfterRender = this.debugRenderOrder;
// this.capsScene.add(layer.borderMesh);
// profileNode.add(layer.borderMesh);
// layer.borderMesh.onAfterRender = this.debugRenderOrder;
let profileMaterial = material.profileMaterial.clone();
let color = parseInt(layer.color, 16);
profileMaterial.color = new Color(color);
// profileMaterial.uniforms = caps;
let borderMesh = new Mesh(layer.box, profileMaterial);
// this.borderMesh.name = 'stencilFeatureBack_' + this.index;
borderMesh.name = 'profilePlane_' + i;
map.profileNode.add(borderMesh);
// borderMesh.onAfterRender = this.debugRenderOrder;
layer.on('visibility-change', (args) => { layer.on('visibility-change', (args) => {
let visible = args[0]; let visible = args[0];
stencilFeatureFront.visible = visible; stencilFeatureFront.visible = visible;
stencilFeatureBack.visible = visible; stencilFeatureBack.visible = visible;
layer.borderMesh.visible = visible; borderMesh.visible = visible;
}); });
layer.on('scale-change', (args) => { layer.on('scale-change', (args) => {
let z = args[0]; let z = args[0];
stencilFeatureFront.scale.z = z; stencilFeatureFront.scale.z = z;
stencilFeatureBack.scale.z = z; stencilFeatureBack.scale.z = z;
layer.borderMesh.scale.z = z; borderMesh.scale.z = z;
}); });
} }
} }
// this.scene.add(profileNode);
// for (var i in map.layers) {
// let layer = map.layers[i];
// if (layer instanceof TinLayer && layer.name != "Topography") {
// let stencilFeatureBack = new Mesh(layer.geometry, material.backStencilMaterial);
// stencilFeatureBack.name = 'stencilFeatureBack_' + i;
// stencilFeatureBack.userData.layerId = layer.index;
// stencilNode.add(stencilFeatureBack);
// let stencilFeatureFront = new Mesh(layer.geometry, material.frontStencilMaterial);
// stencilFeatureFront.name = 'stencilFeatureFront_' + i;
// stencilFeatureFront.userData.layerId = layer.index;
// stencilNode.add(stencilFeatureFront);
// layer.on('visibility-change', (args) => {
// let visible = args[0];
// stencilFeatureFront.visible = visible;
// stencilFeatureBack.visible = visible;
// });
// layer.on('scale-change', (args) => {
// let z = args[0];
// stencilFeatureFront.scale.z = z;
// stencilFeatureBack.scale.z = z;
// });
// }
// }
// scene.add(node('selectNode'));
this.scene.add(modelNode);
this.scene.add(stencilNode);
this.scene.add(profileNode);
this.animate(); this.animate();
}, this); }, this);

View File

@ -136,14 +136,14 @@ export class BoreholeIdentify {
//}; //};
// create a highlight object (if layer type is Point, slightly bigger than the object) // create a highlight object (if layer type is Point, slightly bigger than the object)
var highlightObject = new THREE.Group(); // var highlightObject = new THREE.Group();
//var clone; //var clone;
//var s = (layer.type == Q3D.LayerType.Point) ? 1.01 : 1; //var s = (layer.type == Q3D.LayerType.Point) ? 1.01 : 1;
var geo = new THREE.Geometry(); var geo = new THREE.Geometry();
var v1 = new THREE.Vector3(f.Punkt0.x, f.Punkt0.y, f.Punkt0.z); var v1 = new Vector3(f.Punkt0.x, f.Punkt0.y, f.Punkt0.z);
var v2 = new THREE.Vector3(f.Punkt1.x, f.Punkt1.y, f.Punkt1.z); var v2 = new Vector3(f.Punkt1.x, f.Punkt1.y, f.Punkt1.z);
var v3 = new THREE.Vector3(f.Punkt2.x, f.Punkt2.y, f.Punkt2.z); var v3 = new Vector3(f.Punkt2.x, f.Punkt2.y, f.Punkt2.z);
geo.vertices.push(v1); geo.vertices.push(v1);
geo.vertices.push(v2); geo.vertices.push(v2);
geo.vertices.push(v3); geo.vertices.push(v3);

View File

@ -155,6 +155,10 @@ module.exports = {
CONSTANT_VALUE: JSON.stringify(process.env.CONSTANT_VALUE), CONSTANT_VALUE: JSON.stringify(process.env.CONSTANT_VALUE),
MATOMO_SITE_ID: JSON.stringify(process.env.MATOMO_SITE_ID), MATOMO_SITE_ID: JSON.stringify(process.env.MATOMO_SITE_ID),
MATOMO_TRACKER_URL: JSON.stringify(process.env.MATOMO_TRACKER_URL), MATOMO_TRACKER_URL: JSON.stringify(process.env.MATOMO_TRACKER_URL),
SERVICE_URL : JSON.stringify(process.env.SERVICE_URL),
POINT_URL : JSON.stringify(process.env.POINT_URL),
EDGE_URL : JSON.stringify(process.env.EDGE_URL),
CUSTOM_VAR: JSON.stringify('value5 goes here'), // no quotes needed, string value CUSTOM_VAR: JSON.stringify('value5 goes here'), // no quotes needed, string value
}), }),
// extractLess, // extractLess,