【问题标题】:Trouble casting shadows in three.js在three.js中投射阴影的问题
【发布时间】:2015-01-01 01:33:19
【问题描述】:

小提琴: http://jsfiddle.net/8Lhz0kpc/2/

我尝试按照我在教程中看到的内容来获得阴影,但似乎没有任何设置有效。

我的对象设置为投射和接收阴影

@cube.castShadow = true
@cube.receiveShadow = true

地板设置为接收阴影

@floor.castShadow = false
@floor.receiveShadow = true

在我拥有的灯光下

@spotLight.castShadow = true

@spotLight.shadowMapWidth = 1024
@spotLight.shadowMapHeight = 1024

@spotLight.shadowCameraNear = 50
@spotLight.shadowCameraFar = 800
@spotLight.shadowCameraFov = 30
@spotLight.shadowDarkness = 0.5

@spotLight.shadowCameraVisible = true

不知道从哪里开始,可能是我错过了一些简单的事情?

【问题讨论】:

    标签: javascript coffeescript three.js


    【解决方案1】:

    你写了sphere.recieveShadow :)

    【讨论】:

    • 只花了一个小时^^
    • 就是这样!奇怪的是,这如何导致其余对象也没有投射/接收阴影。
    猜你喜欢
    • 1970-01-01
    • 2016-06-21
    • 1970-01-01
    • 2013-08-03
    • 1970-01-01
    • 1970-01-01
    • 2017-12-12
    • 1970-01-01
    相关资源
    最近更新 更多