- webpack optimization

This commit is contained in:
Arno Kaimbacher 2021-09-01 13:04:48 +02:00
parent ab478504c9
commit 069f972c6b
4 changed files with 153 additions and 116 deletions

View File

@ -223,8 +223,8 @@
</div> </div>
</section> </section>
<script src="dist/runtime.js"></script>
<script src="dist/vendors.js"></script>
<script src="dist/main.js"></script> <script src="dist/main.js"></script>
</body> </body>

197
package-lock.json generated
View File

@ -1770,9 +1770,9 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "16.7.1", "version": "16.7.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.1.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.10.tgz",
"integrity": "sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A==", "integrity": "sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA==",
"dev": true "dev": true
}, },
"node_modules/@types/normalize-package-data": { "node_modules/@types/normalize-package-data": {
@ -2363,9 +2363,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001251", "version": "1.0.30001252",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz",
"integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", "integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==",
"dev": true, "dev": true,
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
@ -2663,12 +2663,12 @@
} }
}, },
"node_modules/core-js-compat": { "node_modules/core-js-compat": {
"version": "3.16.2", "version": "3.16.4",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.2.tgz", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.4.tgz",
"integrity": "sha512-4lUshXtBXsdmp8cDWh6KKiHUg40AjiuPD3bOWkNVsr1xkAhpUqCjaZ8lB1bKx9Gb5fXcbRbFJ4f4qpRIRTuJqQ==", "integrity": "sha512-IzCSomxRdahCYb6G3HiN6pl3JCiM0NMunRcNa1pIeC7g17Vd6Ue3AT9anQiENPIm/svThUVer1pIbLMDERIsFw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"browserslist": "^4.16.7", "browserslist": "^4.16.8",
"semver": "7.0.0" "semver": "7.0.0"
}, },
"funding": { "funding": {
@ -2686,9 +2686,9 @@
} }
}, },
"node_modules/core-util-is": { "node_modules/core-util-is": {
"version": "1.0.2", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"dev": true "dev": true
}, },
"node_modules/cross-spawn": { "node_modules/cross-spawn": {
@ -2891,9 +2891,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.3.814", "version": "1.3.826",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.814.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.826.tgz",
"integrity": "sha512-0mH03cyjh6OzMlmjauGg0TLd87ErIJqWiYxMcOLKf5w6p0YEOl7DJAj7BDlXEFmCguY5CQaKVOiMjAMODO2XDw==", "integrity": "sha512-bpLc4QU4B8PYmdO4MSu2ZBTMD8lAaEXRS43C09lB31BvYwuk9UxgBRXbY5OJBw7VuMGcg2MZG5FyTaP9u4PQnw==",
"dev": true "dev": true
}, },
"node_modules/emoji-regex": { "node_modules/emoji-regex": {
@ -3206,9 +3206,9 @@
} }
}, },
"node_modules/find-cache-dir": { "node_modules/find-cache-dir": {
"version": "3.3.1", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
"integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"commondir": "^1.0.1", "commondir": "^1.0.1",
@ -3421,9 +3421,9 @@
} }
}, },
"node_modules/globby": { "node_modules/globby": {
"version": "12.0.1", "version": "12.0.2",
"resolved": "https://registry.npmjs.org/globby/-/globby-12.0.1.tgz", "resolved": "https://registry.npmjs.org/globby/-/globby-12.0.2.tgz",
"integrity": "sha512-AofdCGi+crQ1uN9+nMbTnvC4XGNPJN9hRiPf+A76lUZIZoWoj4Z9iyUQGge7xCGKgR/7ejB36qoIlLoDBc7fYw==", "integrity": "sha512-lAsmb/5Lww4r7MM9nCCliDZVIKbZTavrsunAsHLr9oHthrZP1qi7/gAnHOsUs9bLvEt2vKVJhHmxuL7QbDuPdQ==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"dependencies": { "dependencies": {
@ -3850,9 +3850,9 @@
"dev": true "dev": true
}, },
"node_modules/jest-worker": { "node_modules/jest-worker": {
"version": "27.0.6", "version": "27.1.0",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.1.0.tgz",
"integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", "integrity": "sha512-mO4PHb2QWLn9yRXGp7rkvXLAYuxwhq1ZYUo0LoDhg8wqvv4QizP1ZWEJOeolgbEgAWZLIEU0wsku8J+lGWfBhg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"@types/node": "*", "@types/node": "*",
@ -4209,9 +4209,9 @@
} }
}, },
"node_modules/mini-css-extract-plugin": { "node_modules/mini-css-extract-plugin": {
"version": "2.2.0", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.2.0.tgz", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.2.1.tgz",
"integrity": "sha512-91HeVHbq7PUJ4TwOuMTlFWfVWrLqf3SF0PlEDPV+wtgsfxrMebN9LLzflyQqdKLp4/H3PexRB1WLKsCqpWKkxQ==", "integrity": "sha512-A0GBXpz8WIPgh2HfASJ0EeY8grd2dGxmC4R8uTujFJXZY7zFy0nvYSYW6SKCLKlz7y45BdHONfaxZQMIZpeF/w==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"schema-utils": "^3.1.0" "schema-utils": "^3.1.0"
@ -5950,9 +5950,9 @@
} }
}, },
"node_modules/tar": { "node_modules/tar": {
"version": "6.1.10", "version": "6.1.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.10.tgz", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
"integrity": "sha512-kvvfiVvjGMxeUNB6MyYv5z7vhfFRwbwCXJAeL0/lnbrttBVqcMOnpHUf0X42LrPMR8mMpgapkJMchFH4FSHzNA==", "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"chownr": "^2.0.0", "chownr": "^2.0.0",
@ -5967,9 +5967,9 @@
} }
}, },
"node_modules/terser": { "node_modules/terser": {
"version": "5.7.1", "version": "5.7.2",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.2.tgz",
"integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", "integrity": "sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"commander": "^2.20.0", "commander": "^2.20.0",
@ -5984,17 +5984,17 @@
} }
}, },
"node_modules/terser-webpack-plugin": { "node_modules/terser-webpack-plugin": {
"version": "5.1.4", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.0.tgz",
"integrity": "sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA==", "integrity": "sha512-FpR4Qe0Yt4knSQ5u2bA1wkM0R8VlVsvhyfSHvomXRivS4vPLk0dJV2IhRBIHRABh7AFutdMeElIA5y1dETwMBg==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"jest-worker": "^27.0.2", "jest-worker": "^27.0.6",
"p-limit": "^3.1.0", "p-limit": "^3.1.0",
"schema-utils": "^3.0.0", "schema-utils": "^3.1.1",
"serialize-javascript": "^6.0.0", "serialize-javascript": "^6.0.0",
"source-map": "^0.6.1", "source-map": "^0.6.1",
"terser": "^5.7.0" "terser": "^5.7.2"
}, },
"engines": { "engines": {
"node": ">= 10.13.0" "node": ">= 10.13.0"
@ -6005,6 +6005,17 @@
}, },
"peerDependencies": { "peerDependencies": {
"webpack": "^5.1.0" "webpack": "^5.1.0"
},
"peerDependenciesMeta": {
"@swc/core": {
"optional": true
},
"esbuild": {
"optional": true
},
"uglify-js": {
"optional": true
}
} }
}, },
"node_modules/terser-webpack-plugin/node_modules/p-limit": { "node_modules/terser-webpack-plugin/node_modules/p-limit": {
@ -6064,9 +6075,9 @@
"integrity": "sha512-wiWio1yVRg2Oj6WEWsTHQo5eSzYpEwSBtPSi3OofNpvFbf26HFfb9kw4FZJNjII4qxzp0b1xLB11+tKkBGB1ZA==" "integrity": "sha512-wiWio1yVRg2Oj6WEWsTHQo5eSzYpEwSBtPSi3OofNpvFbf26HFfb9kw4FZJNjII4qxzp0b1xLB11+tKkBGB1ZA=="
}, },
"node_modules/three-csg-ts": { "node_modules/three-csg-ts": {
"version": "3.1.7", "version": "3.1.8",
"resolved": "https://registry.npmjs.org/three-csg-ts/-/three-csg-ts-3.1.7.tgz", "resolved": "https://registry.npmjs.org/three-csg-ts/-/three-csg-ts-3.1.8.tgz",
"integrity": "sha512-llyTbv/q3NUhht58XpuULbk4ifU0EEpgO/8EuJWRVgNeAE8wD483LOk2KTipg6STPg9VnElSwVGm9u4Vqu57ZQ==", "integrity": "sha512-eLlrXI5C+KzC7XMr8sKdh7RYncM/X+dl28PPUyuZn9JUjDHzwuj+wLv3QVjN/EzwW8amqveJfafz3WuqWSW3ow==",
"peerDependencies": { "peerDependencies": {
"@types/three": ">= 0.125.0", "@types/three": ">= 0.125.0",
"three": ">= 0.125.0" "three": ">= 0.125.0"
@ -6342,6 +6353,12 @@
"extsprintf": "^1.2.0" "extsprintf": "^1.2.0"
} }
}, },
"node_modules/verror/node_modules/core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
},
"node_modules/watchpack": { "node_modules/watchpack": {
"version": "2.2.0", "version": "2.2.0",
"resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz",
@ -7944,9 +7961,9 @@
"dev": true "dev": true
}, },
"@types/node": { "@types/node": {
"version": "16.7.1", "version": "16.7.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.1.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.10.tgz",
"integrity": "sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A==", "integrity": "sha512-S63Dlv4zIPb8x6MMTgDq5WWRJQe56iBEY0O3SOFA9JrRienkOVDXSXBjjJw6HTNQYSE2JI6GMCR6LVbIMHJVvA==",
"dev": true "dev": true
}, },
"@types/normalize-package-data": { "@types/normalize-package-data": {
@ -8435,9 +8452,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001251", "version": "1.0.30001252",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001252.tgz",
"integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", "integrity": "sha512-I56jhWDGMtdILQORdusxBOH+Nl/KgQSdDmpJezYddnAkVOmnoU8zwjTV9xAjMIYxr0iPreEAVylCGcmHCjfaOw==",
"dev": true "dev": true
}, },
"caseless": { "caseless": {
@ -8674,12 +8691,12 @@
} }
}, },
"core-js-compat": { "core-js-compat": {
"version": "3.16.2", "version": "3.16.4",
"resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.2.tgz", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.16.4.tgz",
"integrity": "sha512-4lUshXtBXsdmp8cDWh6KKiHUg40AjiuPD3bOWkNVsr1xkAhpUqCjaZ8lB1bKx9Gb5fXcbRbFJ4f4qpRIRTuJqQ==", "integrity": "sha512-IzCSomxRdahCYb6G3HiN6pl3JCiM0NMunRcNa1pIeC7g17Vd6Ue3AT9anQiENPIm/svThUVer1pIbLMDERIsFw==",
"dev": true, "dev": true,
"requires": { "requires": {
"browserslist": "^4.16.7", "browserslist": "^4.16.8",
"semver": "7.0.0" "semver": "7.0.0"
}, },
"dependencies": { "dependencies": {
@ -8692,9 +8709,9 @@
} }
}, },
"core-util-is": { "core-util-is": {
"version": "1.0.2", "version": "1.0.3",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==",
"dev": true "dev": true
}, },
"cross-spawn": { "cross-spawn": {
@ -8837,9 +8854,9 @@
} }
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.3.814", "version": "1.3.826",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.814.tgz", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.826.tgz",
"integrity": "sha512-0mH03cyjh6OzMlmjauGg0TLd87ErIJqWiYxMcOLKf5w6p0YEOl7DJAj7BDlXEFmCguY5CQaKVOiMjAMODO2XDw==", "integrity": "sha512-bpLc4QU4B8PYmdO4MSu2ZBTMD8lAaEXRS43C09lB31BvYwuk9UxgBRXbY5OJBw7VuMGcg2MZG5FyTaP9u4PQnw==",
"dev": true "dev": true
}, },
"emoji-regex": { "emoji-regex": {
@ -9076,9 +9093,9 @@
} }
}, },
"find-cache-dir": { "find-cache-dir": {
"version": "3.3.1", "version": "3.3.2",
"resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz",
"integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==",
"dev": true, "dev": true,
"requires": { "requires": {
"commondir": "^1.0.1", "commondir": "^1.0.1",
@ -9240,9 +9257,9 @@
"dev": true "dev": true
}, },
"globby": { "globby": {
"version": "12.0.1", "version": "12.0.2",
"resolved": "https://registry.npmjs.org/globby/-/globby-12.0.1.tgz", "resolved": "https://registry.npmjs.org/globby/-/globby-12.0.2.tgz",
"integrity": "sha512-AofdCGi+crQ1uN9+nMbTnvC4XGNPJN9hRiPf+A76lUZIZoWoj4Z9iyUQGge7xCGKgR/7ejB36qoIlLoDBc7fYw==", "integrity": "sha512-lAsmb/5Lww4r7MM9nCCliDZVIKbZTavrsunAsHLr9oHthrZP1qi7/gAnHOsUs9bLvEt2vKVJhHmxuL7QbDuPdQ==",
"dev": true, "dev": true,
"peer": true, "peer": true,
"requires": { "requires": {
@ -9548,9 +9565,9 @@
"dev": true "dev": true
}, },
"jest-worker": { "jest-worker": {
"version": "27.0.6", "version": "27.1.0",
"resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.1.0.tgz",
"integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", "integrity": "sha512-mO4PHb2QWLn9yRXGp7rkvXLAYuxwhq1ZYUo0LoDhg8wqvv4QizP1ZWEJOeolgbEgAWZLIEU0wsku8J+lGWfBhg==",
"dev": true, "dev": true,
"requires": { "requires": {
"@types/node": "*", "@types/node": "*",
@ -9824,9 +9841,9 @@
"dev": true "dev": true
}, },
"mini-css-extract-plugin": { "mini-css-extract-plugin": {
"version": "2.2.0", "version": "2.2.1",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.2.0.tgz", "resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.2.1.tgz",
"integrity": "sha512-91HeVHbq7PUJ4TwOuMTlFWfVWrLqf3SF0PlEDPV+wtgsfxrMebN9LLzflyQqdKLp4/H3PexRB1WLKsCqpWKkxQ==", "integrity": "sha512-A0GBXpz8WIPgh2HfASJ0EeY8grd2dGxmC4R8uTujFJXZY7zFy0nvYSYW6SKCLKlz7y45BdHONfaxZQMIZpeF/w==",
"dev": true, "dev": true,
"requires": { "requires": {
"schema-utils": "^3.1.0" "schema-utils": "^3.1.0"
@ -11117,9 +11134,9 @@
"dev": true "dev": true
}, },
"tar": { "tar": {
"version": "6.1.10", "version": "6.1.11",
"resolved": "https://registry.npmjs.org/tar/-/tar-6.1.10.tgz", "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",
"integrity": "sha512-kvvfiVvjGMxeUNB6MyYv5z7vhfFRwbwCXJAeL0/lnbrttBVqcMOnpHUf0X42LrPMR8mMpgapkJMchFH4FSHzNA==", "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",
"dev": true, "dev": true,
"requires": { "requires": {
"chownr": "^2.0.0", "chownr": "^2.0.0",
@ -11131,9 +11148,9 @@
} }
}, },
"terser": { "terser": {
"version": "5.7.1", "version": "5.7.2",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.2.tgz",
"integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", "integrity": "sha512-0Omye+RD4X7X69O0eql3lC4Heh/5iLj3ggxR/B5ketZLOtLiOqukUgjw3q4PDnNQbsrkKr3UMypqStQG3XKRvw==",
"dev": true, "dev": true,
"requires": { "requires": {
"commander": "^2.20.0", "commander": "^2.20.0",
@ -11150,17 +11167,17 @@
} }
}, },
"terser-webpack-plugin": { "terser-webpack-plugin": {
"version": "5.1.4", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz", "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.2.0.tgz",
"integrity": "sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA==", "integrity": "sha512-FpR4Qe0Yt4knSQ5u2bA1wkM0R8VlVsvhyfSHvomXRivS4vPLk0dJV2IhRBIHRABh7AFutdMeElIA5y1dETwMBg==",
"dev": true, "dev": true,
"requires": { "requires": {
"jest-worker": "^27.0.2", "jest-worker": "^27.0.6",
"p-limit": "^3.1.0", "p-limit": "^3.1.0",
"schema-utils": "^3.0.0", "schema-utils": "^3.1.1",
"serialize-javascript": "^6.0.0", "serialize-javascript": "^6.0.0",
"source-map": "^0.6.1", "source-map": "^0.6.1",
"terser": "^5.7.0" "terser": "^5.7.2"
}, },
"dependencies": { "dependencies": {
"p-limit": { "p-limit": {
@ -11197,9 +11214,9 @@
"integrity": "sha512-wiWio1yVRg2Oj6WEWsTHQo5eSzYpEwSBtPSi3OofNpvFbf26HFfb9kw4FZJNjII4qxzp0b1xLB11+tKkBGB1ZA==" "integrity": "sha512-wiWio1yVRg2Oj6WEWsTHQo5eSzYpEwSBtPSi3OofNpvFbf26HFfb9kw4FZJNjII4qxzp0b1xLB11+tKkBGB1ZA=="
}, },
"three-csg-ts": { "three-csg-ts": {
"version": "3.1.7", "version": "3.1.8",
"resolved": "https://registry.npmjs.org/three-csg-ts/-/three-csg-ts-3.1.7.tgz", "resolved": "https://registry.npmjs.org/three-csg-ts/-/three-csg-ts-3.1.8.tgz",
"integrity": "sha512-llyTbv/q3NUhht58XpuULbk4ifU0EEpgO/8EuJWRVgNeAE8wD483LOk2KTipg6STPg9VnElSwVGm9u4Vqu57ZQ==", "integrity": "sha512-eLlrXI5C+KzC7XMr8sKdh7RYncM/X+dl28PPUyuZn9JUjDHzwuj+wLv3QVjN/EzwW8amqveJfafz3WuqWSW3ow==",
"requires": {} "requires": {}
}, },
"to-fast-properties": { "to-fast-properties": {
@ -11396,6 +11413,14 @@
"assert-plus": "^1.0.0", "assert-plus": "^1.0.0",
"core-util-is": "1.0.2", "core-util-is": "1.0.2",
"extsprintf": "^1.2.0" "extsprintf": "^1.2.0"
},
"dependencies": {
"core-util-is": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
"integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=",
"dev": true
}
} }
}, },
"watchpack": { "watchpack": {

View File

@ -5,11 +5,7 @@ import { DemBlock } from './DemBlock';
// import { MeshLambertMaterial } from 'three/src/materials/MeshLambertMaterial'; // import { MeshLambertMaterial } from 'three/src/materials/MeshLambertMaterial';
import { DoubleSide, FlatShading, LinearFilter } from 'three/src/constants'; import { DoubleSide, FlatShading, LinearFilter } from 'three/src/constants';
import * as browser from '../core/browser'; import * as browser from '../core/browser';
import { TextureLoader } from 'three/src/loaders/TextureLoader'; import { TextureLoader } from 'three/src/loaders/TextureLoader';
// import { Vector3 } from 'three/src/math/Vector3';
import proj4 from 'proj4/dist/proj4'; import proj4 from 'proj4/dist/proj4';
import { ShaderMaterial } from 'three/src/materials/ShaderMaterial'; import { ShaderMaterial } from 'three/src/materials/ShaderMaterial';
import { shader } from '../clip/shader'; import { shader } from '../clip/shader';
@ -72,7 +68,7 @@ export class DemLayer extends Layer {
this.uniforms = uniforms; this.uniforms = uniforms;
} }
async initMaterials() { private async initMaterials() {
if (this.materialParameter.length === 0) return; if (this.materialParameter.length === 0) return;
let sum_opacity = 0; let sum_opacity = 0;
this.material; this.material;
@ -155,11 +151,11 @@ export class DemLayer extends Layer {
this.opacity = sum_opacity / this.materialsArray.length; this.opacity = sum_opacity / this.materialsArray.length;
} }
scaleZ(z) { public scaleZ(z) {
this.objectGroup.scale.z = z; this.objectGroup.scale.z = z;
} }
setVisible(visible) { public setVisible(visible) {
this.visible = visible; this.visible = visible;
this.objectGroup.visible = visible; this.objectGroup.visible = visible;
//Q3D.application.queryObjNeedsUpdate = true; //Q3D.application.queryObjNeedsUpdate = true;
@ -174,7 +170,7 @@ export class DemLayer extends Layer {
return block; return block;
} }
setWireframeMode(wireframe) { public setWireframeMode(wireframe) {
this.materialsArray.forEach(function (mat) { this.materialsArray.forEach(function (mat) {
//if (m.w) return; //if (m.w) return;
//m.mat.wireframe = wireframe; //m.mat.wireframe = wireframe;
@ -182,7 +178,7 @@ export class DemLayer extends Layer {
}); });
} }
async changeImage(i) { public async changeImage(i) {
//this.mainMesh.material.map = THREE.ImageUtils.loadTexture(src); //this.mainMesh.material.map = THREE.ImageUtils.loadTexture(src);
let image = this.images[i]; let image = this.images[i];
if (image.texture === undefined) { if (image.texture === undefined) {
@ -207,7 +203,7 @@ export class DemLayer extends Layer {
} }
//helper function to load in the texture //helper function to load in the texture
async loadTexture(texturePath) { private async loadTexture(texturePath) {
const textureLoader = new TextureLoader(); const textureLoader = new TextureLoader();
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
textureLoader.load( textureLoader.load(
@ -219,7 +215,7 @@ export class DemLayer extends Layer {
}); });
} }
async loadTextureWms(url, imageParameter) { private async loadTextureWms(url, imageParameter) {
let dest = new proj4.Proj("EPSG:3857"); let dest = new proj4.Proj("EPSG:3857");
let source = new proj4.Proj("EPSG:3034"); let source = new proj4.Proj("EPSG:3034");
let p1 = proj4.toPoint([this.baseExtent.min.x, this.baseExtent.min.y]); let p1 = proj4.toPoint([this.baseExtent.min.x, this.baseExtent.min.y]);
@ -262,7 +258,7 @@ export class DemLayer extends Layer {
}); });
} }
async onAdd(map) { public 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");
// this.baseExtent.x.min = map.baseExtent.x.min; // this.baseExtent.x.min = map.baseExtent.x.min;
@ -281,11 +277,11 @@ export class DemLayer extends Layer {
this.emit('add'); this.emit('add');
} }
onRemove(map) { public onRemove(map) {
map.scene.remove(this.objectGroup); map.scene.remove(this.objectGroup);
} }
async build(app_scene) { private async build(app_scene) {
//var opt = Gba3D.Options; //var opt = Gba3D.Options;
this.blocks.forEach(function (block) { this.blocks.forEach(function (block) {
block.build(this); block.build(this);
@ -296,7 +292,7 @@ export class DemLayer extends Layer {
} }
} }
addObject(object, queryable) { private addObject(object, queryable) {
if (queryable === undefined) { if (queryable === undefined) {
queryable = this.q; queryable = this.q;
} }
@ -307,14 +303,14 @@ export class DemLayer extends Layer {
} }
} }
_addQueryableObject(object) { private _addQueryableObject(object) {
this.queryableObjects.push(object); this.queryableObjects.push(object);
//for (var i = 0, l = object.children.length; i < l; i++) { //for (var i = 0, l = object.children.length; i < l; i++) {
// this._addQueryableObject(object.children[i]); // this._addQueryableObject(object.children[i]);
//} //}
} }
removeObject(object, queryable) { private removeObject(object, queryable) {
if (queryable === undefined) { if (queryable === undefined) {
queryable = this.q; queryable = this.q;
} }
@ -327,7 +323,7 @@ export class DemLayer extends Layer {
} }
} }
async requestImage(url, imageParameter) { private async requestImage(url, imageParameter) {
let dest = new proj4.Proj("EPSG:3857"); let dest = new proj4.Proj("EPSG:3857");
let source = new proj4.Proj("EPSG:3034"); let source = new proj4.Proj("EPSG:3034");
let p1 = proj4.toPoint([this.baseExtent.min.x, this.baseExtent.min.y]); let p1 = proj4.toPoint([this.baseExtent.min.x, this.baseExtent.min.y]);

View File

@ -18,7 +18,7 @@ const devMode = (process.env.NODE_ENV !== 'production');
const fileNamePrefix = isProduction ? '[chunkhash].' : ''; const fileNamePrefix = isProduction ? '[chunkhash].' : '';
module.exports = { module.exports = {
// mode: process.env.NODE_ENV, mode: process.env.NODE_ENV,
context: __dirname, context: __dirname,
entry: './src/js/main.js', entry: './src/js/main.js',
output: { output: {
@ -97,7 +97,7 @@ module.exports = {
// sourceMap: true // sourceMap: true
// } // }
// }, // },
// Translates CSS into CommonJS // Translates CSS into CommonJS
{ {
loader: "css-loader", loader: "css-loader",
options: { options: {
@ -107,7 +107,7 @@ module.exports = {
// { // {
// loader: 'resolve-url-loader', // loader: 'resolve-url-loader',
// }, // },
// Compiles Sass to CSS // Compiles Sass to CSS
{ {
loader: "sass-loader", loader: "sass-loader",
options: { options: {
@ -121,11 +121,11 @@ module.exports = {
}, },
resolve: { resolve: {
extensions: ['*', '.js', '.jsx', '.tsx', '.ts'], extensions: ['*', '.js', '.jsx', '.tsx', '.ts'],
}, },
stats: { stats: {
colors: true colors: true
}, },
devtool: 'inline-source-map', devtool: (isProduction === true) ? 'hidden-source-map' : 'inline-source-map',
optimization: { optimization: {
minimize: isProduction, minimize: isProduction,
@ -150,6 +150,22 @@ module.exports = {
} }
}) })
], ],
runtimeChunk: 'single',
splitChunks: {
cacheGroups: {
vendor: {
test: /[\\\/]node_modules[\\\/]/,
name: 'vendors',
chunks: 'all'
},
// styles: {
// name: 'styles',
// test: /\.css$/,
// chunks: 'all',
// enforce: true
// }
}
},
}, },
plugins: [ plugins: [
@ -160,9 +176,9 @@ 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), SERVICE_URL: JSON.stringify(process.env.SERVICE_URL),
POINT_URL : JSON.stringify(process.env.POINT_URL), POINT_URL: JSON.stringify(process.env.POINT_URL),
EDGE_URL : JSON.stringify(process.env.EDGE_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
}), }),