Browse Source

change the cesium to @cesium/engine

tags/3.0.0
Caven Chen 2 years ago
parent
commit
eba7a029fc

+ 1
- 0
.gitignore View File

@@ -14,3 +14,4 @@ dist/
*.njsproj
package-lock.json
.DS_Store
/examples

+ 1
- 1
build/common.js View File

@@ -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')

+ 11
- 8
build/webpack.base.conf.js View File

@@ -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: {

+ 8
- 0
modules/exts/BaseLayerPicker.js View File

@@ -0,0 +1,8 @@
/**
* @Author: Caven
* @Date: 2023-01-07 15:49:26
*/

class BaseLayerPicker {}

export default BaseLayerPicker

+ 1326
- 0
modules/exts/CesiumViewer.js
File diff suppressed because it is too large
View File


+ 1
- 0
modules/exts/index.js View File

@@ -4,3 +4,4 @@
*/

export { default as GroundSkyBox } from './GroundSkyBox'
export { default as CesiumViewer } from './CesiumViewer'

+ 0
- 1
modules/themes/index.js View File

@@ -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'

+ 4
- 2
package.json View File

@@ -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"
}
}

+ 5
- 1
packages/base/index.js View File

@@ -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__,

Loading…
Cancel
Save