- uninstall less-loader

- trial: local clipping planes for DemLayer and TinLayer via material parameter
- start with selcetion boxes for interactive clipping: SelectionBoxFace.js
- main.js: this.renderer.localClippingEnabled = true;
This commit is contained in:
Arno Kaimbacher 2021-02-11 15:33:05 +01:00
parent 293b22c28b
commit 8b4ace6763
8 changed files with 176 additions and 475 deletions

View File

@ -50,7 +50,8 @@
</a> </a>
<div class="row"> <div class="row">
<div class="logo two columns"> <div class="logo two columns">
<a class="navbar-brand" href="http://www.europe-geology.eu/onshore-geology/geological-map/" target="_blank"> <a class="navbar-brand" href="http://www.europe-geology.eu/onshore-geology/geological-map/"
target="_blank">
<img src="images/egdi_logo.svg" height="51"> <img src="images/egdi_logo.svg" height="51">
</a> </a>
</div> </div>
@ -121,6 +122,13 @@
<a class="button button-primary" type="submit" id="btnDownloadCanvasImage" <a class="button button-primary" type="submit" id="btnDownloadCanvasImage"
download="file.png">Download</a> download="file.png">Download</a>
<div class="panel-section section-view">
<div class="feature-wrapper feature-slicer inline-block">
<div id="slicer-control"></div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>

443
package-lock.json generated
View File

