1 Star 1 Fork 3

zhu德明/cesium-xt3d-doc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
xt3dsdk.html 2.13 KB
一键复制 编辑 原始数据 按行查看 历史
谢权 提交于 2021-08-24 16:24 . first commit
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>xt3d-sdk 快速开始</title>
<script src="https://cdn.jsdelivr.net/npm/cesium@1.84.0/Build/Cesium/Cesium.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/cesium@1.84.0/Build/Cesium/Widgets/widgets.css">
<!-- 引入插件 -->
<script src="./dist/xt3d.min.js"></script>
<style>
html,
body,
#map3d {
height: 100%;
width: 100%;
margin: 0px;
padding: 0px;
}
.cesium-credit-logoContainer {
display: none !important;
}
.cesium-widget-credits {
display: none !important;
}
</style>
</head>
<body>
<div class="map3d" id="map3d"></div>
</body>
<script>
var viewer = new Cesium.Viewer("map3d", {
infoBox: false,
selectionIndicator: false,
navigation: false,
animation: false,
shouldAnimate: false,
timeline: false,
baseLayerPicker: false,
geocoder: false,
homeButton: false,
sceneModePicker: false,
navigationHelpButton: false,
fullscreenButton: false,
imageryProvider: new Cesium.ArcGisMapServerImageryProvider({
url: 'https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer'
})
});
viewer.scene.fxaa = true;
viewer.scene.postProcessStages.fxaa.enabled = true;
//创建一条尾迹线
let positions = Cesium.Cartesian3.fromDegreesArrayHeights([108, 32, 10, 109, 32, 10]);
viewer.entities.add({
polyline: {
positions: positions,
width: 2,
material: new xt3d.PolylineObject.PolylineTrailMaterialProperty({
speed: 6 * Math.random(),
color: Cesium.Color.YELLOW,
percent: 0.5,
gradient: 0.01,
})
}
});
this.viewer.flyTo(this.viewer.entities);
</script>
</html>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhu_deming/cesium-xt3d-doc.git
git@gitee.com:zhu_deming/cesium-xt3d-doc.git
zhu_deming
cesium-xt3d-doc
cesium-xt3d-doc
master

搜索帮助