I have been attempting to utilize three.js spotlight in order to create a shadow effect from a ball mesh with phong material onto a floor mesh, also with phong material. Unfortunately, despite my efforts, the shadow effect does not seem to be working as intended. Here is the code that I have implemented: https://jsfiddle.net/m6t43ob5/1/
After enabling the shadow map using the following line of code:
renderer.shadowMap.Enabled = true;
I ensured that my light source is set up to cast shadows:
spotLight.castShadow = true;
The floor mesh has been configured to receive shadows:
floor.receiveShadow = true;
Similarly, the ball mesh has been prepared to cast shadows:
ball.castShadow = true;
Despite these settings, I am unable to successfully cast the desired shadow effect. I have conducted research and found that others have remedied this issue by enabling the shadowmap value, which I have done, yet the result remains unchanged. Any assistance on this matter would be greatly appreciated!