mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
improve RectAreaLight
This commit is contained in:
parent
2905873128
commit
123766305e
@ -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',
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user