changeset 1592:7943daa149da

rm old subserver pages Ignore-this: cbf3e2502c92ddc93f01f485f8353fe6
author Drew Perttula <drewp@bigasterisk.com>
date Thu, 01 Jun 2017 08:39:20 +0000
parents 2713d2f7a0fc
children 6059de6659c3
files light9/subserver/effects.coffee light9/subserver/effects.jade light9/subserver/gui.coffee light9/subserver/index.jade
diffstat 4 files changed, 0 insertions(+), 182 deletions(-) [+]
line wrap: on
line diff
--- a/light9/subserver/effects.coffee	Thu Jun 01 08:35:16 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-class Model
-  constructor: ->
-    @classes = ko.observable([])
-    
-    @chases = ko.observable([])
-    @moreExprs = [
-      {label: "rainbow", expr: "hsv(t*1,1,1)"},
-      {label: "pulserainbow", expr: "hsv(t*1,1,1)*nsin(t*2)"},
-      {label: "stacrainbow", expr: "hsv(t*1,1,1)*(nsin(t*2)>.7)"},
-      {label: "alternatergb", expr: "hsv(t*1,1,1, light='left')*nsin(t*3) + hsv(t*1,1,1,light='right')*(1-nsin(t*3))"},
-      {label: "frontchase", expr: "chase(t, names=frontchase, ontime=.3, offset=-.11)"},
-      {label: "bumpyhues", expr: "hsv(t*.5,.4,1)*notch(t*.01)"},
-      ]
-
-  subtermLink: (label, expr) =>
-    "http://chase?"+$.param({
-      subtermName: label
-      subtermExpr: label + '_env(t) * ' + expr
-      curve: label + '_env'
-    })
-  subtermExprs: (chase) =>
-    [
-      'chase(t, names=LABEL, ontime=0.5, offset=0.2)'.replace(/LABEL/g, chase.label)
-    ]
-  
-
-model = new Model()
-
-model.addToCurrentSong = (e) ->
-  $.ajax({
-    type: 'POST'
-    url: '/effectEval/songEffects'
-    data: {drop: e.uri}
-  })
-
-lastMomentaryNote = null
-
-model.addMomentary = (e) ->
-  $.ajax({
-    type: 'POST'
-    url: '/effectEval/songEffects'
-    data: {drop: e.uri, event: 'start'}
-    success: (data) ->
-      lastMomentaryNote = JSON.parse(data)['note']
-
-  })
-
-model.addMomentaryUp = (e) ->
-  $.ajax({
-    type: 'POST'
-    url: '/effectEval/songEffects'
-    data: {drop: e.uri, event: 'end', note: lastMomentaryNote}
-  })
-
-
-  
-
-reconnectingWebSocket "../effectsUpdates", (msg) ->
-  model.chases(msg.chases) if msg.chases?
-  model.classes(msg.classes) if msg.classes?
-
-# this sort of works to stop clicks in <input> from following the
-# submaster hyperlink, but it may make certain clicks act wrong
-$(document).on('click', 'a', (ev) ->
-  return false if ev.target.tagName == 'INPUT'
-)
-
-ko.applyBindings(model)
\ No newline at end of file
--- a/light9/subserver/effects.jade	Thu Jun 01 08:35:16 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-doctype html
-html
-  head
-    title effects
-    link(rel='stylesheet', href='/style.css')
-    style.
-      .headerRow {
-        display: flex;
-        justify-content: space-between;
-      }
-  body
-    #status starting...
-    h1 Effects
-    p: a(href='.') Go to Submasters
-
-
-    div(data-bind="foreach: moreExprs")
-      div.resource.chase
-        span(data-bind="text: label")
-        | 
-        a.resource(data-bind="attr: {href: $root.subtermLink(label, expr)}, text: expr")
-    
-    div(data-bind="foreach: chases")
-      div.resource.chase
-        | Chase
-        a(data-bind="attr: {href: uri}, text: label")
-        ul(data-bind="foreach: $parent.subtermExprs($data)")
-          li: a.resource(data-bind="attr: {href: $root.subtermLink($parent.label, $data)}, text: $data")
-
-
-    div(data-bind="foreach: classes")
-      div.resource.effectClass
-        div.headerRow
-          span
-            h2
-              | Effect class
-              | 
-              resource-display(data-bind="attr: {uri: uri, graph: graph}")
-              a(data-bind="attr: {href: uri}, text: label")
-              button(data-bind="click: $root.onRename") Rename
-          span.rightTools
-            button(data-bind="click: $root.addToCurrentSong") Add to current song
-            button(data-bind="event: { mousedown: $root.addMomentary, mouseup: $root.addMomentaryUp }") Add momentary
-        div.rename
-          input
-        div
-          code(data-bind="text: code")
-        
-    #status
-      
-    script(src="/lib/jquery/dist/jquery.min.js")
-    script(src="/lib/knockout/dist/knockout.js")
-    script(src="/websocket.js")
-    script(src="effects.js")
\ No newline at end of file
--- a/light9/subserver/gui.coffee	Thu Jun 01 08:35:16 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-class Model
-  constructor: ->
-    @subs = ko.observable([])
-    @showLocal = ko.observable(false)
-
-  snapshot: (sub) =>
-    $.ajax({
-      url: "snapshot"
-      type: "POST"
-      data: {about: sub.uri}
-    })
-
-model = new Model()
-
-# this sort of works to stop clicks in <input> from following the
-# submaster hyperlink, but it may make certain clicks act wrong
-$(document).on('click', 'a', (ev) ->
-  return false if ev.target.tagName == 'INPUT'
-)
-
-reconnectingWebSocket "live", (msg) ->
-  model.subs(msg.subs) if msg.subs?
-
-
-ko.applyBindings(model)
\ No newline at end of file
--- a/light9/subserver/index.jade	Thu Jun 01 08:35:16 2017 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-doctype html
-html
-  head
-    title subs
-    link(rel='stylesheet', href='/style.css')
-  body
-    #status starting...
-    h1 Submasters
-    p: a(href='effects') Go to Effects
-
-    div
-      input(type='checkbox', data-bind='checked: showLocal', id='showLocal')
-      label(for='showLocal') show local
-    
-    div(data-bind="foreach: subs")
-      // ko if: $parent.showLocal() || !isLocal
-      a.resource.sub(data-bind="css: {local: isLocal}, attr: {href: uri}")
-        div(data-bind="if: isLocal") (local)
-        div
-          | Label
-          input(type="text", data-bind="value: label")
-        div
-          img(data-bind="attr: {src: img}")
-        div
-          button(data-bind="click: $root.snapshot")
-            New snapshot
-            
-      // /ko
-
-    #status
-      
-    script(src="/lib/jquery/dist/jquery.min.js")
-    script(src="/lib/knockout/dist/knockout.js")
-    script(src="/websocket.js")
-    script(src="gui.js")
\ No newline at end of file