Skip to content

Commit c1d482b

Browse files
committed
Added jsdoc comments to new methods and properties on WebGLPipeline and WebGLRenderer
1 parent 38dc3bb commit c1d482b

6 files changed

Lines changed: 162 additions & 13 deletions

File tree

src/renderer/webgl/WebGLPipeline.js

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,20 @@ var WebGLPipeline = new Class({
198198
this.flushLocked = false;
199199
},
200200

201+
/**
202+
* [description]
203+
*
204+
* @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute
205+
* @since 3.2.0
206+
*
207+
* @param {string} name - [description]
208+
* @param {int} size - [description]
209+
* @param {int} type - [description]
210+
* @param {boolean} normalized - [description]
211+
* @param {int} offset - [description]
212+
*
213+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
214+
*/
201215
addAttribute: function (name, size, type, normalized, offset)
202216
{
203217
this.attributes.push({
@@ -397,69 +411,205 @@ var WebGLPipeline = new Class({
397411
return this;
398412
},
399413

414+
/**
415+
* [description]
416+
*
417+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1
418+
* @since 3.2.0
419+
*
420+
* @param {string} name - [description]
421+
* @param {float} x - [description]
422+
*
423+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
424+
*/
400425
setFloat1: function (name, x)
401426
{
402427
this.renderer.setFloat1(this.program, name, x);
403428
return this;
404429
},
405430

431+
/**
432+
* [description]
433+
*
434+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2
435+
* @since 3.2.0
436+
*
437+
* @param {string} name - [description]
438+
* @param {float} x - [description]
439+
* @param {float} y - [description]
440+
*
441+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
442+
*/
406443
setFloat2: function (name, x, y)
407444
{
408445

409446
this.renderer.setFloat2(this.program, name, x, y);
410447
return this;
411448
},
412449

450+
/**
451+
* [description]
452+
*
453+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3
454+
* @since 3.2.0
455+
*
456+
* @param {string} name - [description]
457+
* @param {float} x - [description]
458+
* @param {float} y - [description]
459+
* @param {float} z - [description]
460+
*
461+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
462+
*/
413463
setFloat3: function (name, x, y, z)
414464
{
415465

416466
this.renderer.setFloat3(this.program, name, x, y, z);
417467
return this;
418468
},
419469

470+
/**
471+
* [description]
472+
*
473+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4
474+
* @since 3.2.0
475+
*
476+
* @param {string} name - [description]
477+
* @param {float} x - [description]
478+
* @param {float} y - [description]
479+
* @param {float} z - [description]
480+
* @param {float} w - [description]
481+
*
482+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
483+
*/
420484
setFloat4: function (name, x, y, z, w)
421485
{
422486

423487
this.renderer.setFloat4(this.program, name, x, y, z, w);
424488
return this;
425489
},
426490

491+
/**
492+
* [description]
493+
*
494+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1
495+
* @since 3.2.0
496+
*
497+
* @param {string} name - [description]
498+
* @param {int} x - [description]
499+
*
500+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
501+
*/
427502
setInt1: function (name, x)
428503
{
429504
this.renderer.setInt1(this.program, name, x);
430505
return this;
431506
},
432507

508+
/**
509+
* [description]
510+
*
511+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2
512+
* @since 3.2.0
513+
*
514+
* @param {string} name - [description]
515+
* @param {int} x - [description]
516+
* @param {int} y - [description]
517+
*
518+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
519+
*/
433520
setInt2: function (name, x, y)
434521
{
435522
this.renderer.setInt2(this.program, name, x, y);
436523
return this;
437524
},
438525

526+
/**
527+
* [description]
528+
*
529+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3
530+
* @since 3.2.0
531+
*
532+
* @param {string} name - [description]
533+
* @param {int} x - [description]
534+
* @param {int} y - [description]
535+
* @param {int} z - [description]
536+
*
537+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
538+
*/
439539
setInt3: function (name, x, y, z)
440540
{
441541
this.renderer.setInt3(this.program, name, x, y, z);
442542
return this;
443543
},
444544

545+
/**
546+
* [description]
547+
*
548+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4
549+
* @since 3.2.0
550+
*
551+
* @param {string} name - [description]
552+
* @param {int} x - [description]
553+
* @param {int} y - [description]
554+
* @param {int} z - [description]
555+
* @param {int} w - [description]
556+
*
557+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
558+
*/
445559
setInt4: function (name, x, y, z, w)
446560
{
447561
this.renderer.setInt4(this.program, name, x, y, z, w);
448562
return this;
449563
},
450564

565+
/**
566+
* [description]
567+
*
568+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2
569+
* @since 3.2.0
570+
*
571+
* @param {string} name - [description]
572+
* @param {boolean} transpose - [description]
573+
* @param {Float32Array} matrix - [description]
574+
*
575+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
576+
*/
451577
setMatrix2: function (name, transpose, matrix)
452578
{
453579
this.renderer.setMatrix2(this.program, name, transpose, matrix);
454580
return this;
455581
},
456582

583+
/**
584+
* [description]
585+
*
586+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3
587+
* @since 3.2.0
588+
*
589+
* @param {string} name - [description]
590+
* @param {boolean} transpose - [description]
591+
* @param {Float32Array} matrix - [description]
592+
*
593+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
594+
*/
457595
setMatrix3: function (name, transpose, matrix)
458596
{
459597
this.renderer.setMatrix3(this.program, name, transpose, matrix);
460598
return this;
461599
},
462600

601+
/**
602+
* [description]
603+
*
604+
* @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4
605+
* @since 3.2.0
606+
*
607+
* @param {string} name - [description]
608+
* @param {boolean} transpose - [description]
609+
* @param {Float32Array} matrix - [description]
610+
*
611+
* @return {Phaser.Renderer.WebGL.WebGLPipeline} [description]
612+
*/
463613
setMatrix4: function (name, transpose, matrix)
464614
{
465615
this.renderer.setMatrix4(this.program, name, transpose, matrix);

src/renderer/webgl/WebGLRenderer.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,14 @@ var WebGLRenderer = new Class({
354354
*/
355355
this.extensions = {};
356356

357+
/**
358+
* [description]
359+
*
360+
* @name Phaser.Renderer.WebGL.WebGLRenderer#glFormats
361+
* @type {array}
362+
* @default []
363+
* @since 3.2.0
364+
*/
357365
this.glFormats = [];
358366

359367
this.init(this.config);

src/renderer/webgl/pipelines/BitmapMaskPipeline.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@ var WebGLPipeline = require('../WebGLPipeline');
1919
* @constructor
2020
* @since 3.0.0
2121
*
22-
* @param {Phaser.Game} game - [description]
23-
* @param {WebGLRenderingContext} gl - [description]
24-
* @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
22+
* @param {object} config - [description]
2523
*/
2624
var BitmapMaskPipeline = new Class({
2725

src/renderer/webgl/pipelines/FlatTintPipeline.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ var pathArray = [];
4444
* @constructor
4545
* @since 3.0.0
4646
*
47-
* @param {Phaser.Game} game - [description]
48-
* @param {WebGLRenderingContext} gl - [description]
49-
* @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
47+
* @param {object} config - [description]
5048
*/
5149
var FlatTintPipeline = new Class({
5250

src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ var LIGHT_COUNT = 10;
2020
* @constructor
2121
* @since 3.0.0
2222
*
23-
* @param {Phaser.Game} game - [description]
24-
* @param {WebGLRenderingContext} gl - [description]
25-
* @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
23+
* @param {object} config - [description]
2624
*/
2725
var ForwardDiffuseLightPipeline = new Class({
2826

src/renderer/webgl/pipelines/TextureTintPipeline.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ var WebGLPipeline = require('../WebGLPipeline');
2121
* @constructor
2222
* @since 3.0.0
2323
*
24-
* @param {Phaser.Game} game - [description]
25-
* @param {WebGLRenderingContext} gl - [description]
26-
* @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
27-
* @param {boolean} overrideFragmentShader - [description]
24+
* @param {object} config - [description]
2825
*/
2926
var TextureTintPipeline = new Class({
3027

0 commit comments

Comments
 (0)