1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 12:22:03 +08:00
trois/src/materials/LambertMaterial.js
2021-04-04 20:42:35 +02:00

21 lines
533 B
JavaScript

import { defineComponent } from 'vue';
import { MeshLambertMaterial } from 'three';
import { bindProps, propsValues } from '../tools';
import Material, { wireframeProps } from './Material';
export default defineComponent({
extends: Material,
props: {
...wireframeProps,
},
methods: {
createMaterial() {
this.material = new MeshLambertMaterial(propsValues(this.$props));
},
addWatchers() {
bindProps(this, Object.keys(wireframeProps), this.material);
},
},
__hmrId: 'LambertMaterial',
});