You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

33 lines
784 B

import * as THREE from 'three'
import { defineComponent, type PropType } from 'vue'
import type Viewport from '@/core/engine/Viewport'
import EventBus from '@/runtime/EventBus'
export default defineComponent({
props: {
prop: Object as PropType<any>,
viewport: Object as PropType<Viewport>
},
mounted() {
EventBus.on('selectedObjectChanged', (data) => {
//@ts-ignore
if (typeof this.refreshValue === 'function') {
//@ts-ignore
this.refreshValue()
}
})
this.$nextTick(() => {
//@ts-ignore
if (typeof this.refreshValue === 'function') {
//@ts-ignore
this.refreshValue()
}
})
},
computed: {
object3D(): THREE.Object3D {
return this.viewport.state.selectedObject
}
}
})