Skip to content

Commit dab325b

Browse files
committed
added new static constructor for color
1 parent eae6303 commit dab325b

File tree

7 files changed

+326
-30
lines changed

7 files changed

+326
-30
lines changed

docs/Color.html

Lines changed: 271 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ <h3 class="subsection-title">Methods</h3>
378378

379379

380380

381-
<h4 class="name" id=".fromHEX"><span class="type-signature">(static) </span>fromHEX<span class="signature">(hex)</span><span class="type-signature"></span></h4>
381+
<h4 class="name" id=".fromHEX"><span class="type-signature">(static) </span>fromHEX<span class="signature">(hex)</span><span class="type-signature"> &rarr; {<a href="Color.html">Color</a>}</span></h4>
382382

383383

384384

@@ -479,7 +479,7 @@ <h5>Parameters:</h5>
479479

480480
<dt class="tag-source">Source:</dt>
481481
<dd class="tag-source"><ul class="dummy"><li>
482-
<a href="engine.js.html">engine.js</a>, <a href="engine.js.html#line557">line 557</a>
482+
<a href="engine.js.html">engine.js</a>, <a href="engine.js.html#line560">line 560</a>
483483
</li></ul></dd>
484484

485485

@@ -504,6 +504,24 @@ <h5>Parameters:</h5>
504504

505505

506506

507+
<h5>Returns:</h5>
508+
509+
510+
511+
512+
<dl>
513+
<dt>
514+
Type
515+
</dt>
516+
<dd>
517+
518+
<span class="param-type"><a href="Color.html">Color</a></span>
519+
520+
521+
</dd>
522+
</dl>
523+
524+
507525

508526

509527

@@ -515,7 +533,7 @@ <h5>Parameters:</h5>
515533

516534

517535

518-
<h4 class="name" id=".fromHSL"><span class="type-signature">(static) </span>fromHSL<span class="signature">(h, s, l)</span><span class="type-signature"></span></h4>
536+
<h4 class="name" id=".fromHSL"><span class="type-signature">(static) </span>fromHSL<span class="signature">(h, s, l)</span><span class="type-signature"> &rarr; {<a href="Color.html">Color</a>}</span></h4>
519537

520538

521539

@@ -662,7 +680,217 @@ <h5>Parameters:</h5>
662680

663681
<dt class="tag-source">Source:</dt>
664682
<dd class="tag-source"><ul class="dummy"><li>
665-
<a href="engine.js.html">engine.js</a>, <a href="engine.js.html#line537">line 537</a>
683+
<a href="engine.js.html">engine.js</a>, <a href="engine.js.html#line538">line 538</a>
684+
</li></ul></dd>
685+
686+
687+
688+
689+
690+
691+
692+
</dl>
693+
694+
695+
696+
697+
698+
699+
700+
701+
702+
703+
704+
705+
706+
707+
708+
<h5>Returns:</h5>
709+
710+
711+
712+
713+
<dl>
714+
<dt>
715+
Type
716+
</dt>
717+
<dd>
718+
719+
<span class="param-type"><a href="Color.html">Color</a></span>
720+
721+
722+
</dd>
723+
</dl>
724+
725+
726+
727+
728+
729+
730+
731+
732+
733+
734+
735+
736+
737+
<h4 class="name" id=".fromMonochrome"><span class="type-signature">(static) </span>fromMonochrome<span class="signature">(ch, a<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="Color.html">Color</a>}</span></h4>
738+
739+
740+
741+
742+
743+
744+
<div class="description">
745+
Create a monochrome color from a decimal value
746+
</div>
747+
748+
749+
750+
751+
752+
753+
754+
755+
756+
<h5>Parameters:</h5>
757+
758+
759+
<table class="params">
760+
<thead>
761+
<tr>
762+
763+
<th>Name</th>
764+
765+
766+
<th>Type</th>
767+
768+
769+
<th>Attributes</th>
770+
771+
772+
773+
<th>Default</th>
774+
775+
776+
<th class="last">Description</th>
777+
</tr>
778+
</thead>
779+
780+
<tbody>
781+
782+
783+
<tr>
784+
785+
<td class="name"><code>ch</code></td>
786+
787+
788+
<td class="type">
789+
790+
791+
<span class="param-type">number</span>
792+
793+
794+
795+
</td>
796+
797+
798+
<td class="attributes">
799+
800+
801+
802+
803+
804+
</td>
805+
806+
807+
808+
<td class="default">
809+
810+
</td>
811+
812+
813+
<td class="description last">Red, green and blue value in range [0, 255]</td>
814+
</tr>
815+
816+
817+
818+
<tr>
819+
820+
<td class="name"><code>a</code></td>
821+
822+
823+
<td class="type">
824+
825+
826+
<span class="param-type">number</span>
827+
828+
829+
830+
</td>
831+
832+
833+
<td class="attributes">
834+
835+
&lt;optional><br>
836+
837+
838+
839+
840+
841+
</td>
842+
843+
844+
845+
<td class="default">
846+
847+
1
848+
849+
</td>
850+
851+
852+
<td class="description last">Alpha value in range [0, 1], defaults to 1</td>
853+
</tr>
854+
855+
856+
</tbody>
857+
</table>
858+
859+
860+
861+
862+
863+
864+
<dl class="details">
865+
866+
867+
868+
869+
870+
871+
872+
873+
874+
875+
876+
877+
878+
879+
880+
881+
882+
883+
884+
885+
886+
887+
888+
889+
890+
891+
<dt class="tag-source">Source:</dt>
892+
<dd class="tag-source"><ul class="dummy"><li>
893+
<a href="engine.js.html">engine.js</a>, <a href="engine.js.html#line584">line 584</a>
666894
</li></ul></dd>
667895

