From 68ba8aa9d9411cda0f1240252077ae0f7fb455e4 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Sat, 4 Feb 2017 00:34:32 +0100 Subject: [PATCH] doc: custom module init and settimeout expose --- resources/docs/user-guide/cutom-module.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/docs/user-guide/cutom-module.md b/resources/docs/user-guide/cutom-module.md index 5e77618a..bbb8835c 100644 --- a/resources/docs/user-guide/cutom-module.md +++ b/resources/docs/user-guide/cutom-module.md @@ -10,6 +10,9 @@ It must be of the following form: // Do whatever you want, initialize some variables, declare some functions, ... return { + init: function(){ + // this will be executed once when the osc server starts + }, oscInFilter:function(data){ // Filter incomming osc messages @@ -21,7 +24,7 @@ It must be of the following form: // args = array of {value, type} objects // host = string // port = integer - + // return data if you want the message to be processed return {address, args, host, port} @@ -45,3 +48,4 @@ The module is executed in a restricted context, only a few globals are available - `console`: `object` - `sendOsc`: `function({address, args, host, port})` - `receiveOsc`: `function({address, args, host, port})` +- `setTimeout`: `function(function, delay)`