1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 04:12:02 +08:00

add toon material

This commit is contained in:
Kevin Levron 2020-10-03 22:32:27 +02:00
parent 4505bb7922
commit d52616f4b0
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,13 @@
import { MeshToonMaterial } from 'three';
import { propsValues } from '../tools.js';
import Material from './Material';
export default {
extends: Material,
methods: {
createMaterial() {
this.material = new MeshToonMaterial(propsValues(this.$props, ['id']));
},
},
__hmrId: 'ToonMaterial',
};

View File

@ -4,3 +4,4 @@ export { default as PhongMaterial } from './PhongMaterial.js';
export { default as PhysicalMaterial } from './PhysicalMaterial.js'; export { default as PhysicalMaterial } from './PhysicalMaterial.js';
export { default as StandardMaterial } from './StandardMaterial.js'; export { default as StandardMaterial } from './StandardMaterial.js';
export { default as SubSurfaceMaterial } from './SubSurfaceMaterial.js'; export { default as SubSurfaceMaterial } from './SubSurfaceMaterial.js';
export { default as ToonMaterial } from './ToonMaterial.js';

View File

@ -36,6 +36,7 @@ export const TroisJSVuePlugin = {
'ShaderMaterial', 'ShaderMaterial',
'StandardMaterial', 'StandardMaterial',
'SubSurfaceMaterial', 'SubSurfaceMaterial',
'ToonMaterial',
'Box', 'Box',
'Circle', 'Circle',