In my Three.js setup, I have integrated a simple UI where a checkbox adjusts the receiveShadow
property of an object. Strangely, when I toggle this checkbox during runtime, the changes are not reflected in the scene.
However, if I perform the same action for the castShadow
property, it actually works as expected.
If you need some relevant code snippets, here they are:
renderer.shadowMapEnabled = true;
material.needsUpdate = true;
How can I ensure that toggling the checkbox affects the receiveShadow
property too?