From be3b5bca4ac9d47e1dbb4b44567d96fe55eaec41 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 1 Nov 2016 19:24:36 +0100 Subject: [PATCH] docs: custom module infos --- resources/docs/cutom-module.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/resources/docs/cutom-module.md b/resources/docs/cutom-module.md index 0bd79794..96b4d97f 100644 --- a/resources/docs/cutom-module.md +++ b/resources/docs/cutom-module.md @@ -11,16 +11,23 @@ It must be of the following form: return { oscInFilter:function(data){ + // Filter incomming osc messages + var {address, args, host, port} = data // do what you want - // return data if you want the message to be processed (and sent) + // return data if you want the message to be processed return data }, oscOutFilter:function(data){ + // Filter outgoing osc messages + // same as oscInFilter + + // return data if you want the message to be and sent + return data } } @@ -30,6 +37,6 @@ It must be of the following form: The module is executed in a restricted context, only a few globals are available : -- `console` object -- `sendOsc` function -- `receiveOsc` function +- `console`: `object` +- `sendOsc`: `function({address, args, host, port})` +- `receiveOsc`: `function({address, args, host, port})`