Shadows not working in r72

心已入冬 提交于 2019-12-14 03:22:01

问题


http://jsfiddle.net/8e8mvx09/

I've looked at a few examples of how to implement shadows, but they all seem to use older versions of three.js. Using r72, I'm not able to make a simple example work. (Fiddle attached)

Did I miss something silly or do they work in a different way now?

Maybe something to do with perhaps?

spotlight.shadowCameraNear

回答1:


  1. Add your spotlight to the scene:

scene.add( spotlight );

  1. Increase the shadow Camera far plane because your scene is huge:

spotlight.shadowCameraFar = 600;

  1. Get shadows: http://jsfiddle.net/8e8mvx09/1/



来源:https://stackoverflow.com/questions/32791254/shadows-not-working-in-r72

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!