File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ class RenderWebGL extends EventEmitter {
123123 try {
124124 optCanvas = optCanvas || document . createElement ( 'canvas' ) ;
125125 const options = {
126- alpha : false ,
126+ alpha : true ,
127127 stencil : true ,
128128 antialias : false ,
129129 powerPreference : RenderWebGL . powerPreference
@@ -148,7 +148,7 @@ class RenderWebGL extends EventEmitter {
148148 */
149149 static _getContext ( canvas ) {
150150 const contextAttribs = {
151- alpha : false ,
151+ alpha : true ,
152152 stencil : true ,
153153 antialias : false ,
154154 powerPreference : RenderWebGL . powerPreference
@@ -417,13 +417,15 @@ class RenderWebGL extends EventEmitter {
417417 * @param {number } red The red component for the background.
418418 * @param {number } green The green component for the background.
419419 * @param {number } blue The blue component for the background.
420+ * @param {number } alpha The alpha component for the background.
420421 */
421- setBackgroundColor ( red , green , blue ) {
422+ setBackgroundColor ( red , green , blue , alpha = 1 ) {
422423 this . dirty = true ;
423424
424425 this . _backgroundColor4f [ 0 ] = red ;
425426 this . _backgroundColor4f [ 1 ] = green ;
426427 this . _backgroundColor4f [ 2 ] = blue ;
428+ this . _backgroundColor4f [ 3 ] = alpha ;
427429
428430 this . _backgroundColor3b [ 0 ] = red * 255 ;
429431 this . _backgroundColor3b [ 1 ] = green * 255 ;
You can’t perform that action at this time.
0 commit comments