59 lines
1.1 KiB
HTML
59 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,
|
||
|
PolylineObject: null
|
||
|
},
|
||
|
async mounted() {
|
||
|
await YJ.on()
|
||
|
this.createEarth()
|
||
|
},
|
||
|
methods: {
|
||
|
createEarth() {
|
||
|
this.sdk = new YJ.YJEarth("app")
|
||
|
new YJ.Global.openRightClick(this.sdk)
|
||
|
let Draw = new YJ.Draw.DrawPoint(this.sdk)
|
||
|
Draw.start(async (a, positions) => {
|
||
|
let Model = await new YJ.Obj.Model(this.sdk, {
|
||
|
name: 'cccc',
|
||
|
show: true,
|
||
|
url: "model/tank.glb",
|
||
|
positions: positions,
|
||
|
scale: 10,
|
||
|
})
|
||
|
|
||
|
Model.picking = true
|
||
|
Model.onRightClick = (a,b,c)=>{
|
||
|
Model.edit(true)
|
||
|
}
|
||
|
Model.flyTo()
|
||
|
})
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
</script>
|