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 00:59:06 +01:00
parent 42386a572d
commit 2905873128

View File

@ -9,6 +9,7 @@ export default {
props: { props: {
width: { type: Number, default: 10 }, width: { type: Number, default: 10 },
height: { type: Number, default: 10 }, height: { type: Number, default: 10 },
helper: Boolean,
}, },
created() { created() {
RectAreaLightUniformsLib.init(); RectAreaLightUniformsLib.init();
@ -20,7 +21,7 @@ export default {
}); });
}); });
this.$parent.add(new RectAreaLightHelper(this.light)); if (this.helper) this.$parent.add(new RectAreaLightHelper(this.light));
this.initLight(); this.initLight();
}, },
__hmrId: 'RectAreaLight', __hmrId: 'RectAreaLight',