From 1fa322e91ac0eff2388218d626b993d14b95b0b7 Mon Sep 17 00:00:00 2001 From: Kevin Levron Date: Tue, 15 Sep 2020 11:55:00 +0200 Subject: [PATCH] improve shadow --- src/components/Test2.vue | 4 ++-- src/lights/Light.js | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/Test2.vue b/src/components/Test2.vue index a3c496b..a83eded 100644 --- a/src/components/Test2.vue +++ b/src/components/Test2.vue @@ -5,8 +5,8 @@ - - + + diff --git a/src/lights/Light.js b/src/lights/Light.js index 9ea9223..8d525df 100644 --- a/src/lights/Light.js +++ b/src/lights/Light.js @@ -15,11 +15,15 @@ export default { type: Boolean, default: false, }, + shadowMapSize: Object, position: Object, }, mounted() { setFromProp(this.light.position, this.position); + this.light.castShadow = this.castShadow; + setFromProp(this.light.shadow.mapSize, this.shadowMapSize); + this.scene.add(this.light); if (this.light.target) this.scene.add(this.light.target); },