Skip to content

Commit 03ee36f

Browse files
committed
Finished JSDocs
1 parent 3183f1e commit 03ee36f

3 files changed

Lines changed: 78 additions & 46 deletions

File tree

src/renderer/webgl/Utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222
* @param {number} b - Blue component in a range from 0.0 to 1.0
2323
* @param {number} a - Alpha component in a range from 0.0 to 1.0
2424
*
25-
* @return {number} [description]
25+
* @return {number} The packed RGBA values as a Uint32.
2626
*/
2727
getTintFromFloats: function (r, g, b, a)
2828
{

src/renderer/webgl/WebGLRenderer.js

Lines changed: 70 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -2547,14 +2547,16 @@ var WebGLRenderer = new Class({
25472547
},
25482548

25492549
/**
2550-
* [description]
2550+
* Sets a 1f uniform value on the given shader.
2551+
*
2552+
* If the shader is not currently active, it is made active first.
25512553
*
25522554
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1
25532555
* @since 3.0.0
25542556
*
25552557
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
25562558
* @param {string} name - The name of the uniform to look-up and modify.
2557-
* @param {number} x - [description]
2559+
* @param {number} x - The 1f value to set on the named uniform.
25582560
*
25592561
* @return {this} This WebGL Renderer instance.
25602562
*/
@@ -2568,15 +2570,17 @@ var WebGLRenderer = new Class({
25682570
},
25692571

25702572
/**
2571-
* [description]
2573+
* Sets the 2f uniform values on the given shader.
2574+
*
2575+
* If the shader is not currently active, it is made active first.
25722576
*
25732577
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2
25742578
* @since 3.0.0
25752579
*
25762580
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
25772581
* @param {string} name - The name of the uniform to look-up and modify.
2578-
* @param {number} x - [description]
2579-
* @param {number} y - [description]
2582+
* @param {number} x - The 2f x value to set on the named uniform.
2583+
* @param {number} y - The 2f y value to set on the named uniform.
25802584
*
25812585
* @return {this} This WebGL Renderer instance.
25822586
*/
@@ -2590,16 +2594,18 @@ var WebGLRenderer = new Class({
25902594
},
25912595

25922596
/**
2593-
* [description]
2597+
* Sets the 3f uniform values on the given shader.
2598+
*
2599+
* If the shader is not currently active, it is made active first.
25942600
*
25952601
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3
25962602
* @since 3.0.0
25972603
*
25982604
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
25992605
* @param {string} name - The name of the uniform to look-up and modify.
2600-
* @param {number} x - [description]
2601-
* @param {number} y - [description]
2602-
* @param {number} z - [description]
2606+
* @param {number} x - The 3f x value to set on the named uniform.
2607+
* @param {number} y - The 3f y value to set on the named uniform.
2608+
* @param {number} z - The 3f z value to set on the named uniform.
26032609
*
26042610
* @return {this} This WebGL Renderer instance.
26052611
*/
@@ -2613,17 +2619,19 @@ var WebGLRenderer = new Class({
26132619
},
26142620

26152621
/**
2616-
* Sets uniform of a WebGLProgram
2622+
* Sets the 4f uniform values on the given shader.
2623+
*
2624+
* If the shader is not currently active, it is made active first.
26172625
*
26182626
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4
26192627
* @since 3.0.0
26202628
*
26212629
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
26222630
* @param {string} name - The name of the uniform to look-up and modify.
2623-
* @param {number} x - X component
2624-
* @param {number} y - Y component
2625-
* @param {number} z - Z component
2626-
* @param {number} w - W component
2631+
* @param {number} x - The 4f x value to set on the named uniform.
2632+
* @param {number} y - The 4f y value to set on the named uniform.
2633+
* @param {number} z - The 4f z value to set on the named uniform.
2634+
* @param {number} w - The 4f w value to set on the named uniform.
26272635
*
26282636
* @return {this} This WebGL Renderer instance.
26292637
*/
@@ -2637,7 +2645,9 @@ var WebGLRenderer = new Class({
26372645
},
26382646

26392647
/**
2640-
* Sets the value of a uniform variable in the given WebGLProgram.
2648+
* Sets the value of a 1fv uniform variable in the given WebGLProgram.
2649+
*
2650+
* If the shader is not currently active, it is made active first.
26412651
*
26422652
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1v
26432653
* @since 3.13.0
@@ -2658,7 +2668,9 @@ var WebGLRenderer = new Class({
26582668
},
26592669

26602670
/**
2661-
* Sets the value of a uniform variable in the given WebGLProgram.
2671+
* Sets the value of a 2fv uniform variable in the given WebGLProgram.
2672+
*
2673+
* If the shader is not currently active, it is made active first.
26622674
*
26632675
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2v
26642676
* @since 3.13.0
@@ -2679,7 +2691,9 @@ var WebGLRenderer = new Class({
26792691
},
26802692

26812693
/**
2682-
* Sets the value of a uniform variable in the given WebGLProgram.
2694+
* Sets the value of a 3fv uniform variable in the given WebGLProgram.
2695+
*
2696+
* If the shader is not currently active, it is made active first.
26832697
*
26842698
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3v
26852699
* @since 3.13.0
@@ -2700,7 +2714,9 @@ var WebGLRenderer = new Class({
27002714
},
27012715

27022716
/**
2703-
* Sets the value of a uniform variable in the given WebGLProgram.
2717+
* Sets the value of a 4fv uniform variable in the given WebGLProgram.
2718+
*
2719+
* If the shader is not currently active, it is made active first.
27042720
*
27052721
* @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4v
27062722
* @since 3.13.0
@@ -2722,14 +2738,16 @@ var WebGLRenderer = new Class({
27222738
},
27232739

27242740
/**
2725-
* Sets the value of a uniform variable in the given WebGLProgram.
2741+
* Sets a 1i uniform value on the given shader.
2742+
*
2743+
* If the shader is not currently active, it is made active first.
27262744
*
27272745
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1
27282746
* @since 3.0.0
27292747
*
27302748
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
27312749
* @param {string} name - The name of the uniform to look-up and modify.
2732-
* @param {integer} x - [description]
2750+
* @param {integer} x - The 1i value to set on the named uniform.
27332751
*
27342752
* @return {this} This WebGL Renderer instance.
27352753
*/
@@ -2743,15 +2761,17 @@ var WebGLRenderer = new Class({
27432761
},
27442762

27452763
/**
2746-
* Sets the value of a uniform variable in the given WebGLProgram.
2764+
* Sets the 2i uniform values on the given shader.
2765+
*
2766+
* If the shader is not currently active, it is made active first.
27472767
*
27482768
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt2
27492769
* @since 3.0.0
27502770
*
27512771
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
27522772
* @param {string} name - The name of the uniform to look-up and modify.
2753-
* @param {integer} x - The new X component
2754-
* @param {integer} y - The new Y component
2773+
* @param {integer} x - The 2i x value to set on the named uniform.
2774+
* @param {integer} y - The 2i y value to set on the named uniform.
27552775
*
27562776
* @return {this} This WebGL Renderer instance.
27572777
*/
@@ -2765,16 +2785,18 @@ var WebGLRenderer = new Class({
27652785
},
27662786

27672787
/**
2768-
* Sets the value of a uniform variable in the given WebGLProgram.
2788+
* Sets the 3i uniform values on the given shader.
2789+
*
2790+
* If the shader is not currently active, it is made active first.
27692791
*
27702792
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt3
27712793
* @since 3.0.0
27722794
*
27732795
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
27742796
* @param {string} name - The name of the uniform to look-up and modify.
2775-
* @param {integer} x - The new X component
2776-
* @param {integer} y - The new Y component
2777-
* @param {integer} z - The new Z component
2797+
* @param {integer} x - The 3i x value to set on the named uniform.
2798+
* @param {integer} y - The 3i y value to set on the named uniform.
2799+
* @param {integer} z - The 3i z value to set on the named uniform.
27782800
*
27792801
* @return {this} This WebGL Renderer instance.
27802802
*/
@@ -2788,17 +2810,19 @@ var WebGLRenderer = new Class({
27882810
},
27892811

27902812
/**
2791-
* Sets the value of a uniform variable in the given WebGLProgram.
2813+
* Sets the 4i uniform values on the given shader.
2814+
*
2815+
* If the shader is not currently active, it is made active first.
27922816
*
27932817
* @method Phaser.Renderer.WebGL.WebGLRenderer#setInt4
27942818
* @since 3.0.0
27952819
*
27962820
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
27972821
* @param {string} name - The name of the uniform to look-up and modify.
2798-
* @param {integer} x - X component
2799-
* @param {integer} y - Y component
2800-
* @param {integer} z - Z component
2801-
* @param {integer} w - W component
2822+
* @param {integer} x - The 4i x value to set on the named uniform.
2823+
* @param {integer} y - The 4i y value to set on the named uniform.
2824+
* @param {integer} z - The 4i z value to set on the named uniform.
2825+
* @param {integer} w - The 4i w value to set on the named uniform.
28022826
*
28032827
* @return {this} This WebGL Renderer instance.
28042828
*/
@@ -2812,15 +2836,17 @@ var WebGLRenderer = new Class({
28122836
},
28132837

28142838
/**
2815-
* Sets the value of a 2x2 matrix uniform variable in the given WebGLProgram.
2839+
* Sets the value of a matrix 2fv uniform variable in the given WebGLProgram.
2840+
*
2841+
* If the shader is not currently active, it is made active first.
28162842
*
28172843
* @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix2
28182844
* @since 3.0.0
28192845
*
28202846
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
28212847
* @param {string} name - The name of the uniform to look-up and modify.
28222848
* @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.
2823-
* @param {Float32Array} matrix - The new matrix value.
2849+
* @param {Float32Array} matrix - A Float32Array or sequence of 4 float values.
28242850
*
28252851
* @return {this} This WebGL Renderer instance.
28262852
*/
@@ -2834,15 +2860,17 @@ var WebGLRenderer = new Class({
28342860
},
28352861

28362862
/**
2837-
* [description]
2863+
* Sets the value of a matrix 3fv uniform variable in the given WebGLProgram.
2864+
*
2865+
* If the shader is not currently active, it is made active first.
28382866
*
28392867
* @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix3
28402868
* @since 3.0.0
28412869
*
28422870
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
28432871
* @param {string} name - The name of the uniform to look-up and modify.
2844-
* @param {boolean} transpose - [description]
2845-
* @param {Float32Array} matrix - [description]
2872+
* @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.
2873+
* @param {Float32Array} matrix - A Float32Array or sequence of 9 float values.
28462874
*
28472875
* @return {this} This WebGL Renderer instance.
28482876
*/
@@ -2856,15 +2884,17 @@ var WebGLRenderer = new Class({
28562884
},
28572885

28582886
/**
2859-
* Sets uniform of a WebGLProgram
2887+
* Sets the value of a matrix 4fv uniform variable in the given WebGLProgram.
2888+
*
2889+
* If the shader is not currently active, it is made active first.
28602890
*
28612891
* @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix4
28622892
* @since 3.0.0
28632893
*
28642894
* @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.
28652895
* @param {string} name - The name of the uniform to look-up and modify.
2866-
* @param {boolean} transpose - Is the matrix transposed
2867-
* @param {Float32Array} matrix - Matrix data
2896+
* @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.
2897+
* @param {Float32Array} matrix - A Float32Array or sequence of 16 float values.
28682898
*
28692899
* @return {this} This WebGL Renderer instance.
28702900
*/

src/renderer/webgl/pipelines/BitmapMaskPipeline.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,21 +126,23 @@ var BitmapMaskPipeline = new Class({
126126
},
127127

128128
/**
129-
* [description]
129+
* Resizes this pipeline and updates the projection.
130130
*
131131
* @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize
132132
* @since 3.0.0
133133
*
134-
* @param {number} width - [description]
135-
* @param {number} height - [description]
136-
* @param {number} resolution - [description]
134+
* @param {number} width - The new width.
135+
* @param {number} height - The new height.
136+
* @param {number} resolution - The resolution.
137137
*
138138
* @return {this} This WebGLPipeline instance.
139139
*/
140140
resize: function (width, height, resolution)
141141
{
142142
WebGLPipeline.prototype.resize.call(this, width, height, resolution);
143+
143144
this.resolutionDirty = true;
145+
144146
return this;
145147
},
146148

@@ -153,7 +155,7 @@ var BitmapMaskPipeline = new Class({
153155
*
154156
* @param {Phaser.GameObjects.GameObject} mask - GameObject used as mask.
155157
* @param {Phaser.GameObjects.GameObject} maskedObject - GameObject masked by the mask GameObject.
156-
* @param {Phaser.Cameras.Scene2D.Camera} camera - [description]
158+
* @param {Phaser.Cameras.Scene2D.Camera} camera - The camera rendering the current mask.
157159
*/
158160
beginMask: function (mask, maskedObject, camera)
159161
{

0 commit comments

Comments
 (0)