Files
sdk4_demo/example/添加站立文字.html

54 lines
1.1 KiB
HTML
Raw Permalink 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="../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: {
async createEarth() {
this.sdk = new YJ.YJEarth("app")
// let tileset = await new YJ.Obj.Terrain(this.sdk, {
// url: "http://localhost:8888/yjearth4.0/data/pak/1aa55c41643a44e079c4a6af03fd301c"
// })
let Draw = new YJ.Draw.DrawPolyline(this.sdk)
Draw.start((a, positions) => {
let WallStereoscopic = new YJ.Obj.StandText(this.sdk, {
positions: positions,
speed: 1
})
WallStereoscopic.edit(true)
WallStereoscopic.flyTo()
})
}
}
})
</script>