mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 12:22:03 +08:00
21 lines
387 B
JavaScript
21 lines
387 B
JavaScript
export default {
|
|
inject: ['three', 'mesh'],
|
|
props: {
|
|
uniforms: Object,
|
|
vertexShader: String,
|
|
fragmentShader: String,
|
|
},
|
|
created() {
|
|
this.createMaterial();
|
|
this.mesh.setMaterial(this.material);
|
|
if (this.addWatchers) this.addWatchers();
|
|
},
|
|
unmounted() {
|
|
this.material.dispose();
|
|
},
|
|
render() {
|
|
return [];
|
|
},
|
|
__hmrId: 'ShaderMaterial',
|
|
};
|