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

CanvasRenderer: Set blending to normal when rendering background.

上级 e3ac022e
......@@ -276,8 +276,8 @@ THREE.CanvasRenderer = function ( parameters ) {
if ( _clearAlpha > 0 ) {
setBlending( THREE.NormalBlending );
setOpacity( 1 );
setBlending( THREE.NormalBlending );
setFillStyle( 'rgba(' + Math.floor( _clearColor.r * 255 ) + ',' + Math.floor( _clearColor.g * 255 ) + ',' + Math.floor( _clearColor.b * 255 ) + ',' + _clearAlpha + ')' );
......@@ -315,7 +315,10 @@ THREE.CanvasRenderer = function ( parameters ) {
if ( background && background.isColor ) {
setFillStyle( 'rgb(' + Math.floor( background.r * 255 ) + ',' + Math.floor( background.g * 255 ) + ',' + Math.floor( background.b * 255 ) + ')' );
setOpacity( 1 );
setBlending( THREE.NormalBlending );
setFillStyle( background.getStyle() );
_context.fillRect( 0, 0, _canvasWidth, _canvasHeight );
} else if ( this.autoClear === true ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册