File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ var Shader = new Class({
2525
2626 function Shader ( key , fragmentSrc , vertexSrc , uniforms )
2727 {
28- if ( fragmentSrc === undefined )
28+ if ( ! fragmentSrc || fragmentSrc === '' )
2929 {
3030 fragmentSrc = [
3131 'precision mediump float;' ,
@@ -41,7 +41,7 @@ var Shader = new Class({
4141 ] . join ( '\n' ) ;
4242 }
4343
44- if ( vertexSrc === undefined )
44+ if ( ! vertexSrc || vertexSrc === '' )
4545 {
4646 vertexSrc = [
4747 'precision mediump float;' ,
@@ -60,7 +60,7 @@ var Shader = new Class({
6060 ] . join ( '\n' ) ;
6161 }
6262
63- if ( uniforms === undefined ) { uniforms = { } ; }
63+ if ( uniforms === undefined ) { uniforms = null ; }
6464
6565 /**
6666 * The key of this shader, unique within the shader cache of this Phaser game instance.
@@ -93,7 +93,7 @@ var Shader = new Class({
9393 * The default uniforms for this shader.
9494 *
9595 * @name Phaser.Display.Shader#uniforms
96- * @type {any }
96+ * @type {? any }
9797 * @since 3.17.0
9898 */
9999 this . uniforms = uniforms ;
You can’t perform that action at this time.
0 commit comments