I have a problem with my Three.js script. I have this scene,
but as soon as I enable shadows (uncomment spot.castShadow=true;) it gets to this:
I’m not sure where in my code is the problem, but I think it is something obviously.
Btw: Other Three.js examples with shadow work, so it’s not a generally problem of my gpu, and there is no console output.
You have a lot of mistakes in your fiddle. Please see the three.js examples for how to add a
rendererto the DOM correctly.Also, you need to experiment until you understand how rotations work in three.js.
And you need to set your shadow camera
nearandfar planescorrectly.Here is an updated fiddle: http://jsfiddle.net/Rhtr2/58/
Yikes! Fiddle Version 58! Read the jsfiddle FAQ. You do not need to “update” your fiddle to run it.