Files
sdk4_demo/example/粒子效果.html

79 lines
2.1 KiB
HTML
Raw Normal View History

2025-07-03 15:12:58 +08:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<!-- <script src="https://cesium.com/downloads/cesiumjs/releases/1.105/Build/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: {
},
async mounted() {
await YJ.on()
await this.createEarth()
await this.addFlame()
},
methods: {
async createEarth() {
window.sdk = await new YJ.YJEarth("app")
},
addFlame() {
this.Flame = new YJ.Obj.Flame(sdk, {
// url: "./image/smoke.png",
lng: 108.41644787649406,
lat: 30.504273203989644,
alt: 10,
particleSize: 100,
startColor: 'rgba(27,247,3,1)'
})
this.Flame.flyTo()
this.Flame.edit(true)
window.Flame = this.Flame
// this.Smoke = new YJ.Obj.Smoke(sdk, {
// lng: 108.41744787649406,
// lat: 30.504273203989644,
// alt: 10
// })
// this.Smoke.flyTo()
// this.Smoke.edit(true)
// this.Smoke.onClick = (a,b,c)=>{
// console.log(a,b,c)
// }
// this.Smoke.onRightClick = (a,b,c)=>{
// console.log(a,b,c)
// }
// this.Smoke.Dialog.removeCallBack = (v)=>{
// this.Smoke.flyTo()
// this.Smoke.edit(true)
// }
// this.Smoke.flyTo()
// this.Smoke.edit(true)
// console.log(this.Flame)
}
}
})
</script>