From ba68f69065aedbc153fe978eea7116c9fbd117b7 Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Tue, 3 Nov 2015 13:57:41 +0100 Subject: [PATCH] live editor ready to use quick state store/recall renamed functions/callbacks --- app/browser/css/style.css | 2 +- app/browser/js/app/callbacks.js | 13 +++--- app/browser/js/app/editor.js | 4 -- app/browser/js/app/init.js | 56 +++++++++++++----------- app/browser/js/app/utils.js | 64 ++++++++++++++++----------- app/browser/scss/style.scss | 65 ++++++++++++++++------------ app/main/main.js | 76 ++++++++++++++++++--------------- 7 files changed, 157 insertions(+), 123 deletions(-) diff --git a/app/browser/css/style.css b/app/browser/css/style.css index cc95b50a..ee6e1971 100644 --- a/app/browser/css/style.css +++ b/app/browser/css/style.css @@ -1 +1 @@ -@charset "UTF-8";* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; outline: 0; font: inherit; cursor: inherit; }a { cursor: pointer; display: block; }::-webkit-scrollbar { width: 20rem; height: 20rem; opacity: 1; }::-webkit-scrollbar-track-piece { background: #1a1d22; }::-webkit-scrollbar-track-piece:vertical { border-left: 1rem solid #1a1d22; }::-webkit-scrollbar-track-piece:horizontal { border-top: 1rem solid #1a1d22; }::-webkit-scrollbar-corner { background: #1a1d22; }::-webkit-scrollbar-thumb { background: linear-gradient(#2d3139, #2b2f37 15rem); }::-webkit-scrollbar-thumb:vertical { border-left: 1rem solid #1a1d22; }::-webkit-scrollbar-thumb:horizontal { border-top: 1rem solid #1a1d22; }* { -webkit-user-select: none; }input:focus::selection { background: #528bff; }input { cursor: text; }html, body { height: 100%; overflow: hidden; position: relative; }html { font-size: 1px; }body { font-size: 14rem; line-height: 16rem; font-family: sans; color: #cccccc; white-space: nowrap; opacity: 1; cursor: default; }.btn { background: linear-gradient(#2d3139, #2b2f37 15rem); display: block; border: 1rem solid #1a1d22; padding: 15rem; position: relative; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }.btn.small { padding: 5rem; padding-right: 15rem; }.btn.disabled { pointer-events: none; color: #999999; background: linear-gradient(#272a31, #25282f 15rem); }.btn.align-center { text-align: center; }a.btn:hover { background-image: linear-gradient(#32363d, #2d3139); }.editor .actions { margin-top: 10rem; display: flex; align-items: stretch; }.editor .actions a { display: block; width: 100%; padding: 10rem; }.editor .actions a.on { pointer-events: none; border-top: 2rem solid #528bff; }.editing:before { content: ""; z-index: 999; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border: 1px dashed #528bff; pointer-events: none; }#lobby { background: #22252c; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; border: 1rem solid #1a1d22; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 20rem; }#lobby .main { width: 600rem; max-height: 100%; }#lobby .header { background: linear-gradient(#2d3139, #2b2f37 15rem); padding: 20rem; font-weight: bold; box-shadow: 0 0 0 1rem #1a1d22 inset; white-space: nowrap; text-overflow: ellipsis; }#lobby a { padding-right: 35rem; overflow: hidden; margin-top: 10rem; position: relative; white-space: nowrap; text-overflow: ellipsis; }#lobby a span { position: absolute; right: 0rem; top: 0rem; padding: 15rem; color: #999999; }#lobby a span:hover { color: #cccccc; }#container { background: #22252c; position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; transition: right .2s; }#container.sidepanel-open { right: 300rem; }#container #open-toggle { position: absolute; right: 0; top: 2rem; width: 60rem; height: 60rem; padding: 0 10rem; line-height: 60rem; font-size: 24rem; text-align: center; color: #999999; z-index: 2; }#container #open-toggle.sidepanel-open { color: #cccccc; }#sidepanel { position: absolute; z-index: 999999; width: 300rem; top: 0; right: 0; bottom: 0; margin-right: -300rem; background: #282c34; border-left: 1rem solid #1a1d22; transition: right .2s; overflow-y: auto; overflow-x: visible; }#sidepanel.sidepanel-open { right: 300rem; }#sidepanel #options { position: absolute; left: 0; top: 2rem; right: 0; bottom: 0; padding: 5rem; list-style: none; background: #282c34; }#sidepanel #options li { display: block; margin-bottom: 5rem; background: linear-gradient(#2d3139, #2b2f37 15rem); position: relative; }#sidepanel #options li:last-child { margin-bottom: 0; }#sidepanel #options li span { position: absolute; right: 0rem; top: 0rem; padding: 5rem; color: #999999; }#sidepanel #options li span:hover { color: #cccccc; }#sidepanel #options .editor .form { margin-top: 10rem; }.nicescroll-rails-hr { margin-top: 3rem; }.nicescroll-rails-vr { display: none !important; }a { color: inherit; }.navigation { position: absolute; top: 0; left: 0; right: 0; z-index: 1; font-size: 14rem; background: #22252c; border-bottom: 1rem solid #1a1d22; border-top: 1rem solid #282c34; height: 60rem; }.navigation ::first-letter { text-transform: uppercase; }.navigation.main { padding-right: 55rem; right: 0; }.navigation ul { list-style: none; display: flex; padding: 7rem 6rem; }.navigation ul li.on + li { border-image: none; border-left: 1rem solid transparent; }.navigation ul li { display: block; max-width: 250rem; flex: 1; border-width: 0 0 0 1rem; border-image: linear-gradient(rgba(26, 29, 34, 0), #1a1d22, rgba(26, 29, 34, 0)) 0 0 0 1 stretch; }.navigation ul li:first-child, .navigation ul li.on { border-image: none; border-left: 1rem solid transparent; }.navigation ul li:first-child { border-left: 0; }.navigation ul li a { display: block; padding: 5rem 10rem; line-height: 34rem; border-radius: 3rem; overflow: hidden; text-align: center; border: 1rem solid transparent; position: relative; color: #999999; }.navigation ul li a span { display: block; width: 100%; -webkit-mask: linear-gradient(to left, transparent, #000000 10rem) no-repeat; }.navigation ul li a.on { background: #282c34; border: 1rem solid #1a1d22; color: #cccccc; }.navigation ul li a.on:before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; box-shadow: inset 0 1rem 1rem rgba(255, 255, 255, 0.06); background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)); }.navigation ul li a.on:after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4rem; }.content { position: absolute; left: 0; top: 60rem; right: 0; bottom: 0; background: #282c34; }.content .content { top: 60rem; }#loading { position: absolute; top: 50%; left: 50%; margin-top: -15rem; text-align: center; }#loading .spinner { display: block; margin: 0 auto; height: 30rem; width: 30rem; border-radius: 50%; border: 2rem solid rgba(0, 0, 0, 0.2); border-top-color: #528bff; animation: spin .5s linear infinite; }#loading #status { margin-top: 10rem; display: inline-block; }@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }.popup { position: fixed; top: 0; left: 0; right: 0; bottom: 0; padding: 10%; background: rgba(0, 0, 0, 0.5); z-index: 1000000; }.popup .popup-title { position: relative; padding: 15rem; background: linear-gradient(#2d3139, #2b2f37 15rem); }.popup .popup-title .closer { position: absolute; right: 0rem; top: 0; padding: 15rem; color: #999999; cursor: pointer; }.popup .popup-title .closer:hover { color: #cccccc; }.popup .popup-wrapper { background: #282c34; height: 100%; width: 100%; max-width: 600rem; margin: 0 auto; position: relative; overflow: hidden; border: 1rem solid #1a1d22; }.popup .popup-wrapper .popup-content { height: 100%; width: 100%; padding: 10rem; overflow-y: scroll; white-space: normal; }.form label { display: block; line-height: 15rem; font-size: 10rem; }.form .info { color: #999999; margin-bottom: 10rem; }.form input, .form .input { display: block; background: #22252c; font: inherit; color: #cccccc; border: 1rem solid #1a1d22; width: 100%; padding: 10rem; margin-bottom: 10rem; }.form input.invalid, .form .input.invalid { box-shadow: 0 0 0 1rem rgba(255, 0, 0, 0.3) !important; }.form input:focus, .form .input:focus { box-shadow: 0 0 0 1rem #528bff; }.form .submit { margin-top: 30rem; }.tab.on.stretch { display: flex; justify-content: space-between; }.tab.on.stretch > .widget { width: 100%; }.tab { display: none; overflow: auto; position: relative; }.tab.on { display: block; height: 100%; width: auto; }.widget { display: inline-block; height: auto; min-width: 100rem; overflow: hidden; position: relative; font-size: 13rem; padding: 35rem 0 0; vertical-align: top; border: 6rem solid transparent; border-width: 6rem 0; margin: 0 3rem; box-shadow: 0 0 0 1rem #22252c inset; background: linear-gradient(#2d3139, #2b2f37 15rem); background-clip: padding-box; -webkit-tap-highlight-color: transparent; }.widget:first-child { margin-left: 6rem; }.widget:last-child { margin-right: 6rem; }.widget.nolabel { padding-top: 0; }.widget.nolabel > .label { display: none; }.widget .label { z-index: 1; padding: 10rem 10rem; position: absolute; top: 0rem; left: 0; right: 0; text-overflow: ellipsis; overflow: hidden; height: 35rem; }.widget .label.accent { color: #528bff; }.widget input { width: 100%; height: 35rem; border: 0; background: #22252c; color: inherit; display: block; padding: 10rem; }.widget input:focus { box-shadow: 0 0 0 1rem #528bff inset !important; }.widget input[disabled] { color: #999999; }.master-dragging:after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 999999; }/* STRIP (contains any widgets) */.strip-container { width: 100rem; height: 100%; overflow: visible; border-bottom: 0; background: none; box-shadow: none; }.strip-container > .label { background: linear-gradient(#2d3139, #2b2f37 15rem); box-shadow: 0 0 0 1rem #22252c inset; }.strip-container .strip { height: 100%; display: flex; flex-direction: column; }.strip-container .strip > .widget { display: block; margin: 0; width: auto; }.strip-container .strip > .widget:not(:last-child) { border-bottom-width: 0; }.strip-container .strip > .widget:first-child  { border-top-width: 0; }.strip-container.nolabel:not(.horizontal) .strip > .widget:first-child { border-top: 0; }.strip-container.horizontal { padding-top: 0; padding-left: 40rem; width: 100%; height: auto; margin: 0; border-left-width: 6rem; display: block; }.strip-container.horizontal:last-child { margin-bottom: 6rem; }.strip-container.horizontal.nolabel { padding-left: 0; }.strip-container.horizontal .strip { flex-direction: row; align-items: flex-start; }.strip-container.horizontal .strip > .widget { border-bottom-width: 0; border-top-width: 0; border-right-width: 6rem; flex-shrink: initial; }.strip-container.horizontal .strip > .widget:last-child { border-right-width: 6rem; }.strip-container.horizontal > .label { width: 35rem; height: 100%; left: 0; top: 0; }.strip-container.horizontal > .label span { transform: rotate(180deg); display: block; position: relative; overflow: hidden; text-overflow: ellipsis; -webkit-writing-mode: vertical-lr; text-align: center; height: 100%; }.panel-container { position: absolute; margin: 0 !important; border-top: 0; z-index: 2; }.panel-container .panel { height: 100%; padding: 6rem 0; overflow: auto; position: relative; }.panel-container .panel > .widget { border: 0; }.panel-container .panel.stretch { display: flex; justify-content: space-between; }.panel-container .panel.stretch > .widget { width: 100%; }.panel-container .panel::-webkit-scrollbar-thumb, .panel-container .panel::-webkit-scrollbar-track-piece { border: 1rem solid #22252c; }/* BUTTONS */.toggle-container { width: 100rem; flex-shrink: 0; padding: 0 !important; cursor: pointer; }.toggle-container .label { position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 29rem 10rem 26rem; line-height: 1rem; background: none !important; text-align: center; pointer-events: none; }.toggle-container:hover { background-image: linear-gradient(#32363d, #2d3139); }.toggle { z-index: 1; padding: 29rem 10rem 26rem; }.toggle .light { position: absolute; left: 4rem; right: 4rem; top: 4rem; height: 4rem; background: #1a1d22; border-radius: 3rem; }.toggle.on .light { background: #528bff; }.switch-container { width: 100rem; flex-shrink: 0; }.switch-container .switch { height: 100%; width: 100%; cursor: pointer; display: flex; flex-direction: column; align-items: stretch; padding: 1rem; }.switch-container .switch .value { background: linear-gradient(#2d3139, #2b2f37 15rem); color: #999999; width: 100%; position: relative; border-top: 1rem solid #282c34; padding: 12rem 12rem 12rem 24rem; white-space: normal; text-align: left; word-break: break-all; overflow: hidden; }.switch-container .switch .value:hover { background: linear-gradient(#32363d, #2d3139); }.switch-container .switch .value:last-child { margin-bottom: 0; }.switch-container .switch .value:first-child { border-top: 0; }.switch-container .switch .value:after { content: ""; position: absolute; left: 8rem; top: 50%; width: 8rem; height: 8rem; margin-top: -4rem; background: #1a1d22; border-radius: 8rem; }.switch-container .switch .value.on:after { background: #528bff; }/* XY */.xy-container, .rgb-container { width: 300rem; flex-shrink: 0; }.xy-wrapper { overflow: hidden; }.xy-wrapper .value { width: 100%; }.xy-wrapper input { width: 50%; float: left; padding: 2rem; text-align: center; position: relative; left: 0rem; right: 0rem; box-shadow: 0 0 1rem 0 #1a1d22 inset; }.xy { position: relative; width: auto; margin-left: 1rem; margin-right: 1rem; padding-bottom: 90%; overflow: hidden; background: rgba(0, 0, 0, 0.5); cursor: -webkit-grab; }.xy:active { cursor: -webkit-grabbing; }.xy:active .handle:after, .xy:active .handle:before { transform: scale(1.5); }.xy .handle { position: absolute; height: 0rem; width: 0rem; bottom: 0; left: 0; max-height: 100%; max-width: 100%; z-index: 2; pointer-events: none; }.xy .handle:before { content: ""; position: absolute; top: -4rem; right: -4rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2b2f37; }.xy .handle:after { content: ""; position: absolute; top: -10rem; right: -10rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.rgb-wrapper input { width: 33.33%; }.rgb { background-color: red; }.rgb:before, .rgb:after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; }.rgb:before { background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%); }.rgb:after { background: linear-gradient(to bottom, transparent 0%, black 100%); }.rgb .handle:before { box-shadow: none; background: #cccccc; }.rgb .handle:after { box-shadow: 0 0 0 1000rem rgba(0, 0, 0, 0.5); }.hue { width: auto; margin-left: 1rem; margin-right: 1rem; height: 30rem; background: transparent linear-gradient(to left, #F00, #FF0080, #F0F, #8000FF, #00F, #0080FF, #0FF, #00FF80, #0F0, #80FF00, #FF0, #FF8000, #F00) repeat scroll 0% 0%; overflow: hidden; position: relative; cursor: -webkit-grab; }.hue:active { cursor: -webkit-grabbing; }.hue:active .handle:after { transform: scale(1.5); }.hue .handle { position: absolute; height: 100%; max-width: 100%; width: 0; z-index: 2; left: 0; bottom: 0; pointer-events: none; }.hue .handle:before { content: ""; position: absolute; top: 50%; margin-top: -4rem; right: -4rem; height: 8rem; width: 8rem; border: none !important; border-radius: 100% !important; box-shadow: none; background: #cccccc; }.hue .handle:after { content: ""; position: absolute; top: 50%; margin-top: -10rem; right: -10rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1000rem rgba(0, 0, 0, 0.5); }.fader-container { width: 100rem; min-width: 80rem; height: 100%; min-height: 300rem; }.fader-container.nolabel .fader-wrapper-outer { top: 0; }.fader-container .fader-wrapper-outer { padding-bottom: 30rem; position: absolute; top: 30rem; bottom: 0; left: 0; right: 0; }.fader-container .fader-wrapper-outer input { position: absolute; bottom: 0; }.fader-container .fader-wrapper { padding: 20rem; overflow: hidden; height: 100%; position: relative; cursor: -webkit-grab; }.fader-container .fader-wrapper:active { cursor: -webkit-grabbing; }.fader-container .fader-wrapper .fader { height: 100%; width: 4rem; background: #1a1d22; position: relative; margin: 0 auto; left: -25rem; pointer-events: none; }.fader-container .fader-wrapper .fader.nogauge .handle { background: none; }.fader-container .fader-wrapper .fader .handle { position: absolute; bottom: 0 !important; top: auto !important; width: 100%; height: 0rem; max-height: 100%; max-width: 100%; background: #528bff; z-index: 1; }.fader-container .fader-wrapper .fader .handle:before { content: ""; position: absolute; top: -6rem; left: -2rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2b2f37; }.fader-container .fader-wrapper .fader .handle:after { content: ""; position: absolute; top: -12rem; left: -8rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.fader-container .fader-wrapper .pips { position: absolute; top: -1%; bottom: 1%; left: 14rem; }.fader-container .fader-wrapper .pips .pip { height: 1%; width: 4rem; border-bottom: 1px solid #cccccc; }.fader-container .fader-wrapper .pips .pip.val { width: 10rem; position: relative; }.fader-container .fader-wrapper .pips .pip.val span { position: relative; width: 30rem; display: block; text-align: center; font-size: 11rem; line-height: 12rem; left: 15rem; top: -2rem; color: #cccccc; }.fader-container.horizontal { min-height: 80rem; height: auto; width: 300rem; flex-shrink: 0; }.fader-container.horizontal .fader-wrapper-outer { position: relative; top: auto; padding-bottom: 35rem; }.fader-container.horizontal .fader-wrapper-outer .fader-wrapper { padding: 20rem 20rem 50rem; }.fader-container.horizontal .fader-wrapper-outer .fader { width: 100%; left: auto; height: 4rem; }.fader-container.horizontal .fader-wrapper-outer .fader .handle { height: 100% !important; width: 0; }.fader-container.horizontal .fader-wrapper-outer .fader .handle:before { top: -2rem; right: -6rem; left: auto; }.fader-container.horizontal .fader-wrapper-outer .fader .handle:after { top: -8rem; right: -12rem; left: auto; }.fader-container.horizontal .fader-wrapper-outer .pips { top: 14rem; left: 0; right: 0; display: flex; flex-direction: row; align-items: stretch; }.fader-container.horizontal .fader-wrapper-outer .pip { width: 100%; display: block; height: 4rem; border-bottom: 0; border-right: 1rem solid #999999; }.fader-container.horizontal .fader-wrapper-outer .pip.val { width: 1%; float: left; height: 10rem; }.fader-container.horizontal .fader-wrapper-outer .pip.val span { top: 15rem; left: -15rem; }.knob-container { width: 100rem; min-height: 135rem; flex-shrink: 0; padding-top: 15rem; }.knob-container.nolabel .knob-wrapper-outer { top: 0; }.knob-container .knob-wrapper-outer { width: 100%; top: 30rem; bottom: 0; padding-bottom: 30rem; overflow: hidden; }.knob-container .knob-wrapper-outer input { bottom: 0; position: absolute; z-index: 1; }.knob-container .knob-wrapper-outer.nogauge .knob:after, .knob-container .knob-wrapper-outer.nogauge .knob-mask:after { display: none; }.knob-container .knob-wrapper-outer.nogauge .knob-wrapper .knob:before { content: ""; position: absolute; top: auto; bottom: 6rem; left: 6rem; height: 7rem; width: 7rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 3rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2b2f37; }.knob-container .knob-wrapper-outer .knob-wrapper { padding: 20rem; margin: 0 auto; width: 95rem; position: relative; cursor: -webkit-grab; }.knob-container .knob-wrapper-outer .knob-wrapper:active { cursor: -webkit-grabbing; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask { width: 100%; padding-bottom: 100%; border-radius: 100%; pointer-events: none; position: relative; box-shadow: 0 0 0 4rem #1a1d22 inset; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask:before { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 100%; border: 4rem solid #1a1d22; box-shadow: 0 0 0 1rem #2b2f37, 0 0 0 1rem #2b2f37 inset, 0 0 1rem 1rem #2b2f37, 0 0 1rem 1rem #2b2f37 inset; transform: rotate(45deg); z-index: 1; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-left:before { content: ""; border-left-color: transparent; border-bottom-color: transparent; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-left .knob:after { border-color: transparent; border-left-color: #528bff; border-top-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-right:before { content: ""; border-right-color: transparent; border-top-color: transparent; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-right .knob:after { border-color: transparent; border-right-color: #528bff; border-bottom-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask:after { content: ""; position: absolute; top: 0rem; left: -3rem; right: -3rem; bottom: -2rem; border-radius: 100%; border: 12rem solid transparent; border-bottom-color: #2b2f37; z-index: 1; }.knob-container .knob-wrapper-outer .knob-wrapper .round { content: ""; position: absolute; top: 18rem; left: 18rem; right: 18rem; bottom: 18rem; border-radius: 100%; background: linear-gradient(#32363d, #2d3139); box-shadow: 0 0 0 1rem #22252c; }.knob-container .knob-wrapper-outer .knob-wrapper .knob { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }.knob-container .knob-wrapper-outer .knob-wrapper .knob:after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 100%; border: 4rem solid transparent; border-bottom-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob.d2:after { border-right-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob.d3:after { border-top-color: #528bff; border-right-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .handle { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 2; }.knob-container .knob-wrapper-outer .knob-wrapper .handle:before { content: ""; position: absolute; bottom: 6rem; left: 5rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2b2f37; }.knob-container .knob-wrapper-outer .knob-wrapper .handle:after { content: ""; position: absolute; bottom: 0rem; left: -1rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.knob-container .knob-wrapper-outer .knob-wrapper .pip { position: absolute; font-size: 11rem; color: #cccccc; pointer-events: none; }.knob-container .knob-wrapper-outer .knob-wrapper .pip.min { bottom: 6rem; left: 0; right: 50%; width: 50%; text-align: center; }.knob-container .knob-wrapper-outer .knob-wrapper .pip.max { bottom: 6rem; left: 50%; width: 50%; right: 0; text-align: center; }.led-container { width: 100rem; flex-shrink: 0; }.led-container .led { padding: 10rem 1rem 5rem; }.led-container .led div { border-radius: 100%; width: 60%; margin: 0 auto; overflow: hidden; background: #1a1d22; }.led-container .led div span { padding-bottom: 100%; display: block; background-color: #528bff; } \ No newline at end of file +@charset "UTF-8";* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; outline: 0; font: inherit; cursor: inherit; }a { cursor: pointer; display: block; }::-webkit-scrollbar { width: 20rem; height: 20rem; opacity: 1; }::-webkit-scrollbar-track-piece { background: #1a1d22; }::-webkit-scrollbar-track-piece:vertical { border-left: 1rem solid #1a1d22; }::-webkit-scrollbar-track-piece:horizontal { border-top: 1rem solid #1a1d22; }::-webkit-scrollbar-corner { background: #1a1d22; }::-webkit-scrollbar-thumb { background: linear-gradient(#2d3139, #2b2f37 15rem); }::-webkit-scrollbar-thumb:vertical { border-left: 1rem solid #1a1d22; }::-webkit-scrollbar-thumb:horizontal { border-top: 1rem solid #1a1d22; }* { -webkit-user-select: none; }input:focus::selection { background: #528bff; }input { cursor: text; }html, body { height: 100%; overflow: hidden; position: relative; }html { font-size: 1px; }body { font-size: 14rem; line-height: 16rem; font-family: sans; color: #cccccc; white-space: nowrap; opacity: 1; cursor: default; }.btn { background: linear-gradient(#2d3139, #2b2f37 15rem); display: block; box-shadow: 0 0 0 1rem #1a1d22; padding: 15rem; position: relative; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }.btn.small { padding: 5rem; padding-right: 15rem; }.btn.disabled { pointer-events: none; color: #999999; background: linear-gradient(#272a31, #25282f 15rem); }.btn.align-center { text-align: center; }a.btn:hover { background-image: linear-gradient(#32363d, #2d3139); }#lobby { background: #22252c; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 2; border: 1rem solid #1a1d22; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 20rem; }#lobby .main { width: 600rem; max-height: 100%; }#lobby .header { background: linear-gradient(#2d3139, #2b2f37 15rem); padding: 20rem; font-weight: bold; box-shadow: 0 0 0 1rem #1a1d22 inset; white-space: nowrap; text-overflow: ellipsis; }#lobby a { padding-right: 35rem; overflow: hidden; margin-top: 10rem; position: relative; white-space: nowrap; text-overflow: ellipsis; }#lobby a span { position: absolute; right: 0rem; top: 0rem; padding: 15rem; color: #999999; }#lobby a span:hover { color: #cccccc; }#container { background: #22252c; position: absolute; top: 0; left: 0; right: 0; bottom: 0; overflow: hidden; transition: right .2s; }#container.sidepanel-open { right: 300rem; }#container #open-toggle { position: absolute; right: 0; top: 2rem; width: 60rem; height: 60rem; padding: 0 10rem; line-height: 60rem; font-size: 24rem; text-align: center; color: #999999; z-index: 2; }#container #open-toggle.sidepanel-open { color: #cccccc; }#sidepanel { position: absolute; z-index: 999999; width: 300rem; top: 0; right: 0; bottom: 0; margin-right: -300rem; background: #282c34; border-left: 1rem solid #1a1d22; transition: right .2s; overflow-y: auto; overflow-x: visible; }#sidepanel.sidepanel-open { right: 300rem; }#sidepanel #options { position: absolute; left: 0; top: 2rem; right: 0; bottom: 0; padding: 5rem; list-style: none; background: #282c34; }#sidepanel #options li { display: block; margin-bottom: 5rem; background: linear-gradient(#2d3139, #2b2f37 15rem); position: relative; }#sidepanel #options li:last-child { margin-bottom: 0; }#sidepanel #options li .title { padding-bottom: 15rem; }#sidepanel #options li .actions { display: flex; align-items: stretch; }#sidepanel #options li .actions a { padding: 10rem; display: block; width: 100%; text-align: center; }#sidepanel #options li .actions a.on { pointer-events: none; }#sidepanel #options li .actions a.on:after { content: ""; position: absolute; top: 0; left: 0; right: 0; border-top: 2rem solid #528bff; }#sidepanel #options li span { position: absolute; right: 0rem; top: 0rem; padding: 5rem; color: #999999; }#sidepanel #options li span:hover { color: #cccccc; }#sidepanel #options .editor .form { margin-top: 10rem; }.editing:before { content: ""; z-index: 999; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border: 1px dashed #528bff; pointer-events: none; }.nicescroll-rails-hr { margin-top: 3rem; }.nicescroll-rails-vr { display: none !important; }a { color: inherit; }.navigation { position: absolute; top: 0; left: 0; right: 0; z-index: 1; font-size: 14rem; background: #22252c; border-bottom: 1rem solid #1a1d22; border-top: 1rem solid #282c34; height: 60rem; }.navigation ::first-letter { text-transform: uppercase; }.navigation.main { padding-right: 55rem; right: 0; }.navigation ul { list-style: none; display: flex; padding: 7rem 6rem; }.navigation ul li.on + li { border-image: none; border-left: 1rem solid transparent; }.navigation ul li { display: block; max-width: 250rem; flex: 1; border-width: 0 0 0 1rem; border-image: linear-gradient(rgba(26, 29, 34, 0), #1a1d22, rgba(26, 29, 34, 0)) 0 0 0 1 stretch; }.navigation ul li:first-child, .navigation ul li.on { border-image: none; border-left: 1rem solid transparent; }.navigation ul li:first-child { border-left: 0; }.navigation ul li a { display: block; padding: 5rem 10rem; line-height: 34rem; border-radius: 3rem; overflow: hidden; text-align: center; border: 1rem solid transparent; position: relative; color: #999999; }.navigation ul li a span { display: block; width: 100%; -webkit-mask: linear-gradient(to left, transparent, #000000 10rem) no-repeat; }.navigation ul li a.on { background: #282c34; border: 1rem solid #1a1d22; color: #cccccc; }.navigation ul li a.on:before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; box-shadow: inset 0 1rem 1rem rgba(255, 255, 255, 0.06); background: linear-gradient(rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)); }.navigation ul li a.on:after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4rem; }.content { position: absolute; left: 0; top: 60rem; right: 0; bottom: 0; background: #282c34; }.content .content { top: 60rem; }#loading { position: absolute; top: 50%; left: 50%; margin-top: -15rem; text-align: center; }#loading .spinner { display: block; margin: 0 auto; height: 30rem; width: 30rem; border-radius: 50%; border: 2rem solid rgba(0, 0, 0, 0.2); border-top-color: #528bff; animation: spin .5s linear infinite; }#loading #status { margin-top: 10rem; display: inline-block; }@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }.popup { position: fixed; top: 0; left: 0; right: 0; bottom: 0; padding: 10%; background: rgba(0, 0, 0, 0.5); z-index: 1000000; }.popup .popup-title { position: relative; padding: 15rem; background: linear-gradient(#2d3139, #2b2f37 15rem); }.popup .popup-title .closer { position: absolute; right: 0rem; top: 0; padding: 15rem; color: #999999; cursor: pointer; }.popup .popup-title .closer:hover { color: #cccccc; }.popup .popup-wrapper { background: #282c34; height: 100%; width: 100%; max-width: 600rem; margin: 0 auto; position: relative; overflow: hidden; border: 1rem solid #1a1d22; }.popup .popup-wrapper .popup-content { height: 100%; width: 100%; padding: 10rem; overflow-y: scroll; white-space: normal; }.form label { display: block; line-height: 15rem; font-size: 10rem; }.form .info { color: #999999; margin-bottom: 10rem; }.form input, .form .input { display: block; background: #22252c; font: inherit; color: #cccccc; border: 1rem solid #1a1d22; width: 100%; padding: 10rem; margin-bottom: 10rem; }.form input.invalid, .form .input.invalid { box-shadow: 0 0 0 1rem rgba(255, 0, 0, 0.3) !important; }.form input:focus, .form .input:focus { box-shadow: 0 0 0 1rem #528bff; }.form .submit { margin-top: 30rem; }.tab.on.stretch { display: flex; justify-content: space-between; }.tab.on.stretch > .widget { width: 100%; }.tab { display: none; overflow: auto; position: relative; }.tab.on { display: block; height: 100%; width: auto; }.widget { display: inline-block; height: auto; min-width: 100rem; overflow: hidden; position: relative; font-size: 13rem; padding: 35rem 0 0; vertical-align: top; border: 6rem solid transparent; border-width: 6rem 0; margin: 0 3rem; box-shadow: 0 0 0 1rem #22252c inset; background: linear-gradient(#2d3139, #2b2f37 15rem); background-clip: padding-box; -webkit-tap-highlight-color: transparent; }.widget:first-child { margin-left: 6rem; }.widget:last-child { margin-right: 6rem; }.widget.nolabel { padding-top: 0; }.widget.nolabel > .label { display: none; }.widget .label { z-index: 1; padding: 10rem 10rem; position: absolute; top: 0rem; left: 0; right: 0; text-overflow: ellipsis; overflow: hidden; height: 35rem; }.widget .label.accent { color: #528bff; }.widget input { width: 100%; height: 35rem; border: 0; background: #22252c; color: inherit; display: block; padding: 10rem; }.widget input:focus { box-shadow: 0 0 0 1rem #528bff inset !important; }.widget input[disabled] { color: #999999; }.master-dragging:after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 999999; }/* STRIP (contains any widgets) */.strip-container { width: 100rem; height: 100%; overflow: visible; border-bottom: 0; background: none; box-shadow: none; }.strip-container > .label { background: linear-gradient(#2d3139, #2b2f37 15rem); box-shadow: 0 0 0 1rem #22252c inset; }.strip-container .strip { height: 100%; display: flex; flex-direction: column; }.strip-container .strip > .widget { display: block; margin: 0; width: auto; }.strip-container .strip > .widget:not(:last-child) { border-bottom-width: 0; }.strip-container .strip > .widget:first-child  { border-top-width: 0; }.strip-container.nolabel:not(.horizontal) .strip > .widget:first-child { border-top: 0; }.strip-container.horizontal { padding-top: 0; padding-left: 40rem; width: 100%; height: auto; margin: 0; border-left-width: 6rem; display: block; }.strip-container.horizontal:last-child { margin-bottom: 6rem; }.strip-container.horizontal.nolabel { padding-left: 0; }.strip-container.horizontal .strip { flex-direction: row; align-items: flex-start; }.strip-container.horizontal .strip > .widget { border-bottom-width: 0; border-top-width: 0; border-right-width: 6rem; flex-shrink: initial; }.strip-container.horizontal .strip > .widget:last-child { border-right-width: 6rem; }.strip-container.horizontal > .label { width: 35rem; height: 100%; left: 0; top: 0; }.strip-container.horizontal > .label span { transform: rotate(180deg); display: block; position: relative; overflow: hidden; text-overflow: ellipsis; -webkit-writing-mode: vertical-lr; text-align: center; height: 100%; }.panel-container { position: absolute; margin: 0 !important; border-top: 0; z-index: 2; }.panel-container .panel { height: 100%; padding: 6rem 0; overflow: auto; position: relative; }.panel-container .panel > .widget { border: 0; }.panel-container .panel.stretch { display: flex; justify-content: space-between; }.panel-container .panel.stretch > .widget { width: 100%; }.panel-container .panel::-webkit-scrollbar-thumb, .panel-container .panel::-webkit-scrollbar-track-piece { border: 1rem solid #22252c; }/* BUTTONS */.toggle-container { width: 100rem; flex-shrink: 0; padding: 0 !important; cursor: pointer; }.toggle-container .label { position: absolute; top: 0; left: 0; right: 0; bottom: 0; padding: 29rem 10rem 26rem; line-height: 1rem; background: none !important; text-align: center; pointer-events: none; }.toggle-container:hover { background-image: linear-gradient(#32363d, #2d3139); }.toggle { z-index: 1; padding: 29rem 10rem 26rem; }.toggle .light { position: absolute; left: 4rem; right: 4rem; top: 4rem; height: 4rem; background: #1a1d22; border-radius: 3rem; }.toggle.on .light { background: #528bff; }.switch-container { width: 100rem; flex-shrink: 0; }.switch-container .switch { height: 100%; width: 100%; cursor: pointer; display: flex; flex-direction: column; align-items: stretch; padding: 1rem; }.switch-container .switch .value { background: linear-gradient(#2d3139, #2b2f37 15rem); color: #999999; width: 100%; position: relative; border-top: 1rem solid #282c34; padding: 12rem 12rem 12rem 24rem; white-space: normal; text-align: left; word-break: break-all; overflow: hidden; }.switch-container .switch .value:hover { background: linear-gradient(#32363d, #2d3139); }.switch-container .switch .value:last-child { margin-bottom: 0; }.switch-container .switch .value:first-child { border-top: 0; }.switch-container .switch .value:after { content: ""; position: absolute; left: 8rem; top: 50%; width: 8rem; height: 8rem; margin-top: -4rem; background: #1a1d22; border-radius: 8rem; }.switch-container .switch .value.on:after { background: #528bff; }/* XY */.xy-container, .rgb-container { width: 300rem; flex-shrink: 0; }.xy-wrapper { overflow: hidden; }.xy-wrapper .value { width: 100%; }.xy-wrapper input { width: 50%; float: left; padding: 2rem; text-align: center; position: relative; left: 0rem; right: 0rem; box-shadow: 0 0 1rem 0 #1a1d22 inset; }.xy { position: relative; width: auto; margin-left: 1rem; margin-right: 1rem; padding-bottom: 90%; overflow: hidden; background: rgba(0, 0, 0, 0.5); cursor: -webkit-grab; }.xy:active { cursor: -webkit-grabbing; }.xy:active .handle:after, .xy:active .handle:before { transform: scale(1.5); }.xy .handle { position: absolute; height: 0rem; width: 0rem; bottom: 0; left: 0; max-height: 100%; max-width: 100%; z-index: 2; pointer-events: none; }.xy .handle:before { content: ""; position: absolute; top: -4rem; right: -4rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2b2f37; }.xy .handle:after { content: ""; position: absolute; top: -10rem; right: -10rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.rgb-wrapper input { width: 33.33%; }.rgb { background-color: red; }.rgb:before, .rgb:after { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 100%; }.rgb:before { background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%); }.rgb:after { background: linear-gradient(to bottom, transparent 0%, black 100%); }.rgb .handle:before { box-shadow: none; background: #cccccc; }.rgb .handle:after { box-shadow: 0 0 0 1000rem rgba(0, 0, 0, 0.5); }.hue { width: auto; margin-left: 1rem; margin-right: 1rem; height: 30rem; background: transparent linear-gradient(to left, #F00, #FF0080, #F0F, #8000FF, #00F, #0080FF, #0FF, #00FF80, #0F0, #80FF00, #FF0, #FF8000, #F00) repeat scroll 0% 0%; overflow: hidden; position: relative; cursor: -webkit-grab; }.hue:active { cursor: -webkit-grabbing; }.hue:active .handle:after { transform: scale(1.5); }.hue .handle { position: absolute; height: 100%; max-width: 100%; width: 0; z-index: 2; left: 0; bottom: 0; pointer-events: none; }.hue .handle:before { content: ""; position: absolute; top: 50%; margin-top: -4rem; right: -4rem; height: 8rem; width: 8rem; border: none !important; border-radius: 100% !important; box-shadow: none; background: #cccccc; }.hue .handle:after { content: ""; position: absolute; top: 50%; margin-top: -10rem; right: -10rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1000rem rgba(0, 0, 0, 0.5); }.fader-container { width: 100rem; min-width: 80rem; height: 100%; min-height: 300rem; }.fader-container.nolabel .fader-wrapper-outer { top: 0; }.fader-container .fader-wrapper-outer { padding-bottom: 30rem; position: absolute; top: 30rem; bottom: 0; left: 0; right: 0; }.fader-container .fader-wrapper-outer input { position: absolute; bottom: 0; }.fader-container .fader-wrapper { padding: 20rem; overflow: hidden; height: 100%; position: relative; cursor: -webkit-grab; }.fader-container .fader-wrapper:active { cursor: -webkit-grabbing; }.fader-container .fader-wrapper .fader { height: 100%; width: 4rem; background: #1a1d22; position: relative; margin: 0 auto; left: -25rem; pointer-events: none; }.fader-container .fader-wrapper .fader.nogauge .handle { background: none; }.fader-container .fader-wrapper .fader .handle { position: absolute; bottom: 0 !important; top: auto !important; width: 100%; height: 0rem; max-height: 100%; max-width: 100%; background: #528bff; z-index: 1; }.fader-container .fader-wrapper .fader .handle:before { content: ""; position: absolute; top: -6rem; left: -2rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2b2f37; }.fader-container .fader-wrapper .fader .handle:after { content: ""; position: absolute; top: -12rem; left: -8rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.fader-container .fader-wrapper .pips { position: absolute; top: -1%; bottom: 1%; left: 14rem; }.fader-container .fader-wrapper .pips .pip { height: 1%; width: 4rem; border-bottom: 1px solid #cccccc; }.fader-container .fader-wrapper .pips .pip.val { width: 10rem; position: relative; }.fader-container .fader-wrapper .pips .pip.val span { position: relative; width: 30rem; display: block; text-align: center; font-size: 11rem; line-height: 12rem; left: 15rem; top: -2rem; color: #cccccc; }.fader-container.horizontal { min-height: 80rem; height: auto; width: 300rem; flex-shrink: 0; }.fader-container.horizontal .fader-wrapper-outer { position: relative; top: auto; padding-bottom: 35rem; }.fader-container.horizontal .fader-wrapper-outer .fader-wrapper { padding: 20rem 20rem 50rem; }.fader-container.horizontal .fader-wrapper-outer .fader { width: 100%; left: auto; height: 4rem; }.fader-container.horizontal .fader-wrapper-outer .fader .handle { height: 100% !important; width: 0; }.fader-container.horizontal .fader-wrapper-outer .fader .handle:before { top: -2rem; right: -6rem; left: auto; }.fader-container.horizontal .fader-wrapper-outer .fader .handle:after { top: -8rem; right: -12rem; left: auto; }.fader-container.horizontal .fader-wrapper-outer .pips { top: 14rem; left: 0; right: 0; display: flex; flex-direction: row; align-items: stretch; }.fader-container.horizontal .fader-wrapper-outer .pip { width: 100%; display: block; height: 4rem; border-bottom: 0; border-right: 1rem solid #999999; }.fader-container.horizontal .fader-wrapper-outer .pip.val { width: 1%; float: left; height: 10rem; }.fader-container.horizontal .fader-wrapper-outer .pip.val span { top: 15rem; left: -15rem; }.knob-container { width: 100rem; min-height: 135rem; flex-shrink: 0; padding-top: 15rem; }.knob-container.nolabel .knob-wrapper-outer { top: 0; }.knob-container .knob-wrapper-outer { width: 100%; top: 30rem; bottom: 0; padding-bottom: 30rem; overflow: hidden; }.knob-container .knob-wrapper-outer input { bottom: 0; position: absolute; z-index: 1; }.knob-container .knob-wrapper-outer.nogauge .knob:after, .knob-container .knob-wrapper-outer.nogauge .knob-mask:after { display: none; }.knob-container .knob-wrapper-outer.nogauge .knob-wrapper .knob:before { content: ""; position: absolute; top: auto; bottom: 6rem; left: 6rem; height: 7rem; width: 7rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 3rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2b2f37; }.knob-container .knob-wrapper-outer .knob-wrapper { padding: 20rem; margin: 0 auto; width: 95rem; position: relative; cursor: -webkit-grab; }.knob-container .knob-wrapper-outer .knob-wrapper:active { cursor: -webkit-grabbing; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask { width: 100%; padding-bottom: 100%; border-radius: 100%; pointer-events: none; position: relative; box-shadow: 0 0 0 4rem #1a1d22 inset; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask:before { position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 100%; border: 4rem solid #1a1d22; box-shadow: 0 0 0 1rem #2b2f37, 0 0 0 1rem #2b2f37 inset, 0 0 1rem 1rem #2b2f37, 0 0 1rem 1rem #2b2f37 inset; transform: rotate(45deg); z-index: 1; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-left:before { content: ""; border-left-color: transparent; border-bottom-color: transparent; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-left .knob:after { border-color: transparent; border-left-color: #528bff; border-top-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-right:before { content: ""; border-right-color: transparent; border-top-color: transparent; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask.pan-right .knob:after { border-color: transparent; border-right-color: #528bff; border-bottom-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob-mask:after { content: ""; position: absolute; top: 0rem; left: -3rem; right: -3rem; bottom: -2rem; border-radius: 100%; border: 12rem solid transparent; border-bottom-color: #2b2f37; z-index: 1; }.knob-container .knob-wrapper-outer .knob-wrapper .round { content: ""; position: absolute; top: 18rem; left: 18rem; right: 18rem; bottom: 18rem; border-radius: 100%; background: linear-gradient(#32363d, #2d3139); box-shadow: 0 0 0 1rem #22252c; }.knob-container .knob-wrapper-outer .knob-wrapper .knob { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; }.knob-container .knob-wrapper-outer .knob-wrapper .knob:after { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: 100%; border: 4rem solid transparent; border-bottom-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob.d2:after { border-right-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .knob.d3:after { border-top-color: #528bff; border-right-color: #528bff; }.knob-container .knob-wrapper-outer .knob-wrapper .handle { position: absolute; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: 2; }.knob-container .knob-wrapper-outer .knob-wrapper .handle:before { content: ""; position: absolute; bottom: 6rem; left: 5rem; height: 8rem; width: 8rem; background: #528bff; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 6rem rgba(82, 139, 255, 0.2), 0 0 2rem 0 #2b2f37; }.knob-container .knob-wrapper-outer .knob-wrapper .handle:after { content: ""; position: absolute; bottom: 0rem; left: -1rem; height: 20rem; width: 20rem; border: none !important; border-radius: 100% !important; box-shadow: 0 0 0 1rem rgba(82, 139, 255, 0.2) inset; }.knob-container .knob-wrapper-outer .knob-wrapper .pip { position: absolute; font-size: 11rem; color: #cccccc; pointer-events: none; }.knob-container .knob-wrapper-outer .knob-wrapper .pip.min { bottom: 6rem; left: 0; right: 50%; width: 50%; text-align: center; }.knob-container .knob-wrapper-outer .knob-wrapper .pip.max { bottom: 6rem; left: 50%; width: 50%; right: 0; text-align: center; }.led-container { width: 100rem; flex-shrink: 0; }.led-container .led { padding: 10rem 1rem 5rem; }.led-container .led div { border-radius: 100%; width: 60%; margin: 0 auto; overflow: hidden; background: #1a1d22; }.led-container .led div span { padding-bottom: 100%; display: block; background-color: #528bff; } \ No newline at end of file diff --git a/app/browser/js/app/callbacks.js b/app/browser/js/app/callbacks.js index 5d98500b..0cdd89d1 100644 --- a/app/browser/js/app/callbacks.js +++ b/app/browser/js/app/callbacks.js @@ -13,11 +13,12 @@ ipc.on('receiveOsc',function(data){ }) -ipc.on('load',function(preset){ - setState(preset) +ipc.on('stateLoad',function(preset){ + stateSet(preset) + stateQuickSave(preset) }) -ipc.on('listSessions',function(data){ +ipc.on('sessionList',function(data){ $('#lobby').append('\
\
\ @@ -32,7 +33,7 @@ ipc.on('listSessions',function(data){ $('#lobby .list').append('...') $('#lobby .load').click(function(e){ e.stopPropagation() - ipc.send('openSession',{path:$(this).data('session')}) + ipc.send('sessionOpen',{path:$(this).data('session')}) }) $('#lobby a span').click(function(e){ e.stopPropagation() @@ -41,11 +42,11 @@ ipc.on('listSessions',function(data){ }) $('#lobby .browse').click(function(e){ e.stopPropagation() - browseSessions() + sessionBrowse() }) }) -ipc.on('openSession',function(data){ +ipc.on('sessionOpen',function(data){ var session = JSON.parse(data) $('#lobby').remove() diff --git a/app/browser/js/app/editor.js b/app/browser/js/app/editor.js index 887552c9..4e9bc938 100644 --- a/app/browser/js/app/editor.js +++ b/app/browser/js/app/editor.js @@ -153,8 +153,6 @@ enableEditor = function(){ var updateSession = function(){ - $('#container').empty() - init(session,function(){ enableEditor() for (i in ontab) { @@ -284,8 +282,6 @@ enableEditor = function(){ var updateSession = function(){ - $('#container').empty() - init(session,function(){ enableEditor() for (i in ontab) { diff --git a/app/browser/js/app/init.js b/app/browser/js/app/init.js index 516f9874..b7490b59 100644 --- a/app/browser/js/app/init.js +++ b/app/browser/js/app/init.js @@ -1,52 +1,56 @@ init = function(session,callback) { + $('#container').empty() + parsetabs(session,$('#container')) // create sidepanel $('#sidepanel').append(createMenu([ { - label:'Save', - click:saveState, - icon:'save' - }, - { - label:'Load', - click:loadState, - icon:'folder-open' - }, - { - label:'Load last state', - click:loadLastState, - icon:'history' - }, - { - label:'Send all', - click:sendState, - icon:'feed' + html: ` +
+
 Snapshot
+
+ Store + Recall + Send +
+
+ Import + Export +
+
+ ` }, { - label:'Fullscreen', + label:'Fullscreen (F11)', click:toggleFullscreen, icon:'tv' }, { html:`
-
 Editor
+
 Session editor
- On - Off - Root - + On + Off + Root +
+
+ Open + Save
`, } ])) - $('.enable-editor').click(enableEditor) - $('.disable-editor').click(disableEditor) + $('[data-action]').each(function(){ + $(this).click(function(){ + eval($(this).attr('data-action')+'()') + }) + }) diff --git a/app/browser/js/app/utils.js b/app/browser/js/app/utils.js index 95573b85..4293f4a7 100644 --- a/app/browser/js/app/utils.js +++ b/app/browser/js/app/utils.js @@ -2,22 +2,32 @@ sendOsc = function(data){ ipc.send('sendOsc', data) } -var laststate +var state -saveState = function () { - var data = getState() +stateQuickSave = function(preset){ + if (preset) { + state = preset + } else { + state = stateGet() + } + $('[data-action="stateQuickLoad"]').removeClass('disabled') +} +stateQuickLoad = function(){ + stateSet(state) +} +stateSave = function() { + state = stateGet() if (webFrame) { - ipc.send('save',data) + ipc.send('stateSave',state) } else { var down = $('') - var blob = new Blob([data],{type : 'text/plain'}); + var blob = new Blob([state],{type : 'text/plain'}); down.attr('href', window.URL.createObjectURL(blob)) down[0].click() - laststate = data } } -getState = function (){ +stateGet = function (){ var data = [] $.each(__widgets__,function(i,widget) { var v = widget[0].getValue() @@ -25,9 +35,9 @@ getState = function (){ }) return data.join('\n') } -loadState = function() { +stateLoad = function() { if (webFrame) { - ipc.send('load') + ipc.send('stateLoad') } else { var prompt = $('') prompt.click() @@ -35,34 +45,27 @@ loadState = function() { var reader = new FileReader(); reader.onloadend = function(e) { var preset = e.target.result - setState(preset,true) + stateSet(preset) laststate = preset } reader.readAsText(e.target.files[0],'utf-8'); }) } } -loadLastState = function() { - if (webFrame) { - ipc.send('loadlast') - } else if (laststate) { - setState(laststate,true) - } -} -sendState = function(){ - var data = getState() - setState(data,true) +stateSend = function(){ + var data = stateGet() + stateSet(data) } -setState = function(preset,send){ +stateSet = function(preset){ $.each(preset.split('\n'),function(i,d) { var data = d.split(' ') setTimeout(function(){ if (__widgets__[data[0]]!=undefined) { - __widgets__[data[0]][0].setValue(data[1].split(','),send,true) + __widgets__[data[0]][0].setValue(data[1].split(','),true,true) } },i) }) @@ -82,10 +85,10 @@ toggleFullscreen = function(){ } } -browseSessions = function(){ +sessionBrowse = function(){ if (webFrame) { - ipc.send('browseSessions') + ipc.send('sessionBrowse') } else { var prompt = $('') prompt.click() @@ -100,6 +103,19 @@ browseSessions = function(){ } } +sessionSave = function() { + var sessionfile = JSON.stringify(session) + if (webFrame) { + ipc.send('sessionSave',sessionfile) + } else { + var down = $('') + var blob = new Blob([sessionfile],{type : 'text/plain'}); + down.attr('href', window.URL.createObjectURL(blob)) + down[0].click() + } + +} + icon = function(i) { return `` diff --git a/app/browser/scss/style.scss b/app/browser/scss/style.scss index 87a099cd..574d8c14 100644 --- a/app/browser/scss/style.scss +++ b/app/browser/scss/style.scss @@ -141,7 +141,7 @@ body { .btn { background: $bg-3d; display: block; - border:1rem solid $color-border; + box-shadow: 0 0 0 1rem $color-border; padding:15rem; position: relative; white-space: nowrap; @@ -168,32 +168,6 @@ a.btn { -.editor { - .actions { - margin-top:10rem; - display: flex; - align-items: stretch; - a { - display: block; - width:100%; - padding:10rem; - &.on { - pointer-events: none; - border-top:2rem solid $color-accent; - } - } - } -} -.editing:before { - content:""; - z-index: 999; - position: absolute; - top:0;left:0; - right:0; - bottom:0; - border:1px dashed $color-accent; - pointer-events: none; -} @@ -313,6 +287,31 @@ a.btn { &:last-child { margin-bottom: 0 } + .title { + padding-bottom:15rem; + } + .actions { + display: flex; + align-items: stretch; + a { + padding:10rem; + display: block; + width:100%; + text-align: center; + &.on { + pointer-events: none; + + &:after { + content:""; + position: absolute; + top:0; + left:0; + right:0; + border-top:2rem solid $color-accent; + } + } + } + } span { position: absolute; right:0rem; @@ -331,6 +330,18 @@ a.btn { } } +.editing:before { + content:""; + z-index: 999; + position: absolute; + top:0;left:0; + right:0; + bottom:0; + border:1px dashed $color-accent; + pointer-events: none; +} + + diff --git a/app/main/main.js b/app/main/main.js index a1e7d947..19bd8b94 100644 --- a/app/main/main.js +++ b/app/main/main.js @@ -209,29 +209,29 @@ ipc.send = function(name,data) { ipc.on('ready',function(){ callbacks.ready() }) -ipc.on('browseSessions',function(event, data){ - callbacks.browseSessions(data) +ipc.on('sessionBrowse',function(event, data){ + callbacks.sessionBrowse(data) }) -ipc.on('addSessionToHistory',function(event, data){ - callbacks.addSessionToHistory(data) +ipc.on('sessionSave',function(event, data){ + callbacks.sessionSave(data) }) -ipc.on('removeSessionFromHistory',function(event, data){ - callbacks.removeSessionFromHistory(data) +ipc.on('sessionAddToHistory',function(event, data){ + callbacks.sessionAddToHistory(data) }) -ipc.on('openSession',function(event, data){ - callbacks.openSession(data) +ipc.on('sessionRemoveFromHistory',function(event, data){ + callbacks.sessionRemoveFromHistory(data) +}) +ipc.on('sessionOpen',function(event, data){ + callbacks.sessionOpen(data) }) ipc.on('sendOsc', function (event,data) { callbacks.sendOsc(data) }) -ipc.on('save', function(event, data){ - callbacks.save(data) +ipc.on('stateSave', function(event, data){ + callbacks.stateSave(data) }) -ipc.on('load', function(event, data){ - callbacks.load(data) -}) -ipc.on('loadlast', function(event, data){ - callbacks.loadlast(data) +ipc.on('stateLoad', function(event, data){ + callbacks.stateLoad(data) }) ipc.on('fullscreen', function(event){ callbacks.fullscreen() @@ -242,21 +242,35 @@ ipc.on('fullscreen', function(event){ var callbacks = {} callbacks.ready = function(data,clientId) { - if (settings.read('sessionFile')) callbacks.openSession({path:settings.read('sessionFile')},clientId) + if (settings.read('sessionFile')) callbacks.sessionOpen({path:settings.read('sessionFile')},clientId) var recentSessions = settings.read('recentSessions') - ipc.send('listSessions',recentSessions,clientId) + ipc.send('sessionList',recentSessions,clientId) } -callbacks.browseSessions = function(data) { +callbacks.sessionBrowse = function(data) { var sessionlist = settings.read('recentSessions') dialog.showOpenDialog(window,{title:'Load session file',defaultPath:settings.read('sessionPath'),filters: [ { name: 'OSC Session file', extensions: ['js'] }]},function(file){ if (file==undefined) {return} settings.write('sessionPath',file[0].replace(file[0].split('/').pop(),'')) - callbacks.openSession({path:file[0]}) + callbacks.sessionOpen({path:file[0]}) }) } +callbacks.sessionSave = function(data) { + dialog.showSaveDialog(window,{title:'Save current session',defaultPath:settings.read('sessionPath'),filters: [ { name: 'OSC Session file', extensions: ['js'] }]},function(file){ -callbacks.addSessionToHistory = function(data) { + if (file==undefined) {return} + settings.write('sessionPath',file.replace(file.split('/').pop(),'')) + + if (file.indexOf('.js')==-1){file+='.js'} + fs.writeFile(file,data, function (err, data) { + if (err) throw err + console.log('The session was saved in '+file) + }) + }) +} + + +callbacks.sessionAddToHistory = function(data) { var sessionlist = settings.read('recentSessions') // add session to history sessionlist.unshift(data) @@ -268,13 +282,13 @@ callbacks.addSessionToHistory = function(data) { settings.write('recentSessions',sessionlist) } -callbacks.removeSessionFromHistory = function(data) { +callbacks.sessionRemoveFromHistory = function(data) { var sessionlist = settings.read('recentSessions') sessionlist.splice(data,1) settings.write('recentSessions',sessionlist) } -callbacks.openSession = function(data,clientId) { +callbacks.sessionOpen = function(data,clientId) { var file = data.file || fs.readFileSync(data.path,'utf8'), session, error @@ -286,8 +300,8 @@ callbacks.openSession = function(data,clientId) { } if (!error) { - if (data.path) callbacks.addSessionToHistory(data.path) - ipc.send('openSession',JSON.stringify(session),clientId) + if (data.path) callbacks.sessionAddToHistory(data.path) + ipc.send('sessionOpen',JSON.stringify(session),clientId) } else { ipc.send('error',{title:'Error: invalid session file',text:error}) } @@ -311,7 +325,7 @@ callbacks.sendOsc = function(data) { } } -callbacks.save = function(data) { +callbacks.stateSave = function(data) { dialog.showSaveDialog(window,{title:'Save current state to preset file',defaultPath:settings.read('presetPath').replace(settings.read('presetPath').split('/').pop(),''),filters: [ { name: 'OSC Preset', extensions: ['preset'] }]},function(file){ if (file==undefined) {return} @@ -325,7 +339,7 @@ callbacks.save = function(data) { }) } -callbacks.load = function(data,clientId) { +callbacks.stateLoad = function(data,clientId) { dialog.showOpenDialog(window,{title:'Load preset file',defaultPath:settings.read('presetPath').replace(settings.read('presetPath').split('/').pop(),''),filters: [ { name: 'OSC Preset', extensions: ['preset'] }]},function(file){ if (file==undefined) {return} @@ -333,19 +347,11 @@ callbacks.load = function(data,clientId) { fs.readFile(file[0],'utf-8', function read(err, data) { if (err) throw err - ipc.send('load',data,clientId) + ipc.send('stateLoad',data,clientId) }) }) } -callbacks.loadlast = function(data,clientId) { - if (!settings.read('presetPath')) {return} - fs.readFile(settings.read('presetPath'),'utf-8', function read(err, data) { - if (err) throw err - ipc.send('load',data,clientId) - }) -} - callbacks.fullscreen = function(data) { window.setFullScreen(!window.isFullScreen()) }