我正在尝试更新光源阴影可见度的宽度和高度,但我不会出现什么,无论我多少没有扭曲的东西都不会改变
if(object.shadowCameraLeft !== undefined) {
methods.opValI(9,{name:'Sh Cam Left',value:object.shadowCameraLeft,step:10,fix:'2'},op,function(v){
object.shadowCameraLeft = v; // Trying to change
});
}
if(object.shadowCameraRight !== undefined) {
methods.opValI(9,{name:'Sh Cam Right',value:object.shadowCameraRight,step:10,fix:'2'},op,function(v){
object.shadowCameraRight = v; // Trying to change
});
}
object.shadowCameraLeft = v; // Trying to change
object.shadowCameraRight = v; // Trying to change
如何更改shadowCamera的大小?
答案 0 :(得分:1)
以下是动态更新阴影相机的模式:
light.shadow.camera.left = - 100;
light.shadow.camera.updateProjectionMatrix(); // important!
three.js r.73