diff options
| author | Ben Beltran <ben@nsovocal.com> | 2017-08-30 00:26:01 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2017-08-30 00:26:01 -0500 |
| commit | c6425032e13c139bedd0546119f6ed1c93365822 (patch) | |
| tree | e4c02a7f4d9c650dff91c778eacc0ab80b8aee73 /doc | |
| parent | 11400882a21f3152c586f7f6688664577a190949 (diff) | |
Add jsdoc, fix linter
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/README.md | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/doc/README.md b/doc/README.md index e69de29..495c624 100644 --- a/doc/README.md +++ b/doc/README.md @@ -0,0 +1,103 @@ +## Classes + +<dl> +<dt><a href="#StatusComponent">StatusComponent</a></dt> +<dd></dd> +<dt><a href="#WaveRenderer">WaveRenderer</a></dt> +<dd></dd> +<dt><a href="#DataService">DataService</a></dt> +<dd></dd> +<dt><a href="#SortingHat">SortingHat</a></dt> +<dd></dd> +</dl> + +## Typedefs + +<dl> +<dt><a href="#tSortingHatData">tSortingHatData</a> : <code>object</code></dt> +<dd><p>The data structure representing the sorting hat data</p> +</dd> +<dt><a href="#tRunningAverages">tRunningAverages</a> : <code>object</code></dt> +<dd><p>The running averages, including the current sum and count</p> +</dd> +</dl> + +<a name="StatusComponent"></a> + +## StatusComponent +**Kind**: global class +<a name="new_StatusComponent_new"></a> + +### new StatusComponent() +The status class, renders the winner during the poll stage, and a +message while waiting + +<a name="WaveRenderer"></a> + +## WaveRenderer +**Kind**: global class +<a name="new_WaveRenderer_new"></a> + +### new WaveRenderer() +The wave renderer, draws some waves in a canvas to represent a set of +cateogirzed averages + +<a name="DataService"></a> + +## DataService +**Kind**: global class + +* [DataService](#DataService) + * [new DataService()](#new_DataService_new) + * [.data()](#DataService.data) ⇒ + +<a name="new_DataService_new"></a> + +### new DataService() +The main data service, connects to a socket and updates the internal +data structure + +<a name="DataService.data"></a> + +### DataService.data() ⇒ +Returns the internal data structure, intended to be used as the data +property in vue components + +**Kind**: static method of [<code>DataService</code>](#DataService) +**Returns**: tSortingHatData +<a name="SortingHat"></a> + +## SortingHat +**Kind**: global class +<a name="new_SortingHat_new"></a> + +### new SortingHat() +The main vue application, it is composed by the other components, no real +logic otherwise + +<a name="tSortingHatData"></a> + +## tSortingHatData : <code>object</code> +The data structure representing the sorting hat data + +**Kind**: global typedef + +| Param | Type | Description | +| --- | --- | --- | +| state | <code>number</code> | the current state: 0 for waiting, 1 for polling, 2 for cool down. | +| [winner] | <code>string</code> | the winner after polling, might be null if no winner is detected | +| runningAverages | <code>Object.<string, tRunningAverages></code> | the running averages for the different categories, used to render the waves | + +<a name="tRunningAverages"></a> + +## tRunningAverages : <code>object</code> +The running averages, including the current sum and count + +**Kind**: global typedef + +| Param | Type | Description | +| --- | --- | --- | +| sum | <code>number</code> | the current total | +| count | <code>number</code> | the number of samples | +| average | <code>number</code> | the average (sum / count) | + |