File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -880,22 +880,24 @@ var WebGLRenderer = new Class({
880880 } ,
881881
882882 /**
883- * [description]
883+ * Sets the blend mode to the value given.
884+ *
885+ * If the current blend mode is different from the one given, the pipeline is flushed and the new
886+ * blend mode is enabled.
884887 *
885888 * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlendMode
886889 * @since 3.0.0
887890 *
888- * @param {integer } blendModeId - [description]
891+ * @param {integer } blendModeId - The blend mode to be set. Can be a `BlendModes` const or an integer value.
889892 *
890- * @return {Phaser.Renderer.WebGL.WebGLRenderer } [description]
893+ * @return {boolean } `true` if the blend mode was changed as a result of this call, forcing a flush, otherwise `false`.
891894 */
892895 setBlendMode : function ( blendModeId )
893896 {
894897 var gl = this . gl ;
895898 var blendMode = this . blendModes [ blendModeId ] ;
896899
897- if ( blendModeId !== CONST . BlendModes . SKIP_CHECK &&
898- this . currentBlendMode !== blendModeId )
900+ if ( blendModeId !== CONST . BlendModes . SKIP_CHECK && this . currentBlendMode !== blendModeId )
899901 {
900902 this . flush ( ) ;
901903
@@ -912,9 +914,11 @@ var WebGLRenderer = new Class({
912914 }
913915
914916 this . currentBlendMode = blendModeId ;
917+
918+ return true ;
915919 }
916920
917- return this ;
921+ return false ;
918922 } ,
919923
920924 /**
You can’t perform that action at this time.
0 commit comments