changeset 2103:1ef921880e37

start fade (replaces KC)
author drewp@bigasterisk.com
date Wed, 01 Jun 2022 01:12:23 -0700
parents 9c2e1b5c16e9
children 6a9f9af9d3b8
files bin/fade light9/fade/web/Light9FadeUi.ts light9/fade/web/index.html light9/fade/web/vite.config.ts package.json pnpm-lock.yaml show/dance2019/networking.n3
diffstat 7 files changed, 175 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/fade	Wed Jun 01 01:12:23 2022 -0700
@@ -0,0 +1,4 @@
+#!/bin/sh
+pnpx vite -c light9/fade/web/vite.config.ts &
+wait
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/light9/fade/web/Light9FadeUi.ts	Wed Jun 01 01:12:23 2022 -0700
@@ -0,0 +1,88 @@
+import debug from "debug";
+import { css, html, LitElement } from "lit";
+import { customElement, property } from "lit/decorators.js";
+import { NamedNode } from "n3";
+import { getTopGraph } from "../../web/RdfdbSyncedGraph";
+import { SyncedGraph } from "../../web/SyncedGraph";
+
+import { provideFASTDesignSystem, fastSlider, fastSliderLabel } from "@microsoft/fast-components";
+
+provideFASTDesignSystem().register(fastSlider(), fastSliderLabel());
+
+debug.enable("*");
+const log = debug("fade");
+
+@customElement("light9-fade-ui")
+export class Light9FadeUi extends LitElement {
+  static styles = [
+    css`
+      :host {
+        display: block;
+      }
+    `,
+  ];
+  render() {
+    return html`
+      <rdfdb-synced-graph></rdfdb-synced-graph>
+
+      <h1>Fade <a href="metrics">[metrics]</a></h1>
+      <light9-fader></light9-fader>
+      <light9-fader></light9-fader>
+    `;
+  }
+
+  graph!: SyncedGraph;
+
+  constructor() {
+    super();
+    getTopGraph().then((g) => {
+      this.graph = g;
+    });
+  }
+}
+
+@customElement("light9-fader")
+export class Light9Fader extends LitElement {
+  static styles = [
+    css`
+      :host {
+        display: inline-block;
+      }
+      fast-slider {
+        height: 256px;
+      }
+      fast-slider > .track {
+        background: #e3bbc0;
+        box-shadow: 0 0 8px;
+      }
+      fast-slider {
+        --accent-foreground-rest: #0a0a0c;
+      }
+    `,
+  ];
+  render() {
+    return html`
+      <fast-slider orientation="vertical" value=${this.value} step=${1 / 255} min="1" max="0" @change=${this.onSliderInput}>
+        <fast-slider-label label="0"></fast-slider-label>
+        <fast-slider-label label="1.0"></fast-slider-label>
+      </fast-slider>
+      <div>${this.value.toPrecision(3)}</div>
+      <div>curtain</div>
+      <div>Slider 1</div>
+    `;
+  }
+
+  graph!: SyncedGraph;
+  @property() value: number = 0.111;
+
+  constructor() {
+    super();
+    getTopGraph().then((g) => {
+      this.graph = g;
+    });
+  }
+  onSliderInput(ev: CustomEvent) {
+    this.value = (ev.target as any).valueAsNumber;
+    
+  }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/light9/fade/web/index.html	Wed Jun 01 01:12:23 2022 -0700
@@ -0,0 +1,12 @@
+<!doctype html>
+<html>
+  <head>
+    <title>fade</title>
+    <meta charset="utf-8" />
+    <link rel="stylesheet" href="./style.css">    
+    <script type="module" src="../fade/Light9FadeUi"></script>
+  </head>
+  <body>
+    <light9-fade-ui></light9-fade-ui>
+  </body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/light9/fade/web/vite.config.ts	Wed Jun 01 01:12:23 2022 -0700
@@ -0,0 +1,20 @@
+import { defineConfig } from "vite";
+
+const servicePort = 8219;
+export default defineConfig({
+  base: "/fade/",
+  root: "./light9/fade/web",
+  publicDir: "../web",
+  server: {
+    host: "0.0.0.0",
+    strictPort: true,
+    port: servicePort + 100,
+    hmr: {
+      port: servicePort + 200,
+    },
+  },
+  clearScreen: false,
+  define: {
+    global: {},
+  },
+});
--- a/package.json	Tue May 31 23:39:58 2022 -0700
+++ b/package.json	Wed Jun 01 01:12:23 2022 -0700
@@ -10,6 +10,7 @@
   },
   "dependencies": {
     "@material/mwc-slider": "^0.26.1",
+    "@microsoft/fast-components": "^2.30.6",
     "@types/async": "^3.2.13",
     "@types/d3": "^7.1.0",
     "@types/debug": "^4.1.7",
--- a/pnpm-lock.yaml	Tue May 31 23:39:58 2022 -0700
+++ b/pnpm-lock.yaml	Wed Jun 01 01:12:23 2022 -0700
@@ -2,6 +2,7 @@
 
 specifiers:
   '@material/mwc-slider': ^0.26.1
+  '@microsoft/fast-components': ^2.30.6
   '@types/async': ^3.2.13
   '@types/d3': ^7.1.0
   '@types/debug': ^4.1.7
@@ -26,6 +27,7 @@
 
 dependencies:
   '@material/mwc-slider': 0.26.1
+  '@microsoft/fast-components': 2.30.6
   '@types/async': 3.2.13
   '@types/d3': 7.1.0
   '@types/debug': 4.1.7
@@ -169,6 +171,39 @@
       tslib: 2.4.0
     dev: false
 
+  /@microsoft/fast-colors/5.3.0:
+    resolution: {integrity: sha512-MtuVlnvoirgc3cyEGzkDdv+zlEt0dEm7y3HaBqoOYwti5OVROi7x99Kbn/cWGlqF13+a/TEX6L8IkYW0/LT7Yw==}
+    dev: false
+
+  /@microsoft/fast-components/2.30.6:
+    resolution: {integrity: sha512-q6nPiRyA/8HHqCbN4ClziJfOfFaTIVIyBUTSJTcO7ODzkr8oEin7VzKJNoIP/qMpKMkg90wxwLOucr6nsokApw==}
+    dependencies:
+      '@microsoft/fast-colors': 5.3.0
+      '@microsoft/fast-element': 1.10.2
+      '@microsoft/fast-foundation': 2.46.9
+      '@microsoft/fast-web-utilities': 5.4.1
+      tslib: 1.14.1
+    dev: false
+
+  /@microsoft/fast-element/1.10.2:
+    resolution: {integrity: sha512-Nh80AEx/caDe4jhFYNT75sTG4k6MWy1N6XfgyhmejAX0ylivYy0M78WI2JgQOqi2ZRozCiNcpAPLVhYyAVN9sA==}
+    dev: false
+
+  /@microsoft/fast-foundation/2.46.9:
+    resolution: {integrity: sha512-jgkVT7bAWIV844eDj3V9cmYFsRIcJ8vMuB4h2SlkJ9EmFbCfimvh6RyAhsHv+bC6QZSS0N0bpZHm5A5QsWgi3Q==}
+    dependencies:
+      '@microsoft/fast-element': 1.10.2
+      '@microsoft/fast-web-utilities': 5.4.1
+      tabbable: 5.3.3
+      tslib: 1.14.1
+    dev: false
+
+  /@microsoft/fast-web-utilities/5.4.1:
+    resolution: {integrity: sha512-ReWYncndjV3c8D8iq9tp7NcFNc1vbVHvcBFPME2nNFKNbS1XCesYZGlIlf3ot5EmuOXPlrzUHOWzQ2vFpIkqDg==}
+    dependencies:
+      exenv-es6: 1.1.1
+    dev: false
+
   /@rdfjs/types/1.1.0:
     resolution: {integrity: sha512-5zm8bN2/CC634dTcn/0AhTRLaQRjXDZs3QfcAsQKNturHT7XVWcKy/8p3P5gXl+YkZTAmy7T5M/LyiT/jbkENw==}
     dependencies:
@@ -887,6 +922,10 @@
       esbuild-windows-arm64: 0.14.34
     dev: false
 
+  /exenv-es6/1.1.1:
+    resolution: {integrity: sha512-vlVu3N8d6yEMpMsEm+7sUBAI81aqYYuEvfK0jNqmdb/OPXzzH7QWDDnVjMvDSY47JdHEqx/dfC/q8WkfoTmpGQ==}
+    dev: false
+
   /fsevents/2.3.2:
     resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==}
     engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0}
