1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 20:32:02 +08:00
trois/src/materials/LambertMaterial.js

13 lines
316 B
JavaScript
Raw Normal View History

2020-09-14 22:57:11 +08:00
import { MeshLambertMaterial } from 'three';
2020-10-02 00:22:01 +08:00
import { propsValues } from '../tools.js';
2020-09-14 22:57:11 +08:00
import Material from './Material';
export default {
extends: Material,
2020-10-02 00:22:01 +08:00
setup(props) {
const material = new MeshLambertMaterial(propsValues(props, ['id']));
return { material };
2020-09-14 22:57:11 +08:00
},
2020-09-19 23:00:29 +08:00
__hmrId: 'LambertMaterial',
2020-09-14 22:57:11 +08:00
};