58 lines
1.5 KiB
Vue
58 lines
1.5 KiB
Vue
![]() |
<script setup>
|
||
|
// import { useBase } from '../BaseMB/hooks/base'
|
||
|
|
||
|
// const { addBaseFacilities } = useBase()
|
||
|
|
||
|
onMounted(() => {
|
||
|
window.viewer = new Cesium.Viewer('earth-container', {
|
||
|
selectionIndicator: false,
|
||
|
animation: false,
|
||
|
baseLayerPicker: false,
|
||
|
geocoder: false,
|
||
|
timeline: false,
|
||
|
sceneModePicker: false,
|
||
|
navigationHelpButton: false,
|
||
|
infoBox: false,
|
||
|
fullscreenButton: false,
|
||
|
homeButton: false,
|
||
|
imageryProvider: new Cesium.UrlTemplateImageryProvider({
|
||
|
url: 'GV/resources/theme/earthTheme/{z}/{x}/{y}.jpg',
|
||
|
tilingScheme: new Cesium.GeographicTilingScheme(),
|
||
|
}),
|
||
|
|
||
|
// imageryProvider: false,
|
||
|
})
|
||
|
viewer.camera.setView({
|
||
|
destination: Cesium.Cartesian3.fromDegrees(117.48, 30.67, 15500000.0),
|
||
|
})
|
||
|
|
||
|
viewer.clock.shouldAnimate = true
|
||
|
viewer.scene.globe.enableLighting = true
|
||
|
|
||
|
if (Cesium.FeatureDetection.supportsImageRenderingPixelated()) {
|
||
|
console.log('window.devicePixelRatio', window.devicePixelRatio)
|
||
|
viewer.resolutionScale = window.devicePixelRatio
|
||
|
}
|
||
|
|
||
|
// 开启抗锯齿
|
||
|
viewer.scene.postProcessStages.fxaa.enabled = true
|
||
|
// viewer.scene.skyBox = GV.SkyboxTheme.getSkyBox('GV/resources/theme/skyBox/{z}/{x}/{y}.jpg',false,'jpg')
|
||
|
// viewer.scene.globe.depthTestAgainstTerrain = true
|
||
|
|
||
|
// addBaseFacilities()
|
||
|
})
|
||
|
</script>
|
||
|
|
||
|
<template>
|
||
|
<div
|
||
|
id="earth-container"
|
||
|
class="absolute top-0 left-0 bottom-0 right-0"
|
||
|
></div>
|
||
|
</template>
|
||
|
|
||
|
<style lang="scss">
|
||
|
.cesium-widget-credits {
|
||
|
display: none !important;
|
||
|
}
|
||
|
</style>
|