From 49900ef211901c61e589e09ad04d9a0f3511d086 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Fri, 21 Jul 2017 16:21:28 +0200 Subject: [PATCH] example: add demo (wip) --- app/examples/demo.js | 699 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 699 insertions(+) create mode 100644 app/examples/demo.js diff --git a/app/examples/demo.js b/app/examples/demo.js new file mode 100644 index 00000000..004d131f --- /dev/null +++ b/app/examples/demo.js @@ -0,0 +1,699 @@ +[ + { + "type": "root", + "tabs": [ + { + "type": "tab", + "id": "tab_2", + "label": "Open Stage Control", + "color": "auto", + "css": "", + "layout": "", + "spacing": 0, + "value": "", + "precision": 0, + "address": "/tab_2", + "preArgs": [], + "target": [], + "variables": "@{parent.variables}", + "widgets": [ + { + "type": "strip", + "top": 10, + "left": 10, + "id": "strip_4", + "label": "Strips", + "width": 100, + "height": 450, + "color": "auto", + "css": "", + "horizontal": false, + "stretch": false, + "spacing": 5, + "variables": "@{parent.variables}", + "widgets": [ + { + "type": "text", + "id": "text_1", + "label": false, + "height": 30, + "vertical": false, + "color": "auto", + "css": "", + "widgetId": "", + "value": 1, + "preArgs": [], + "address": "/text_1" + }, + { + "type": "strip", + "id": "strip_5", + "label": false, + "height": 30, + "color": "auto", + "horizontal": true, + "stretch": true, + "spacing": 5, + "variables": "@{parent.variables}", + "widgets": [ + { + "type": "toggle", + "id": "toggle_1", + "linkId": "", + "label": false, + "led": false, + "color": "auto", + "css": "", + "on": 1, + "off": 0, + "value": "", + "precision": 2, + "preArgs": [], + "target": [], + "width": "auto", + "address": "/toggle_1" + }, + { + "type": "toggle", + "linkId": "", + "label": false, + "led": false, + "color": "auto", + "css": "", + "on": 1, + "off": 0, + "value": "", + "precision": 2, + "preArgs": [], + "target": [], + "width": "auto", + "id": "toggle_2", + "address": "/toggle_2" + }, + { + "type": "toggle", + "id": "toggle_3", + "label": false, + "led": false, + "color": "auto", + "css": "", + "on": 1, + "off": 0, + "value": "", + "precision": 2, + "address": "/toggle_3", + "preArgs": [], + "target": [], + "linkId": "", + "width": "auto" + } + ], + "_style": "style", + "_children": "children", + "css": "", + "scroll": true, + "_layout": "layout", + "layout": "", + "_osc": "osc", + "value": "", + "precision": 0, + "address": "auto", + "preArgs": [], + "target": [], + "tabs": [] + }, + { + "type": "strip", + "id": "strip_6", + "label": false, + "height": 50, + "color": "auto", + "css": "", + "horizontal": true, + "stretch": true, + "spacing": 0, + "variables": "@{parent.variables}", + "widgets": [ + { + "type": "knob", + "id": "knob_1", + "linkId": "", + "label": false, + "unit": "", + "width": "auto", + "color": "auto", + "pips": false, + "input": false, + "dashed": false, + "angle": 270, + "css": "", + "snap": false, + "spring": false, + "doubleTap": false, + "range": { + "min": 0, + "max": 1 + }, + "origin": "auto", + "value": "", + "logScale": false, + "precision": 2, + "touchAddress": "", + "preArgs": [], + "target": [], + "address": "/knob_1" + }, + { + "type": "knob", + "id": "knob_2", + "linkId": "", + "label": false, + "unit": "", + "width": "auto", + "color": "auto", + "pips": false, + "input": false, + "dashed": false, + "angle": 270, + "css": "", + "snap": false, + "spring": false, + "doubleTap": false, + "range": { + "min": 0, + "max": 1 + }, + "origin": "auto", + "value": "", + "logScale": false, + "precision": 2, + "address": "/knob_2", + "touchAddress": "", + "preArgs": [], + "target": [] + } + ], + "_style": "style", + "_children": "children", + "scroll": true, + "_layout": "layout", + "layout": "", + "_osc": "osc", + "value": "", + "precision": 0, + "address": "auto", + "preArgs": [], + "target": [], + "tabs": [] + }, + { + "type": "strip", + "id": "strip_1", + "label": false, + "color": "auto", + "css": "flex:1", + "horizontal": true, + "stretch": false, + "spacing": 0, + "variables": "@{parent.variables}", + "widgets": [ + { + "type": "meter", + "id": "meter_1", + "label": false, + "unit": "", + "alignRight": false, + "horizontal": false, + "pips": false, + "dashed": true, + "color": "auto", + "css": "margin: 20rem 0 20rem 10rem;", + "widgetId": "", + "range": { + "min": 0, + "max": 1 + }, + "logScale": false, + "origin": "auto", + "value": "", + "address": "/meter_1", + "preArgs": [], + "width": 10, + "compact": true, + "input": false + }, + { + "type": "meter", + "id": "meter_1", + "label": false, + "unit": "", + "alignRight": false, + "horizontal": false, + "pips": false, + "dashed": true, + "color": "auto", + "css": "margin: 20rem 0", + "widgetId": "", + "range": { + "min": 0, + "max": 1 + }, + "logScale": false, + "origin": "auto", + "value": "", + "address": "/meter_1", + "preArgs": [], + "width": 10, + "compact": true, + "input": false + }, + { + "type": "fader", + "id": "fader_1", + "linkId": "", + "label": false, + "unit": "", + "width": "auto", + "alignRight": false, + "horizontal": false, + "pips": true, + "input": false, + "compact": false, + "dashed": false, + "color": "auto", + "css": "", + "snap": false, + "spring": false, + "doubleTap": false, + "range": { + "min": 0, + "max": 1 + }, + "origin": "auto", + "value": "", + "logScale": false, + "precision": 2, + "meter": false, + "address": "/fader_1", + "touchAddress": "", + "meterAddress": "", + "preArgs": [], + "target": [] + } + ], + "_style": "style", + "_children": "children", + "height": "auto", + "scroll": true, + "_layout": "layout", + "layout": "", + "_osc": "osc", + "value": "", + "precision": 0, + "address": "auto", + "preArgs": [], + "target": [], + "tabs": [] + }, + { + "type": "fader", + "id": "fader_2", + "linkId": "", + "label": false, + "unit": "", + "height": 30, + "alignRight": false, + "horizontal": true, + "pips": false, + "input": false, + "compact": true, + "dashed": false, + "color": "auto", + "css": "", + "snap": false, + "spring": false, + "doubleTap": false, + "range": { + "min": 0, + "max": 1 + }, + "origin": 0.5, + "value": 0.5, + "logScale": false, + "precision": 2, + "meter": false, + "address": "/fader_2", + "touchAddress": "", + "meterAddress": "", + "preArgs": [], + "target": [] + }, + { + "type": "strip", + "id": "strip_3", + "label": false, + "height": 30, + "color": "auto", + "css": "", + "horizontal": true, + "stretch": false, + "variables": "@{parent.variables}", + "widgets": [ + { + "type": "toggle", + "id": "toggle_4", + "linkId": "", + "label": "M", + "led": false, + "color": "yellow", + "css": "", + "on": 1, + "off": 0, + "value": "", + "precision": 2, + "preArgs": [], + "target": [], + "width": "auto", + "address": "/toggle_4" + }, + { + "type": "toggle", + "id": "toggle_5", + "linkId": "", + "label": "S", + "led": false, + "color": "lime", + "css": "", + "on": 1, + "off": 0, + "value": "", + "precision": 2, + "address": "/toggle_5", + "preArgs": [], + "target": [], + "width": "auto" + } + ], + "_style": "style", + "_children": "children", + "spacing": 0, + "scroll": true, + "_layout": "layout", + "layout": "", + "_osc": "osc", + "value": "", + "precision": 0, + "address": "auto", + "preArgs": [], + "target": [], + "tabs": [] + } + ], + "_style": "style", + "_children": "children", + "scroll": true, + "_layout": "layout", + "layout": "", + "_osc": "osc", + "value": "", + "precision": 0, + "address": "auto", + "preArgs": [], + "target": [], + "tabs": [] + }, + { + "type": "panel", + "top": 10, + "left": 120, + "id": "panel_1", + "label": "Pads", + "width": 350, + "height": 350, + "scroll": true, + "color": "auto", + "css": "", + "layout": "", + "spacing": 0, + "value": "", + "precision": 0, + "address": "/panel_1", + "preArgs": [], + "target": [], + "variables": "@{parent.variables}", + "widgets": [], + "tabs": [ + { + "type": "tab", + "id": "tab_3", + "label": "Xy", + "color": "auto", + "css": "", + "layout": "", + "spacing": 0, + "value": "", + "precision": 0, + "address": "/tab_3", + "preArgs": [], + "target": [], + "variables": "@{parent.variables}", + "widgets": [ + { + "type": "xy", + "top": 0, + "left": 0, + "id": "xy_1", + "linkId": "", + "label": false, + "width": "100%", + "height": "100%", + "input": true, + "pips": true, + "color": "auto", + "css": "", + "pointSize": 10, + "snap": false, + "spring": false, + "doubleTap": false, + "rangeX": { + "min": 0, + "max": 1 + }, + "rangeY": { + "min": 0, + "max": 1 + }, + "logScaleX": false, + "logScaleY": false, + "value": "", + "precision": 2, + "address": "/xy_1", + "touchAddress": "", + "preArgs": [], + "split": false, + "target": [] + } + ], + "tabs": [], + "scroll": true + }, + { + "type": "tab", + "id": "tab_5", + "label": "rgb", + "color": "auto", + "css": "", + "layout": "", + "spacing": 0, + "value": "", + "precision": 0, + "address": "/tab_5", + "preArgs": [], + "target": [], + "variables": "@{parent.variables}", + "widgets": [ + { + "type": "rgb", + "id": "rgb_1", + "linkId": "", + "label": false, + "left": 0, + "top": 0, + "width": "100%", + "height": "100%", + "input": true, + "css": "", + "snap": false, + "spring": false, + "value": "", + "precision": 0, + "address": "/rgb_1", + "touchAddress": "", + "preArgs": [], + "split": false, + "target": [], + "pointSize": 10 + } + ], + "tabs": [], + "scroll": true + }, + { + "type": "tab", + "id": "tab_4", + "label": "MultiXy", + "color": "auto", + "css": "", + "layout": "", + "spacing": 0, + "value": "", + "precision": 0, + "address": "/tab_4", + "preArgs": [], + "target": [], + "variables": "@{parent.variables}", + "widgets": [ + { + "type": "multixy", + "id": "xy_2", + "label": false, + "width": "100%", + "height": "100%", + "pips": true, + "color": "auto", + "css": "", + "snap": false, + "spring": false, + "rangeX": { + "min": 0, + "max": 1 + }, + "rangeY": { + "min": 0, + "max": 1 + }, + "logScaleX": false, + "logScaleY": false, + "value": [ + 0.25, + 0.5, + 0.75, + 0.5 + ], + "precision": 2, + "address": "/xy_2", + "touchAddress": "", + "preArgs": [], + "split": false, + "target": [], + "linkId": "", + "left": "auto", + "top": "auto", + "points": 2, + "pointSize": 20 + } + ], + "tabs": [], + "scroll": true + } + ] + }, + { + "type": "dropdown", + "top": 10, + "left": 480, + "id": "dropdown_1", + "linkId": "", + "label": "Color", + "width": 130, + "height": "auto", + "color": "auto", + "css": "", + "precision": 2, + "address": "/EDIT", + "preArgs": [ + "root" + ], + "target": [ + "127.0.0.1:8080" + ], + "value": "", + "values": { + "Default": "{ \"color\": \"auto\" }", + "Orange": "{ \"color\": \"orange\" }" + } + }, + { + "type": "keyboard", + "top": 370, + "left": 120, + "id": "keyboard", + "keys": 36, + "start": 60, + "label": "auto", + "width": 350, + "height": 90, + "color": "auto", + "css": "", + "traversing": true, + "on": 1, + "off": 0, + "precision": 2, + "address": "/keyboard_1", + "preArgs": [], + "split": false, + "target": [] + }, + { + "type": "multifader", + "top": 80, + "left": 480, + "id": "multifader", + "strips": 16, + "start": 0, + "label": "auto", + "unit": "", + "width": 130, + "height": 380, + "alignRight": false, + "horizontal": true, + "pips": false, + "input": false, + "compact": true, + "dashed": false, + "color": "auto", + "css": "", + "traversing": true, + "snap": true, + "range": { + "min": 0, + "max": 1 + }, + "value": "", + "origin": "auto", + "logScale": false, + "precision": 2, + "meter": false, + "address": "/multifader_1", + "preArgs": [], + "split": false, + "target": [] + } + ], + "tabs": [], + "scroll": true + } + ], + "color": "orange", + "css": "", + "value": "", + "precision": 0, + "address": "/root", + "preArgs": [], + "target": [], + "variables": {}, + "id": "root", + "scroll": true, + "label": false + } +] \ No newline at end of file