<script setup lang="ts">
import { onMounted, inject } from 'vue'
const __sdk: any = inject('__sdk')
const onSave = () => {
  __sdk.WalkManager.edit.save((data: any, confirm: any) => {
    console.log(data)
    confirm()
  })
}
onMounted(() => {
  __sdk.Scene.on('loaded', () => {
    __sdk.Scene.hideFloorCadImage()
    __sdk.WalkManager.edit.enter()
  })
  __sdk.mount('#scene').render()
})
</script>

<template>
  <div id="tools">
    <button @click="onSave">保存</button>
  </div>
  <div id="scene"></div>
</template>

<style scoped>
#tools {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 1000;
}
#scene {
  width: 100%;
  height: 100vh;
}
</style>
