51 lines
1.0 KiB
HTML
51 lines
1.0 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: {
|
||
|
},
|
||
|
async mounted() {
|
||
|
await YJ.on()
|
||
|
this.createEarth()
|
||
|
},
|
||
|
methods: {
|
||
|
async createEarth() {
|
||
|
window.sdk = await new YJ.YJEarth("app")
|
||
|
let openLeftClick = await new YJ.Global.openLeftClick(sdk)
|
||
|
let Draw = new YJ.Draw.DrawAssemble(sdk)
|
||
|
Draw.start((a, positions) => {
|
||
|
console.log(positions)
|
||
|
let AssembleObject = new YJ.Obj.AssembleObject(sdk, { positions: positions,heightMode: 1 })
|
||
|
AssembleObject.edit(true)
|
||
|
AssembleObject.flyTo()
|
||
|
window.AssembleObject = AssembleObject
|
||
|
AssembleObject.onClick = (a,b,c)=>{
|
||
|
alert(1)
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
</script>
|