阴影在 r72 中不起作用 [英] Shadows not working in r72

查看:26
本文介绍了阴影在 r72 中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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. 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/

这篇关于阴影在 r72 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