Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: there was a runtime error with clipShadows true while clippingPl…
Browse files Browse the repository at this point in the history
…anes not yet set to an array (mrdoob#24144)

Co-authored-by: Joe Pea <joe@trusktr.io>
2 people authored and abernier committed Sep 16, 2022
1 parent efc213e commit f091dab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderers/webgl/WebGLShadowMap.js
Original file line number Diff line number Diff line change
@@ -242,7 +242,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {

}

if ( ( _renderer.localClippingEnabled && material.clipShadows === true && material.clippingPlanes.length !== 0 ) ||
if ( ( _renderer.localClippingEnabled && material.clipShadows === true && Array.isArray( material.clippingPlanes ) && material.clippingPlanes.length !== 0 ) ||
( material.displacementMap && material.displacementScale !== 0 ) ||
( material.alphaMap && material.alphaTest > 0 ) ) {

0 comments on commit f091dab

Please sign in to comment.