From 6fb490223ef97707fa4c465ae478c5f415ee6661 Mon Sep 17 00:00:00 2001 From: JI0PATA Date: Wed, 27 Sep 2023 17:17:43 +0300 Subject: [PATCH] Fix area of shadows --- src/App.jsx | 12 ++++++++++-- src/cubes.json | 12 ++++++------ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/App.jsx b/src/App.jsx index 43d9e8c..28c5eaa 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -5,6 +5,8 @@ import {Player} from "./Player.jsx"; import {Cubes} from "./Cube.jsx"; import {WeaponModel} from "./WeaponModel.jsx"; +const shadowOffset = 50; + export const App = () => { return ( <> @@ -13,8 +15,14 @@ export const App = () => { + intensity={1.5} + shadow-mapSize={4096} + shadow-camera-top={shadowOffset} + shadow-camera-bottom={-shadowOffset} + shadow-camera-left={shadowOffset} + shadow-camera-right={-shadowOffset} + position={[100, 100, 0]} + /> diff --git a/src/cubes.json b/src/cubes.json index c4869d4..04785e1 100644 --- a/src/cubes.json +++ b/src/cubes.json @@ -1,8 +1,8 @@ [ - [0, 0, -5], - [2, 0, -5], - [4, 0, -5], - [6, 0, -5], - [8, 0, -5], - [10, 0, -5] + [0, 0, -7], + [2, 0, -7], + [4, 0, -7], + [6, 0, -7], + [8, 0, -7], + [10, 0, -7] ] \ No newline at end of file