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

improve RectAreaLight

This commit is contained in:
Kevin Levron 2021-03-07 01:02:32 +01:00
parent 2905873128
commit 123766305e

View File

@ -21,8 +21,15 @@ export default {
});
});
if (this.helper) this.$parent.add(new RectAreaLightHelper(this.light));
if (this.helper) {
this.lightHelper = new RectAreaLightHelper(this.light);
this.$parent.add(this.lightHelper);
}
this.initLight();
},
unmounted() {
if (this.lightHelper) this.$parent.remove(this.lightHelper);
},
__hmrId: 'RectAreaLight',
};