File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,6 +168,12 @@ CanvasRenderer.prototype = {
168168
169169 // If the alpha or blend mode didn't change since the last render, then don't set them again (saves 2 ops)
170170
171+ if ( ! camera . transparent )
172+ {
173+ ctx . fillStyle = camera . backgroundColor . rgba ;
174+ ctx . fillRect ( 0 , 0 , camera . width , camera . height ) ;
175+ }
176+
171177 if ( this . currentAlpha !== 1 )
172178 {
173179 ctx . globalAlpha = 1 ;
@@ -182,20 +188,6 @@ CanvasRenderer.prototype = {
182188
183189 this . currentScaleMode = 0 ;
184190
185- if ( settings . renderToTexture )
186- {
187- if ( settings . clearBeforeRender )
188- {
189- ctx . clearRect ( 0 , 0 , w , h ) ;
190- }
191-
192- if ( settings . backgroundColor )
193- {
194- ctx . fillStyle = settings . backgroundColor ;
195- ctx . fillRect ( 0 , 0 , w , h ) ;
196- }
197- }
198-
199191 this . drawCount += list . length ;
200192
201193 if ( scissor )
You can’t perform that action at this time.
0 commit comments