2222var ContainerWebGLRenderer = function ( renderer , container , camera , parentMatrix )
2323{
2424 var children = container . list ;
25+ var childCount = children . length ;
2526
26- if ( children . length === 0 )
27+ if ( childCount === 0 )
2728 {
2829 return ;
2930 }
@@ -51,14 +52,16 @@ var ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix
5152 renderer . setBlendMode ( 0 ) ;
5253 }
5354
55+ if ( container . forcePipeline )
56+ {
57+ renderer . pipelines . lock ( container . pipeline , container ) ;
58+ }
59+
5460 var alpha = container . alpha ;
5561
5662 var scrollFactorX = container . scrollFactorX ;
5763 var scrollFactorY = container . scrollFactorY ;
5864
59- var list = children ;
60- var childCount = children . length ;
61-
6265 for ( var i = 0 ; i < childCount ; i ++ )
6366 {
6467 var child = children [ i ] ;
@@ -114,7 +117,7 @@ var ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix
114117 renderer . currentType = type ;
115118 }
116119
117- renderer . nextTypeMatch = ( i < childCount - 1 ) ? ( list [ i + 1 ] . type === renderer . currentType ) : false ;
120+ renderer . nextTypeMatch = ( i < childCount - 1 ) ? ( children [ i + 1 ] . type === renderer . currentType ) : false ;
118121
119122 // Set parent values
120123 child . setScrollFactor ( childScrollFactorX * scrollFactorX , childScrollFactorY * scrollFactorY ) ;
@@ -137,6 +140,11 @@ var ContainerWebGLRenderer = function (renderer, container, camera, parentMatrix
137140
138141 renderer . newType = false ;
139142 }
143+
144+ if ( container . forcePipeline )
145+ {
146+ renderer . pipelines . unlock ( ) ;
147+ }
140148} ;
141149
142150module . exports = ContainerWebGLRenderer ;
0 commit comments