提交
This commit is contained in:
70
example/全局特效.html
Normal file
70
example/全局特效.html
Normal file
@ -0,0 +1,70 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Title</title>
|
||||
<!-- <script src="../sdk/Cesium/Cesium.js"></script> -->
|
||||
|
||||
<script src="../sdk/YJEarth.min.js"></script>
|
||||
<script src="vue.js"></script>
|
||||
<style>
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" class="fullSize">
|
||||
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
<script>
|
||||
new Vue({
|
||||
el: "#app",
|
||||
data: {
|
||||
sdk: null,
|
||||
},
|
||||
async mounted() {
|
||||
await YJ.on()
|
||||
await this.createEarth()
|
||||
},
|
||||
methods: {
|
||||
async createEarth() {
|
||||
this.sdk = new YJ.YJEarth("app")
|
||||
|
||||
// 鼠标右键菜单点击回调
|
||||
YJ.Global.MouseRightMenu(this.sdk, true, (text, object) => {
|
||||
console.log(object)
|
||||
switch (text) {
|
||||
case 'rotateAround':
|
||||
YJ.Global.rotateAround(this.sdk, object.position)
|
||||
break
|
||||
case 'edit':
|
||||
break
|
||||
}
|
||||
})
|
||||
YJ.Global.setCoordinateSystem('EPSG:32648')
|
||||
YJ.Global.CesiumContainer(this.sdk, {
|
||||
compass: true, // 罗盘
|
||||
legend: true, // 比例尺
|
||||
info: true, // 信息栏
|
||||
frame: true // 刷新率
|
||||
})
|
||||
YJ.Global.efflect.rain(this.sdk, true) // 雨 (true:打开;false:关闭)
|
||||
// YJ.Global.efflect.snow(this.sdk, true) // 雪
|
||||
// YJ.Global.efflect.fog(this.sdk, true) // 雾
|
||||
// YJ.Global.efflect.nightVision(this.sdk, true) // 夜视
|
||||
// YJ.Global.efflect.skyStarry(this.sdk, true) // 星空
|
||||
// YJ.Global.efflect.illumination(this.sdk, true) // 光照
|
||||
|
||||
// YJ.Global.CameraController(this.sdk, false) // 相机锁定
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
Reference in New Issue
Block a user