- 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>
</section>
<script src="dist/runtime.js"></script>
<script src="dist/vendors.js"></script>
<script src="dist/main.js"></script>
</body>

197
package-lock.json generated
View File

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

View File

@ -5,11 +5,7 @@ import { DemBlock } from './DemBlock';
// import { MeshLambertMaterial } from 'three/src/materials/MeshLambertMaterial';
import { DoubleSide, FlatShading, LinearFilter } from 'three/src/constants';
import * as browser from '../core/browser';
import { TextureLoader } from 'three/src/loaders/TextureLoader';
// import { Vector3 } from 'three/src/math/Vector3';
import proj4 from 'proj4/dist/proj4';
import { ShaderMaterial } from 'three/src/materials/ShaderMaterial';
import { shader } from '../clip/shader';
@ -72,7 +68,7 @@ export class DemLayer extends Layer {
this.uniforms = uniforms;
}
async initMaterials() {
private async initMaterials() {
if (this.materialParameter.length === 0) return;
let sum_opacity = 0;
this.material;
@ -155,11 +151,11 @@ export class DemLayer extends Layer {
this.opacity = sum_opacity / this.materialsArray.length;
}
scaleZ(z) {
public scaleZ(z) {
this.objectGroup.scale.z = z;
}
setVisible(visible) {
public setVisible(visible) {
this.visible = visible;
this.objectGroup.visible = visible;
//Q3D.application.queryObjNeedsUpdate = true;
@ -174,7 +170,7 @@ export class DemLayer extends Layer {
return block;
}
setWireframeMode(wireframe) {
public setWireframeMode(wireframe) {
this.materialsArray.forEach(function (mat) {
//if (m.w) return;
//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);
let image = this.images[i];
if (image.texture === undefined) {
@ -207,7 +203,7 @@ export class DemLayer extends Layer {
}
//helper function to load in the texture
async loadTexture(texturePath) {
private async loadTexture(texturePath) {
const textureLoader = new TextureLoader();
return new Promise((resolve, reject) => {
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 source = new proj4.Proj("EPSG:3034");
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: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;
@ -281,11 +277,11 @@ export class DemLayer extends Layer {
this.emit('add');
}
onRemove(map) {
public onRemove(map) {
map.scene.remove(this.objectGroup);
}
async build(app_scene) {
private async build(app_scene) {
//var opt = Gba3D.Options;
this.blocks.forEach(function (block) {
block.build(this);
@ -296,7 +292,7 @@ export class DemLayer extends Layer {
}
}
addObject(object, queryable) {
private addObject(object, queryable) {
if (queryable === undefined) {
queryable = this.q;
}
@ -307,14 +303,14 @@ export class DemLayer extends Layer {
}
}
_addQueryableObject(object) {
private _addQueryableObject(object) {
this.queryableObjects.push(object);
//for (var i = 0, l = object.children.length; i < l; i++) {
// this._addQueryableObject(object.children[i]);
//}
}
removeObject(object, queryable) {
private removeObject(object, queryable) {
if (queryable === undefined) {
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 source = new proj4.Proj("EPSG:3034");
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].' : '';
module.exports = {
// mode: process.env.NODE_ENV,
mode: process.env.NODE_ENV,
context: __dirname,
entry: './src/js/main.js',
output: {
@ -125,7 +125,7 @@ module.exports = {
stats: {
colors: true
},
devtool: 'inline-source-map',
devtool: (isProduction === true) ? 'hidden-source-map' : 'inline-source-map',
optimization: {
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: [