This commit is contained in:
zh
2025-07-03 15:12:58 +08:00
parent 17d900dcf9
commit fd55e022ae
2395 changed files with 510211 additions and 0 deletions

45
example/添加地形.html Normal file
View File

@ -0,0 +1,45 @@
<!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,
},
async mounted() {
await YJ.on()
this.createEarth()
},
methods: {
async createEarth() {
this.sdk = await new YJ.YJEarth("app")
let tileset = await new YJ.Obj.Terrain(this.sdk, {
url: "http://127.0.0.1:8891/yjearth4.0/data/pak/1aa55c41643a44e079c4a6af03fd301c"
// id: "4e764a7d028c5d185389e20c4e44a307",
})
}
}
})
</script>