| @@ -14,3 +14,4 @@ dist/ | |||
| *.njsproj | |||
| package-lock.json | |||
| .DS_Store | |||
| /examples | |||
| @@ -24,7 +24,7 @@ module.exports = { | |||
| { | |||
| test: /\.js$/, | |||
| include: [ | |||
| path.resolve(__dirname, '../node_modules/cesium'), | |||
| path.resolve(__dirname, '../node_modules/@cesium'), | |||
| path.resolve(__dirname, '../libs'), | |||
| path.resolve(__dirname, '../modules'), | |||
| path.resolve(__dirname, '../packages') | |||
| @@ -8,22 +8,25 @@ | |||
| const path = require('path') | |||
| const webpack = require('webpack') | |||
| const CopyWebpackPlugin = require('copy-webpack-plugin') | |||
| const cesiumBuild = '../node_modules/cesium/Build/Cesium' | |||
| const common = require('./common') | |||
| let cesiumCopyPlugin = [ | |||
| new CopyWebpackPlugin([ | |||
| { | |||
| from: path.resolve(__dirname, cesiumBuild, 'Assets'), | |||
| from: path.resolve( | |||
| __dirname, | |||
| '../node_modules/@cesium/engine/Source', | |||
| 'Assets' | |||
| ), | |||
| to: 'resources/Assets' | |||
| }, | |||
| { | |||
| from: path.resolve(__dirname, cesiumBuild, 'Workers'), | |||
| from: path.resolve( | |||
| __dirname, | |||
| '../node_modules/@cesium/engine/Build', | |||
| 'Workers' | |||
| ), | |||
| to: 'resources/Workers' | |||
| }, | |||
| { | |||
| from: path.resolve(__dirname, cesiumBuild, 'ThirdParty'), | |||
| to: 'resources/ThirdParty' | |||
| } | |||
| ]) | |||
| ] | |||
| @@ -50,7 +53,7 @@ module.exports = env => { | |||
| umdNamedDefine: true | |||
| }, | |||
| module: { | |||
| // unknownContextCritical: false, | |||
| unknownContextCritical: false, | |||
| rules: common.rules | |||
| }, | |||
| resolve: { | |||
| @@ -0,0 +1,8 @@ | |||
| /** | |||
| * @Author: Caven | |||
| * @Date: 2023-01-07 15:49:26 | |||
| */ | |||
| class BaseLayerPicker {} | |||
| export default BaseLayerPicker | |||
| @@ -4,3 +4,4 @@ | |||
| */ | |||
| export { default as GroundSkyBox } from './GroundSkyBox' | |||
| export { default as CesiumViewer } from './CesiumViewer' | |||
| @@ -3,7 +3,6 @@ | |||
| * @Date: 2020-01-21 10:48:50 | |||
| */ | |||
| import 'cesium/Widgets/widgets.css' | |||
| import './index.scss' | |||
| import './popup.scss' | |||
| import './tooltip.scss' | |||
| @@ -51,10 +51,8 @@ | |||
| "@babel/plugin-transform-runtime": "^7.4.0", | |||
| "@babel/polyfill": "^7.4.0", | |||
| "@babel/preset-env": "^7.4.2", | |||
| "@turf/turf": "^6.3.0", | |||
| "babel-eslint": "^10.0.1", | |||
| "babel-loader": "^8.0.5", | |||
| "cesium": "^1.98.1", | |||
| "chalk": "^4.1.0", | |||
| "copy-webpack-plugin": "^5.0.2", | |||
| "css-loader": "^2.1.1", | |||
| @@ -80,5 +78,9 @@ | |||
| "webpack-cli": "^3.3.0", | |||
| "webpack-glsl-loader": "^1.0.1", | |||
| "webpack-obfuscator": "^1.8.0" | |||
| }, | |||
| "dependencies": { | |||
| "@cesium/engine": "^1.1.0", | |||
| "@turf/turf": "^6.3.0" | |||
| } | |||
| } | |||
| @@ -3,9 +3,13 @@ | |||
| * @Date: 2021-03-12 16:45:45 | |||
| */ | |||
| import * as Cesium from 'cesium' | |||
| import * as turf from '@turf/turf' | |||
| import { initMixin, initUse } from '@dc-modules/global-api' | |||
| import { CesiumViewer, GroundSkyBox } from '@dc-modules/exts' | |||
| const Cesium = require('@cesium/engine') | |||
| Cesium['Viewer'] = CesiumViewer | |||
| Cesium['GroundSkyBox'] = GroundSkyBox | |||
| let DC = { | |||
| version: __VERSION__, | |||