mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 12:22:03 +08:00
20 lines
511 B
TypeScript
20 lines
511 B
TypeScript
import { defineComponent } from 'vue'
|
|
import { MeshBasicMaterial } from 'three'
|
|
import { bindProps, propsValues } from '../tools'
|
|
import Material, { wireframeProps } from './Material'
|
|
|
|
export default defineComponent({
|
|
extends: Material,
|
|
props: {
|
|
...wireframeProps,
|
|
},
|
|
methods: {
|
|
createMaterial() {
|
|
const material = new MeshBasicMaterial(propsValues(this.$props))
|
|
bindProps(this, Object.keys(wireframeProps), material)
|
|
return material
|
|
},
|
|
},
|
|
__hmrId: 'BasicMaterial',
|
|
})
|