@ -25,7 +25,6 @@
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"img-loader": "^3.0.2", "img-loader": "^3.0.2",
"less-loader": "^7.1.0",
"mini-css-extract-plugin": "^1.3.1", "mini-css-extract-plugin": "^1.3.1",
"node-sass": "^5.0.0", "node-sass": "^5.0.0",
"resolve-url-loader": "^3.1.2", "resolve-url-loader": "^3.1.2",
@ -2093,16 +2092,6 @@
"safe-buffer": "~5.1.1" "safe-buffer": "~5.1.1"
} }
}, },
"node_modules/copy-anything": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz",
"integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==",
"dev": true,
"peer": true,
"dependencies": {
"is-what": "^3.12.0"
}
},
"node_modules/core-js-compat": { "node_modules/core-js-compat": {
"version": "3.8.3", "version": "3.8.3",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.3.tgz", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.3.tgz",
@ -2464,20 +2453,6 @@
"node": ">=4" "node": ">=4"
} }
}, },
"node_modules/errno": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"prr": "~1.0.1"
},
"bin": {
"errno": "cli.js"
}
},
"node_modules/error-ex": { "node_modules/error-ex": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@ -3193,20 +3168,6 @@
"node": ">=10.17.0" "node": ">=10.17.0"
} }
}, },
"node_modules/iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"safer-buffer": ">= 2.1.2 < 3"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/icss-utils": { "node_modules/icss-utils": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
@ -3229,20 +3190,6 @@
"node": ">= 4" "node": ">= 4"
} }
}, },
"node_modules/image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"image-size": "bin/image-size.js"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/imagemin": { "node_modules/imagemin": {
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.1.tgz", "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.1.tgz",
@ -3438,13 +3385,6 @@
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true "dev": true
}, },
"node_modules/is-what": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.12.0.tgz",
"integrity": "sha512-2ilQz5/f/o9V7WRWJQmpFYNmQFZ9iM+OXRonZKcYgTkCzjb949Vi4h282PD1UfmgHk666rcWonbRJ++KI41VGw==",
"dev": true,
"peer": true
},
"node_modules/isarray": { "node_modules/isarray": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@ -3619,131 +3559,6 @@
"node": ">= 8" "node": ">= 8"
} }
}, },
"node_modules/less": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/less/-/less-4.1.1.tgz",
"integrity": "sha512-w09o8tZFPThBscl5d0Ggp3RcrKIouBoQscnOMgFH3n5V3kN/CXGHNfCkRPtxJk6nKryDXaV9aHLK55RXuH4sAw==",
"dev": true,
"peer": true,
"dependencies": {
"copy-anything": "^2.0.1",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"needle": "^2.5.2",
"parse-node-version": "^1.0.1",
"source-map": "~0.6.0",
"tslib": "^1.10.0"
},
"bin": {
"lessc": "bin/lessc"
},
"engines": {
"node": ">=6"
},
"optionalDependencies": {
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"needle": "^2.5.2",
"source-map": "~0.6.0"
}
},
"node_modules/less-loader": {
"version": "7.3.0",
"resolved": "https://registry.npmjs.org/less-loader/-/less-loader-7.3.0.tgz",
"integrity": "sha512-Mi8915g7NMaLlgi77mgTTQvK022xKRQBIVDSyfl3ErTuBhmZBQab0mjeJjNNqGbdR+qrfTleKXqbGI4uEFavxg==",
"dev": true,
"dependencies": {
"klona": "^2.0.4",
"loader-utils": "^2.0.0",
"schema-utils": "^3.0.0"
},
"engines": {
"node": ">= 10.13.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
},
"peerDependencies": {
"less": "^3.5.0 || ^4.0.0",
"webpack": "^4.0.0 || ^5.0.0"
}
},
"node_modules/less-loader/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/less-loader/node_modules/schema-utils": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==",
"dev": true,
"dependencies": {
"@types/json-schema": "^7.0.6",
"ajv": "^6.12.5",
"ajv-keywords": "^3.5.2"
},
"engines": {
"node": ">= 10.13.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/webpack"
}
},
"node_modules/less/node_modules/make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"pify": "^4.0.1",
"semver": "^5.6.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/less/node_modules/pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
"optional": true,
"peer": true,
"engines": {
"node": ">=6"
}
},
"node_modules/less/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,
"optional": true,
"peer": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/load-json-file": { "node_modules/load-json-file": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
@ -3948,20 +3763,6 @@
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"mime": "cli.js"
},
"engines": {
"node": ">=4"
}
},
"node_modules/mime-db": { "node_modules/mime-db": {
"version": "1.45.0", "version": "1.45.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
@ -4124,36 +3925,6 @@
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
} }
}, },
"node_modules/needle": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz",
"integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"debug": "^3.2.6",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
},
"bin": {
"needle": "bin/needle"
},
"engines": {
"node": ">= 4.4.x"
}
},
"node_modules/needle/node_modules/debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"ms": "^2.1.1"
}
},
"node_modules/neo-async": { "node_modules/neo-async": {
"version": "2.6.2", "version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
@ -4493,16 +4264,6 @@
"node": ">=4" "node": ">=4"
} }
}, },
"node_modules/parse-node-version": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"peer": true,
"engines": {
"node": ">= 0.10"
}
},
"node_modules/path-exists": { "node_modules/path-exists": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@ -4729,14 +4490,6 @@
"wkt-parser": "^1.2.4" "wkt-parser": "^1.2.4"
} }
}, },
"node_modules/prr": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
"dev": true,
"optional": true,
"peer": true
},
"node_modules/psl": { "node_modules/psl": {
"version": "1.8.0", "version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
@ -5334,14 +5087,6 @@
} }
} }
}, },
"node_modules/sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true,
"optional": true,
"peer": true
},
"node_modules/schema-utils": { "node_modules/schema-utils": {
"version": "2.7.1", "version": "2.7.1",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz",
@ -8211,16 +7956,6 @@
"safe-buffer": "~5.1.1" "safe-buffer": "~5.1.1"
} }
}, },
"copy-anything": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.3.tgz",
"integrity": "sha512-GK6QUtisv4fNS+XcI7shX0Gx9ORg7QqIznyfho79JTnX1XhLiyZHfftvGiziqzRiEi/Bjhgpi+D2o7HxJFPnDQ==",
"dev": true,
"peer": true,
"requires": {
"is-what": "^3.12.0"
}
},
"core-js-compat": { "core-js-compat": {
"version": "3.8.3", "version": "3.8.3",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.3.tgz", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.8.3.tgz",
@ -8486,17 +8221,6 @@
"integrity": "sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ==", "integrity": "sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ==",
"dev": true "dev": true
}, },
"errno": {
"version": "0.1.8",
"resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz",
"integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"prr": "~1.0.1"
}
},
"error-ex": { "error-ex": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
@ -9059,17 +8783,6 @@
"integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==",
"dev": true "dev": true
}, },
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"icss-utils": { "icss-utils": {
"version": "5.1.0", "version": "5.1.0",
"resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
@ -9084,14 +8797,6 @@
"dev": true, "dev": true,
"peer": true "peer": true
}, },
"image-size": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz",
"integrity": "sha1-Cd/Uq50g4p6xw+gLiZA3jfnjy5w=",
"dev": true,
"optional": true,
"peer": true
},
"imagemin": { "imagemin": {
"version": "7.0.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.1.tgz", "resolved": "https://registry.npmjs.org/imagemin/-/imagemin-7.0.1.tgz",
@ -9242,13 +8947,6 @@
"integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=",
"dev": true "dev": true
}, },
"is-what": {
"version": "3.12.0",
"resolved": "https://registry.npmjs.org/is-what/-/is-what-3.12.0.tgz",
"integrity": "sha512-2ilQz5/f/o9V7WRWJQmpFYNmQFZ9iM+OXRonZKcYgTkCzjb949Vi4h282PD1UfmgHk666rcWonbRJ++KI41VGw==",
"dev": true,
"peer": true
},
"isarray": { "isarray": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@ -9389,90 +9087,6 @@
"integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==", "integrity": "sha512-ZRbnvdg/NxqzC7L9Uyqzf4psi1OM4Cuc+sJAkQPjO6XkQIJTNbfK2Rsmbw8fx1p2mkZdp2FZYo2+LwXYY/uwIA==",
"dev": true "dev": true
}, },
"less": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/less/-/less-4.1.1.tgz",
"integrity": "sha512-w09o8tZFPThBscl5d0Ggp3RcrKIouBoQscnOMgFH3n5V3kN/CXGHNfCkRPtxJk6nKryDXaV9aHLK55RXuH4sAw==",
"dev": true,
"peer": true,
"requires": {
"copy-anything": "^2.0.1",
"errno": "^0.1.1",
"graceful-fs": "^4.1.2",
"image-size": "~0.5.0",
"make-dir": "^2.1.0",
"mime": "^1.4.1",
"needle": "^2.5.2",
"parse-node-version": "^1.0.1",
"source-map": "~0.6.0",
"tslib": "^1.10.0"
},
"dependencies": {
"make-dir": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
"integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"pify": "^4.0.1",
"semver": "^5.6.0"
}
},
"pify": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
"integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
"dev": true,
"optional": true,
"peer": true
},
"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,
"optional": true,
"peer": true
}
}
},
"less-loader": {
"version": "7.3.0",
"resolved": "https://registry.npmjs.org/less-loader/-/less-loader-7.3.0.tgz",
"integrity": "sha512-Mi8915g7NMaLlgi77mgTTQvK022xKRQBIVDSyfl3ErTuBhmZBQab0mjeJjNNqGbdR+qrfTleKXqbGI4uEFavxg==",
"dev": true,
"requires": {
"klona": "^2.0.4",
"loader-utils": "^2.0.0",
"schema-utils": "^3.0.0"
},
"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": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.0.0.tgz",
"integrity": "sha512-6D82/xSzO094ajanoOSbe4YvXWMfn2A//8Y1+MUqFAJul5Bs+yn36xbK9OtNDcRVSBJ9jjeoXftM6CfztsjOAA==",
"dev": true,
"requires": {
"@types/json-schema": "^7.0.6",
"ajv": "^6.12.5",
"ajv-keywords": "^3.5.2"
}
}
}
},
"load-json-file": { "load-json-file": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz",
@ -9635,14 +9249,6 @@
"picomatch": "^2.0.5" "picomatch": "^2.0.5"
} }
}, },
"mime": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz",
"integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==",
"dev": true,
"optional": true,
"peer": true
},
"mime-db": { "mime-db": {
"version": "1.45.0", "version": "1.45.0",
"resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.45.0.tgz",
@ -9760,32 +9366,6 @@
"integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==", "integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw==",
"dev": true "dev": true
}, },
"needle": {
"version": "2.6.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz",
"integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"debug": "^3.2.6",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
},
"dependencies": {
"debug": {
"version": "3.2.7",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
"integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"ms": "^2.1.1"
}
}
}
},
"neo-async": { "neo-async": {
"version": "2.6.2", "version": "2.6.2",
"resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz",
@ -10041,13 +9621,6 @@
"json-parse-better-errors": "^1.0.1" "json-parse-better-errors": "^1.0.1"
} }
}, },
"parse-node-version": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz",
"integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==",
"dev": true,
"peer": true
},
"path-exists": { "path-exists": {
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
@ -10210,14 +9783,6 @@
"wkt-parser": "^1.2.4" "wkt-parser": "^1.2.4"
} }
}, },
"prr": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz",
"integrity": "sha1-0/wRS6BplaRexok/SEzrHXj19HY=",
"dev": true,
"optional": true,
"peer": true
},
"psl": { "psl": {
"version": "1.8.0", "version": "1.8.0",
"resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz",
@ -10677,14 +10242,6 @@
"neo-async": "^2.6.2" "neo-async": "^2.6.2"
} }
}, },
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
"integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==",
"dev": true,
"optional": true,
"peer": true
},
"schema-utils": { "schema-utils": {
"version": "2.7.1", "version": "2.7.1",
"resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz",

View File

@ -22,7 +22,6 @@
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"file-loader": "^6.2.0", "file-loader": "^6.2.0",
"img-loader": "^3.0.2", "img-loader": "^3.0.2",
"less-loader": "^7.1.0",
"mini-css-extract-plugin": "^1.3.1", "mini-css-extract-plugin": "^1.3.1",
"node-sass": "^5.0.0", "node-sass": "^5.0.0",
"resolve-url-loader": "^3.1.2", "resolve-url-loader": "^3.1.2",

View File

@ -0,0 +1,42 @@
import { Mesh } from 'three/src/objects/Mesh';
export class SelectionBoxFace {
constructor(axis, v0, v1, v2, v3, selection) {
let frontFaceGeometry = new PlaneGeometry(v0, v1, v2, v3);
frontFaceGeometry.dynamic = true;
selection.meshGeometries.push(frontFaceGeometry);
let frontFaceMesh = new Mesh(frontFaceGeometry, MATERIAL.Invisible);
frontFaceMesh.axis = axis;
frontFaceMesh.guardian = this;
selection.touchMeshes.add(frontFaceMesh);
selection.selectables.push(frontFaceMesh);
let backFaceGeometry = new PlaneGeometry(v3, v2, v1, v0);
backFaceGeometry.dynamic = true;
selection.meshGeometries.push(backFaceGeometry);
let backFaceMesh = new Mesh(backFaceGeometry, MATERIAL.BoxBackFace);
selection.displayMeshes.add(backFaceMesh);
this.lines = new Array();
}
rayOver() {
this.highlightLines(true);
}
rayOut() {
this.highlightLines(false);
}
highlightLines(b) {
for (let i = 0; i < this.lines.length; i++) {
this.lines[i].setHighlight(b);
}
}
}

View File

@ -0,0 +1,77 @@
import { Control } from "./Control";
import * as dom from '../core/domUtil';
import * as util from '../core/utilities';
import * as domEvent from '../core/domEvent';
export class SlicerControl extends Control {
options = {
position: 'topright'
};
map;
constructor(options) {
super(options);
util.setOptions(this, options);
}
onAdd(map) {
this.map = map;
let className = "gba-controllayers";
let container;
let toggleable = false;
if (this.options.parentDiv) {
container = this._container = document.getElementById(this.options.parentDiv);
dom.addClass(container, className);
toggleable = false;
} else {
container = this._container = dom.createDom("div", { "class": className });
toggleable = true;
}
this._initLayout(container);
if (!this.options.parentDiv) {
return container;
}
}
_initLayout(container) {
this._slicerMenu = dom.createDom('div', { id: "range-slider", "class": 'gba-slicer-menu' }, container);
dom.createDom("span", { innerHTML: "SLICER", "class": "gbaLegendServiceLabel" }, this._slicerMenu);
let table = dom.createDom('table', { width: "95%" }, this._slicerMenu);
let tblBody = dom.createDom("tbody", {}, table);
let sliderValue1 = Math.round(this.map.width / 2);
let row = dom.createDom("tr", {}, tblBody);
let leftTd = dom.createDom("td", { align: "left", style: "width:20px;" }, row);
dom.createDom("span", { innerHTML: "x", }, leftTd);
let rightTd = dom.createDom("td", { align: "left" }, row);
// this.slider = new RangeSlider({
// orientation: "vertical",
// value: sliderValue1,
// max: this.map.x.max,
// min: this.map.x.min,
// id: "slider1"
// });
// this.slider.addTo(rightTd);
let btnSlice = dom.createDom("span", { innerHTML: "slice", class: "button button-primary" }, rightTd);
domEvent.on(btnSlice, 'mousedown', domEvent.stopPropagation);
domEvent.on(btnSlice, 'click', domEvent.stopPropagation);
domEvent.on(btnSlice, 'dblclick', domEvent.stopPropagation);
domEvent.on(btnSlice, 'mousedown', domEvent.preventDefault);
domEvent.on(btnSlice, 'mousedown', this._slice, this);
}
_slice() {
let x = 4471470;
this.map.currentBasemap.filterMaterial(x, this.map.y.max);
this.map.layers[16].filterMaterial(x, this.map.y.max);
this.map.update();
}
}

View File

@ -11,7 +11,8 @@ import { DoubleSide, FlatShading, LinearFilter } from 'three/src/constants';
import * as browser from '../core/browser'; import * as browser from '../core/browser';
import { Texture } from 'three/src/textures/Texture'; import { Texture } from 'three/src/textures/Texture';
import { TextureLoader } from 'three/src/loaders/TextureLoader'; import { TextureLoader } from 'three/src/loaders/TextureLoader';
import { Plane } from 'three/src/math/Plane';
import { Vector3 } from 'three/src/math/Vector3';
export class DemLayer extends Layer { export class DemLayer extends Layer {
images = [{ images = [{
@ -59,9 +60,9 @@ export class DemLayer extends Layer {
async initMaterials() { async initMaterials() {
if (this.materialParameter.length === 0) return; if (this.materialParameter.length === 0) return;
// this.xLocalPlane = new THREE.Plane(new THREE.Vector3(-1, 0, 0), 50); this.xLocalPlane = new Plane(new Vector3(-1, 0, 0), this._map.x.max);
// //this.addObject(this.xLocalPlane, false); //this.addObject(this.xLocalPlane, false);
// this.yLocalPlane = new THREE.Plane(new THREE.Vector3(0, 1, 0), 39); this.yLocalPlane = new Plane(new Vector3(0, 1, 0), this._map.y.max);
let sum_opacity = 0; let sum_opacity = 0;
this.material; this.material;
@ -96,10 +97,10 @@ export class DemLayer extends Layer {
if (m.w) opt.wireframe = true; if (m.w) opt.wireframe = true;
//opt.wireframe = true; //opt.wireframe = true;
// // Clipping setup: // Clipping setup:
// opt.clippingPlanes = [this.xLocalPlane, this.yLocalPlane]; opt.clippingPlanes = [this.xLocalPlane, this.yLocalPlane];
// opt.clipIntersection = false; opt.clipIntersection = false;
// opt.clipShadows = true; opt.clipShadows = true;
let MaterialType = { MeshLambert: 0, MeshPhong: 1, LineBasic: 2, Sprite: 3, Unknown: -1 }; let MaterialType = { MeshLambert: 0, MeshPhong: 1, LineBasic: 2, Sprite: 3, Unknown: -1 };
@ -134,6 +135,12 @@ export class DemLayer extends Layer {
this.opacity = sum_opacity / this.materials.length; this.opacity = sum_opacity / this.materials.length;
} }
filterMaterial(filterX, filterY) {
this.xLocalPlane.constant = filterX;
this.yLocalPlane.constant = filterY;
}
scaleZ(z) { scaleZ(z) {
// this.mainMesh.scale.z = z; // this.mainMesh.scale.z = z;
this.objectGroup.scale.z = z; this.objectGroup.scale.z = z;

View File

@ -6,6 +6,8 @@ import { DoubleSide } from 'three/src/constants';
import { Mesh } from 'three/src/objects/Mesh'; import { Mesh } from 'three/src/objects/Mesh';
import { Layer } from './Layer'; import { Layer } from './Layer';
import { BitStream } from '../lib/bitstream'; import { BitStream } from '../lib/bitstream';
import { Plane } from 'three/src/math/Plane';
import { Vector3 } from 'three/src/math/Vector3';
const POINTURL = 'https://geusegdi01.geus.dk/geom3d/data/nodes/'; const POINTURL = 'https://geusegdi01.geus.dk/geom3d/data/nodes/';
const EDGEURL = 'https://geusegdi01.geus.dk/geom3d/data/triangles/'; const EDGEURL = 'https://geusegdi01.geus.dk/geom3d/data/triangles/';
@ -78,13 +80,20 @@ class TinLayer extends Layer {
geometry.computeVertexNormals();// computed vertex normals are orthogonal to the face f geometry.computeVertexNormals();// computed vertex normals are orthogonal to the face f
geometry.computeBoundingBox(); geometry.computeBoundingBox();
this.xLocalPlane = new Plane(new Vector3(-1, 0, 0), this._map.x.max);
//this.addObject(this.xLocalPlane, false);
this.yLocalPlane = new Plane(new Vector3(0, 1, 0), this._map.y.max);
let color = parseInt(this.color, 16); let color = parseInt(this.color, 16);
this.material = new MeshStandardMaterial({ this.material = new MeshStandardMaterial({
color: color, color: color,
metalness: 0.1, metalness: 0.1,
roughness: 0.75, roughness: 0.75,
flatShading: true, flatShading: true,
side: DoubleSide side: DoubleSide,
clippingPlanes: [this.xLocalPlane, this.yLocalPlane],
clipIntersection: false,
clipShadows: true,
}); });
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);
@ -96,6 +105,11 @@ class TinLayer extends Layer {
} }
} }
filterMaterial(filterX, filterY) {
this.xLocalPlane.constant = filterX;
this.yLocalPlane.constant = filterY;
}
async points(geomId) { async points(geomId) {
const url = POINTURL + geomId; const url = POINTURL + geomId;

View File

@ -14,6 +14,7 @@ import { NorthArrow } from './controls/NorthArrow';
import { LayerControl } from './controls/LayerControl'; import { LayerControl } from './controls/LayerControl';
import { BasemapControl } from './controls/BasemapControl'; import { BasemapControl } from './controls/BasemapControl';
import { SliderControl } from './controls/SliderControl'; import { SliderControl } from './controls/SliderControl';
// import { SlicerControl } from './controls/SlicerControl';
import { Mesh } from 'three/src/objects/Mesh'; import { Mesh } from 'three/src/objects/Mesh';
import { SphereGeometry } from 'three/src/geometries/SphereGeometry'; import { SphereGeometry } from 'three/src/geometries/SphereGeometry';
import { MeshLambertMaterial } from 'three/src/materials/MeshLambertMaterial'; import { MeshLambertMaterial } from 'three/src/materials/MeshLambertMaterial';
@ -88,22 +89,17 @@ class Application {
// let bgcolor = 0xfdfdfd; // let bgcolor = 0xfdfdfd;
this.renderer = new WebGLRenderer({ alpha: true, antialias: true, preserveDrawingBuffer: true }); this.renderer = new WebGLRenderer({ alpha: true, antialias: true, preserveDrawingBuffer: true });
this.renderer.setPixelRatio(window.devicePixelRatio); this.renderer.setPixelRatio(window.devicePixelRatio);
// this.renderer.setSize(window.innerWidth, window.innerHeight);
// document.body.appendChild(this.renderer.domElement);
this.renderer.setSize(this.width, this.height); this.renderer.setSize(this.width, this.height);
//this.renderer.setClearColor(bgcolor, 1); // second param is opacity, 0 => transparent this.renderer.setClearColor(0x000000, 0.0); // second param is opacity, 0 => transparent
this.renderer.setClearColor(0x000000, 0.0);
// enable clipping
// let Empty = Object.freeze([]); // let Empty = Object.freeze([]);
// this.renderer.clippingPlanes = Empty; // GUI sets it to globalPlanes // this.renderer.clippingPlanes = Empty; // GUI sets it to globalPlanes
// this.renderer.localClippingEnabled = true; this.renderer.localClippingEnabled = true;
this.container.appendChild(this.renderer.domElement); this.container.appendChild(this.renderer.domElement);
/* Scene: that will hold all our elements such as objects, cameras and lights. */ /* Scene: that will hold all our elements such as objects, cameras and lights. */
this.scene = new Scene(); this.scene = new Scene();
//app.scene.add(new THREE.AmbientLight(0xeeeeee));
// const ambient = new AmbientLight( 0xffffff, 0.5 );
// this.scene.add(ambient);
this._buildDefaultLights(this.scene); this._buildDefaultLights(this.scene);
//app.scene.autoUpdate = false; //app.scene.autoUpdate = false;
//// show axes in the screen //// show axes in the screen
@ -167,8 +163,6 @@ class Application {
let map = this.map = await Map.build(x, y, z, center, this.camera, this.scene, this.container, 'https://geusegdi01.geus.dk/meta3d/rpc/model_meta_all?modelid=20'); let map = this.map = await Map.build(x, y, z, center, this.camera, this.scene, this.container, 'https://geusegdi01.geus.dk/meta3d/rpc/model_meta_all?modelid=20');
this.mapTitle = document.querySelector('#map-title'); this.mapTitle = document.querySelector('#map-title');
this.mapTitle.innerHTML += map.title; this.mapTitle.innerHTML += map.title;
// this.map.minDistance = size*0.75;
// this.map.maxDistance = size*15;
// let boxLayer = new BoxLayer({ // let boxLayer = new BoxLayer({
// width: 10000, height: 10000, depth: 10000, name: 'center-box', color: 800080 , center: center // width: 10000, height: 10000, depth: 10000, name: 'center-box', color: 800080 , center: center
@ -229,6 +223,9 @@ class Application {
//slider for scaling z value //slider for scaling z value
this.slider = new SliderControl({ layers: this.map.layers }).addTo(this.map); this.slider = new SliderControl({ layers: this.map.layers }).addTo(this.map);
//slice on x and y axes:
// this.slicer = new SlicerControl({ parentDiv: 'slicer-control' }).addTo(this.map);
// domEvent.on(window, 'resize', this.onWindowResize, this); // domEvent.on(window, 'resize', this.onWindowResize, this);
// domEvent.on(window, 'keydown', this.keydown, this); // domEvent.on(window, 'keydown', this.keydown, this);
this.start(); this.start();