提交 c859257c 编写于 作者: M Mr.doob

LightShadow: Added autoUpdate and needsUpdate.

上级 6bb845f8
......@@ -22,6 +22,9 @@ function LightShadow( camera ) {
this.mapPass = null;
this.matrix = new Matrix4();
this.autoUpdate = true;
this.needsUpdate = false;
this._frustum = new Frustum();
this._frameExtents = new Vector2( 1, 1 );
......
......@@ -102,6 +102,8 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
const light = lights[ i ];
const shadow = light.shadow;
if ( shadow.autoUpdate === false && shadow.needsUpdate === false ) continue;
if ( shadow === undefined ) {
console.warn( 'THREE.WebGLShadowMap:', light, 'has no shadow.' );
......@@ -195,6 +197,8 @@ function WebGLShadowMap( _renderer, _objects, maxTextureSize ) {
}
shadow.needsUpdate = false;
}
scope.needsUpdate = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册