Skip to content

Commit 8d39d26

Browse files
committed
updated example code
1 parent a599953 commit 8d39d26

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

plugin.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11

22
var plugin = module.exports = {};
33

4+
// Do we need this? Are there other plugin-y config things?
45
plugin.config = {
56
platform: 'rpi'
67
};
78

8-
plugin.formats = [{
9-
"name": "Shader (glslViewer)",
10-
"download": true,
11-
"start_command": "glslViewer $filename",
12-
"end_command": "sudo pkill glslViewer",
13-
"category": "shader"
14-
}];
9+
// OPTIONAL - an array of Format objects
10+
//
11+
// TODO - how will these get handled in terms of adding artwork?
12+
plugin.formats = [];
1513

14+
// TODO - Do we want this? Or can we rely on the deps from package.json?
1615
plugin.dependencies = {
1716
// "openframe-gpio": "git+https://git@github.com/OpenframeProject/Openframe-PluginExample.git"
1817
};
1918

20-
// Must return a Promise that resolves on successful intialization
19+
/**
20+
* Plugin initialization method.
21+
*
22+
* Called when the plugin (and its dependencies) have been installed.
23+
*
24+
* TODO: This will likely get passed a sandboxed API object rather than the full frame controller...
25+
*
26+
* @param {object} fc A reference to the frame controller
27+
*/
2128
plugin.init = function(fc) {
2229
// do your plugin thing
2330
console.log('=======> PluginExample initialized! <=======');

0 commit comments

Comments
 (0)