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

26 lines
451 B
JavaScript
Raw Normal View History

2020-09-17 16:16:02 +08:00
import { ShaderMaterial } from 'three';
export default {
inject: ['three'],
props: {
id: String,
uniforms: Object,
vertexShader: String,
fragmentShader: String,
},
mounted() {
if (!this.material) {
// this.material = new ShaderMaterial(this.$props);
}
this.three.materials[this.id] = this.material;
},
unmounted() {
this.material.dispose();
},
methods: {
},
render() {
return [];
},
};