给定一个包含多个光源的场景,仅在其中一个灯光上禁用投射阴影将导致渲染器崩溃。
堆栈跟踪:
three.js:16521 Uncaught TypeError: Cannot read property 'toArray' of undefined
at flatten (three.js:16521)
at PureArrayUniform.setValueM4Array [as setValue] (three.js:16999)
at Function.WebGLUniforms.upload (three.js:17248)
at setProgram (three.js:25307)
at WebGLRenderer.renderBufferDirect (three.js:24041)
at renderObject (three.js:24802)
at renderObjects (three.js:24772)
at WebGLRenderer.render (three.js:24549)
at render ((index):111)
从版本r108开始出现此问题。 在r107中,不会发生此问题。
例子:
https://jsfiddle.net/pbkx9mwg/正在使用r109运行,并且此版本确实发生崩溃。
但是,它在使用最新dev :+1的https://jsfiddle.net/ewhgdyk4/1/上确实可以正常工作。
谢谢@ Mugen87 !
我很高兴这个问题已经解决:sweat_smile: