Hey there,
I grow a bit desperate (again) trying to set up a Sunlight in my scene that casts shadows… simple shadows… looking at what is possible nowadays I thought this should be a no brainer.
So I set up a directional light and it, unfortunatly did not, what I wanted.
I set a target to the light, an empty in my scene, but there only very fuzzy shadows on very small part of the map…
Is there an addon, or so, any way to just add a Sun and it casts shadows everywhere… something like this?
Here is the Code I used for the light:
const directionalLight = new THREE.DirectionalLight( 0xffffff, 0.5 );
directionalLight.castShadow = true
directionalLight.shadow.mapSize.width = 512; // default
directionalLight.shadow.mapSize.height = 512; // default
directionalLight.shadow.camera.near = 0.5; // default
directionalLight.shadow.camera.far = 500; // default
scene.add( directionalLight );
This is what it looks in my scene: