release: vite-plugin-earth@2.0.5

This commit is contained in:
2023-06-05 14:58:48 +08:00
parent 7956b654bd
commit 4d2294e6b2
6 changed files with 19 additions and 66 deletions

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>mars3d-vite</title>
<title>demo-mars3d</title>
<script type="module" src="/src/index.ts"></script>
</head>

View File

@ -9,12 +9,12 @@
"serve": "vite build && vite preview"
},
"devDependencies": {
"vite": "^3.0.4",
"vite": "^4.3.4",
"vite-plugin-earth": "link:.."
},
"dependencies": {
"@turf/turf": "^6.5.0",
"mars3d": "^3.5.0",
"mars3d-cesium": "^1.103.1"
"mars3d": "^3.5.4",
"mars3d-cesium": "^1.104.3"
}
}

View File

@ -8,47 +8,4 @@ import 'mars3d/dist/mars3d.css';
*
*
*/
const map = new mars3d.Map('mars3dContainer', {
scene: {
center: { lat: 30.054604, lng: 108.885436, alt: 17036414, heading: 0, pitch: -90 },
showSun: true,
showMoon: true,
showSkyBox: true,
showSkyAtmosphere: false, // 关闭球周边的白色轮廓 map.scene.skyAtmosphere = false
fog: true,
fxaa: true,
globe: {
showGroundAtmosphere: false, // 关闭大气(球表面白蒙蒙的效果)
depthTestAgainstTerrain: false,
baseColor: '#546a53'
},
cameraController: {
zoomFactor: 3.0,
minimumZoomDistance: 1,
maximumZoomDistance: 50000000,
enableRotate: true,
enableZoom: true
}
},
control: {
baseLayerPicker: true, // basemaps底图切换按钮
homeButton: true, // 视角复位按钮
sceneModePicker: true, // 二三维切换按钮
navigationHelpButton: true, // 帮助按钮
fullscreenButton: true, // 全屏按钮
contextmenu: { hasDefault: true } // 右键菜单
},
terrain: {
url: '//data.mars3d.cn/terrain',
show: true
},
basemaps: [
{
name: '天地图影像',
icon: 'img/basemaps/tdt_img.png',
type: 'tdt',
layer: 'img_d',
show: true
}
]
});
const map = new mars3d.Map('mars3dContainer', {});

View File

@ -4,8 +4,7 @@ import earth from 'vite-plugin-earth';
export default defineConfig({
plugins: [
earth({
useMars3D: true,
useCDN: { mars3d: '3.5.1' }
useMars3D: true
})
]
});