@@ -1075,6 +1114,14 @@
     engines: {node: '>=0.2.6'}
     dev: false
 
+  /tabbable/5.3.3:
+    resolution: {integrity: sha512-QD9qKY3StfbZqWOPLp0++pOrAVb/HbUi5xCc8cUo4XjP19808oaMiDzn0leBY5mCespIBM0CIZePzZjgzR83kA==}
+    dev: false
+
+  /tslib/1.14.1:
+    resolution: {integrity: sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==}
+    dev: false
+
   /tslib/2.4.0:
     resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==}
     dev: false
--- a/show/dance2019/networking.n3	Tue May 31 23:39:58 2022 -0700
+++ b/show/dance2019/networking.n3	Wed Jun 01 01:12:23 2022 -0700
@@ -21,6 +21,7 @@
   :timeline         <http://localhost:8216/>;
   :live             <http://localhost:8217/>;
   :effectListing    <http://localhost:8218/>;
+  :fade             <http://localhost:8219/>;
   
   :collector        <http://localhost:8202/>;
   :collectorZmq     <http://localhost:8203/> .
@@ -38,4 +39,5 @@
 :vidref           :urlPath "vidref" .
 :timeline         :urlPath "timeline" .
 :live             :urlPath "live" .
-:effectListing    :urlPath "effectListing" .
\ No newline at end of file
+:effectListing    :urlPath "effectListing" .
+:fade             :urlPath "fade" .