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:
parent
4505bb7922
commit
d52616f4b0
13
src/materials/ToonMaterial.js
Normal file
13
src/materials/ToonMaterial.js
Normal 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',
|
||||
};
|
@ -4,3 +4,4 @@ export { default as PhongMaterial } from './PhongMaterial.js';
|
||||
export { default as PhysicalMaterial } from './PhysicalMaterial.js';
|
||||
export { default as StandardMaterial } from './StandardMaterial.js';
|
||||
export { default as SubSurfaceMaterial } from './SubSurfaceMaterial.js';
|
||||
export { default as ToonMaterial } from './ToonMaterial.js';
|
||||
|
@ -36,6 +36,7 @@ export const TroisJSVuePlugin = {
|
||||
'ShaderMaterial',
|
||||
'StandardMaterial',
|
||||
'SubSurfaceMaterial',
|
||||
'ToonMaterial',
|
||||
|
||||
'Box',
|
||||
'Circle',
|
||||
|
Loading…
Reference in New Issue
Block a user