668896

@@ -687,6 +915,24 @@ <h5>Parameters:</h5>
687915

688916

689917

918+
<h5>Returns:</h5>
919+
920+
921+
922+
923+
<dl>
924+
<dt>
925+
Type
926+
</dt>
927+
<dd>
928+
929+
<span class="param-type"><a href="Color.html">Color</a></span>
930+
931+
932+
</dd>
933+
</dl>
934+
935+
690936

691937

692938

@@ -698,7 +944,7 @@ <h5>Parameters:</h5>
698944

699945

700946

701-
<h4 class="name" id=".fromRGB"><span class="type-signature">(static) </span>fromRGB<span class="signature">(r, g, b)</span><span class="type-signature"></span></h4>
947+
<h4 class="name" id=".fromRGB"><span class="type-signature">(static) </span>fromRGB<span class="signature">(r, g, b)</span><span class="type-signature"> &rarr; {<a href="Color.html">Color</a>}</span></h4>
702948

703949

704950

@@ -845,7 +1091,7 @@ <h5>Parameters:</h5>
8451091

8461092
<dt class="tag-source">Source:</dt>
8471093
<dd class="tag-source"><ul class="dummy"><li>
848-
<a href="engine.js.html">engine.js</a>, <a href="engine.js.html#line548">line 548</a>
1094+
<a href="engine.js.html">engine.js</a>, <a href="engine.js.html#line550">line 550</a>
8491095
</li></ul></dd>
8501096

8511097

@@ -870,6 +1116,24 @@ <h5>Parameters:</h5>
8701116

8711117

8721118

1119+
<h5>Returns:</h5>
1120+
1121+
1122+
1123+
1124+
<dl>
1125+
<dt>
1126+
Type
1127+
</dt>
1128+
<dd>
1129+
1130+
<span class="param-type"><a href="Color.html">Color</a></span>
1131+
1132+
1133+
</dd>
1134+
</dl>
1135+
1136+
8731137

8741138

8751139

@@ -1213,7 +1477,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Color.htm
12131477
<br class="clear">
12141478

12151479
<footer>
1216-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Sep 28 2023 17:54:08 GMT+0200 (Central European Summer Time)
1480+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Oct 11 2023 11:00:42 GMT+0200 (Central European Summer Time)
12171481
</footer>
12181482

12191483
<script> prettyPrint(); </script>

docs/Engine.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3332,7 +3332,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Color.htm
33323332
<br class="clear">
33333333

33343334
<footer>
3335-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Thu Sep 28 2023 17:54:08 GMT+0200 (Central European Summer Time)
3335+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.11</a> on Wed Oct 11 2023 11:00:42 GMT+0200 (Central European Summer Time)
33363336
</footer>
33373337

33383338
<script> prettyPrint(); </script>

0 commit comments

Comments
 (0)