55 lines
1.1 KiB
HTML
55 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Title</title>
|
|
<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,
|
|
Flame: null
|
|
},
|
|
async mounted() {
|
|
await YJ.on()
|
|
this.createEarth()
|
|
this.addFlame()
|
|
},
|
|
methods: {
|
|
createEarth() {
|
|
this.sdk = new YJ.YJEarth("app")
|
|
},
|
|
|
|
addFlame() {
|
|
this.Flame = new YJ.Obj.Flame(this.sdk, {
|
|
show: false,
|
|
lng: 108.41644787649406,
|
|
lat: 30.504273203989644,
|
|
alt: 10
|
|
})
|
|
this.Flame.edit(true)
|
|
this.Flame.flyTo()
|
|
console.log(this.Flame)
|
|
}
|
|
}
|
|
})
|
|
</script> |