1
0
mirror of https://github.com/troisjs/trois.git synced 2024-11-24 12:22:03 +08:00
trois/src/materials/Map.js
Kevin Levron 2b441f7cd7 wip
2021-03-06 23:14:22 +01:00

20 lines
349 B
JavaScript

import Texture from './Texture.js';
export default {
extends: Texture,
inject: ['material'],
created() {
this.material.setMap(this.texture);
},
unmounted() {
this.material.setMap(null);
},
methods: {
refreshTexture() {
this.createTexture();
this.material.setMap(this.texture);
},
},
__hmrId: 'Map',
};