File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -140,6 +140,13 @@ module.exports = {
140140 *
141141 * @name Phaser.BlendModes.LUMINOSITY
142142 */
143- LUMINOSITY : 16
143+ LUMINOSITY : 16 ,
144+
145+ /**
146+ * Alpha erase blend mode.
147+ *
148+ * @name Phaser.BlendModes.ERASE
149+ */
150+ ERASE : 17
144151
145152} ;
Original file line number Diff line number Diff line change @@ -505,14 +505,15 @@ var WebGLRenderer = new Class({
505505 // Set it back into the Game, so developers can access it from there too
506506 this . game . context = gl ;
507507
508- for ( var i = 0 ; i <= 16 ; i ++ )
508+ for ( var i = 0 ; i <= 17 ; i ++ )
509509 {
510510 this . blendModes . push ( { func : [ gl . ONE , gl . ONE_MINUS_SRC_ALPHA ] , equation : gl . FUNC_ADD } ) ;
511511 }
512512
513513 this . blendModes [ 1 ] . func = [ gl . ONE , gl . DST_ALPHA ] ;
514514 this . blendModes [ 2 ] . func = [ gl . DST_COLOR , gl . ONE_MINUS_SRC_ALPHA ] ;
515515 this . blendModes [ 3 ] . func = [ gl . ONE , gl . ONE_MINUS_SRC_COLOR ] ;
516+ this . blendModes [ 17 ] . func = [ gl . ZERO , gl . ONE_MINUS_SRC_ALPHA ] ;
516517
517518 this . glFormats [ 0 ] = gl . BYTE ;
518519 this . glFormats [ 1 ] = gl . SHORT ;
@@ -1092,7 +1093,7 @@ var WebGLRenderer = new Class({
10921093 */
10931094 removeBlendMode : function ( index )
10941095 {
1095- if ( index > 16 && this . blendModes [ index ] )
1096+ if ( index > 17 && this . blendModes [ index ] )
10961097 {
10971098 this . blendModes . splice ( index , 1 ) ;
10981099 }
You can’t perform that action at this time.
0 commit comments