<commit_before><commit_msg>Add effector plugin spec document.<commit_after># nwdrome-effector-plugin spec
# Copyright 2014, Ragg(@_ragg_)

###

# Nwdrome effector plugin specification

## Register plugin
Call `nwdrome.plugin.addEffector` with `factory function`
Factory function given plugin config object.

Below Plugin config object properties.

- appUrl  :string  Application(nwdrome) root path. End with "/"
- url     :string  Plugin root path. End with "/"

## Plugin information
Plugin constructor must having plugin info properties!!

- id            :string  Plugin ID (example: "yourname.pluginname")
- description   :string  Plugin description.
- thumbnail     :string  Path to plugin thumbnail.
###


###
Exapmle
###
nwdrome.plugin.addEffector (pluginConfig)->

    class EffectorPlugin
        # Plugin detail set to plugin constructor
        @id          : "vendor.Plugin-ID"
        @description : "Plugin \nDescription"
        @thumbnail   : pluginConfig.url + "path/to/thumbnail.image"


        # @param HTMLCanvasElement jsdrome master canvas. Has been written mixed(faded) image.
        constructor : (canvas) ->
            # hold destination canvas
            @_canvas = canvas

        onStart     : () ->
            # Call when starting draw.

        onStop      : () ->
            # Call when stopping draw.

        # @param float Realtime volume
        # @param float Part volume
        onAudio     : (moment, period) ->
            # The state of the audio volume will be notified.

        # @param int new width
        # @param int new height
        onResize    : (width, height) ->
            # Be notified of canvas size change.

        onTimer     : ->
            # Call from nwdrome when requestAnimationFrame fired.
            # Will rendering process write here.

        # @param int keyCode
        onKeydown   : (keyCode) ->
            # Call on key input and route to this instance.


        onMidi      : (a1, a2, a3) ->
            # Be notified of midi input(maybe...)

    # return constructor
    return EffectorPlugin
{'fraction_non_alphanumeric': 0.0860990860990861, 'fraction_numerical': 0.003367003367003367, 'mean_word_length': 2.156297420333839, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7136876', 'n_tokens_mistral': 568, 'n_tokens_neox': 536, 'n_words': 193}