Files
sdk4_demo/example/添加电子围墙.html

53 lines
1.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.98/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()
this.createEarth()
},
methods: {
async createEarth() {
this.sdk = new YJ.YJEarth("app")
let Draw = new YJ.Draw.DrawPolyline(this.sdk)
Draw.start((a, positions) => {
let WallStereoscopic = new YJ.Obj.WallStereoscopic(this.sdk, {
id: '1111111111111111111',
color: "#ffffff",
positions: positions,
material: 2,
duration: 2000,
})
WallStereoscopic.edit(true)
window.WallStereoscopic = WallStereoscopic
})
}
}
})
</script>