Changeset - 611c3e97de2f
[Not reviewed]
default
0 4 1
drewp@bigasterisk.com - 20 months ago 2023-05-18 17:49:16
drewp@bigasterisk.com
factor out the show-specific strs
5 files changed with 17 insertions and 12 deletions:
0 comments (0 inline, 0 general)
light9/ascoltami/Light9AscoltamiUi.ts
Show inline comments
 
@@ -6,12 +6,13 @@ import { NamedNode } from "n3";
 
import Sylvester from "sylvester";
 
import { Zoom } from "../web/light9-timeline-audio";
 
import { PlainViewState } from "../web/Light9CursorCanvas";
 
import { getTopGraph } from "../web/RdfdbSyncedGraph";
 
import { SyncedGraph } from "../web/SyncedGraph";
 
import { TimingUpdate } from "./main";
 
import { showRoot } from "light9/web/show_specific";
 
export { Light9TimelineAudio } from "../web/light9-timeline-audio";
 
export { Light9CursorCanvas } from "../web/Light9CursorCanvas";
 
export { RdfdbSyncedGraph } from "../web/RdfdbSyncedGraph";
 
export { ResourceDisplay } from "../web/ResourceDisplay";
 
const $V = Sylvester.Vector.create;
 

	
 
@@ -300,13 +301,13 @@ export class Light9AscoltamiUi extends L
 
  }
 
  graphChanged() {
 
    this.songList = [];
 
    try {
 
      const playList = this.graph.uriValue(
 
        //
 
        this.graph.Uri("http://light9.bigasterisk.com/show/dance2023"),
 
        this.graph.Uri(showRoot),
 
        this.graph.Uri(":playList")
 
      );
 
      log(playList);
 
      this.songList = this.graph.items(playList) as NamedNode[];
 
    } catch (e) {
 
      log("no playlist yet");
light9/fade/web/Light9FadeUi.ts
Show inline comments
 
@@ -2,12 +2,13 @@ import { fastSlider, fastSliderLabel, pr
 
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 { shortShow, showRoot } from "light9/web/show_specific";
 
export { EditChoice } from "../../web/EditChoice";
 

	
 
provideFASTDesignSystem().register(fastSlider(), fastSliderLabel());
 

	
 
debug.enable("*");
 
const log = debug("fade");
 
@@ -37,20 +38,20 @@ export class Light9FadeUi extends LitEle
 
  constructor() {
 
    super();
 
    getTopGraph().then((g) => {
 
      this.graph = g;
 
      // todo: start with a page, then find the faders on that page
 
      this.faders = [
 
        g.Uri(":show/dance2019/fadePage1f0"),
 
        g.Uri(":show/dance2019/fadePage1f1"),
 
        g.Uri(":show/dance2019/fadePage1f2"),
 
        g.Uri(":show/dance2019/fadePage1f3"),
 
        g.Uri(":show/dance2019/fadePage1f4"),
 
        g.Uri(":show/dance2019/fadePage1f5"),
 
        g.Uri(":show/dance2019/fadePage1f6"),
 
        g.Uri(":show/dance2019/fadePage1f7"),
 
        g.Uri(`:show/${shortShow}/fadePage1f0`),
 
        g.Uri(`:show/${shortShow}/fadePage1f1`),
 
        g.Uri(`:show/${shortShow}/fadePage1f2`),
 
        g.Uri(`:show/${shortShow}/fadePage1f3`),
 
        g.Uri(`:show/${shortShow}/fadePage1f4`),
 
        g.Uri(`:show/${shortShow}/fadePage1f5`),
 
        g.Uri(`:show/${shortShow}/fadePage1f6`),
 
        g.Uri(`:show/${shortShow}/fadePage1f7`),
 
      ];
 
    });
 
  }
 
}
 

	
 
@customElement("light9-fader")
 
@@ -83,13 +84,13 @@ export class Light9Fader extends LitElem
 
      <div>attr: <edit-choice .uri=${this.effectAttr}></edit-choice></div>
 
      <div>&lt;=&gt; Slider ${this.column}</div>
 
    `;
 
  }
 

	
 
  graph!: SyncedGraph;
 
  ctx: NamedNode = new NamedNode("http://light9.bigasterisk.com/show/dance2019/fade");
 
  ctx: NamedNode = new NamedNode(showRoot + "/fade");
 
  @property() uri!: NamedNode;
 
  @property() column!: string;
 
  @property() effect: NamedNode | null = null;
 
  @property() effectAttr: NamedNode | null = null;
 

	
 
  @property() value: number = 0.111;
light9/web/live/Effect.ts
Show inline comments
 
import debug from "debug";
 
import { Literal, NamedNode, Quad_Object, Quad_Predicate, Quad_Subject, Term } from "n3";
 
import { some } from "underscore";
 
import { Patch, patchContainsPreds, patchUpdate } from "../patch";
 
import { SyncedGraph } from "../SyncedGraph";
 
import { shortShow } from "../show_specific";
 

	
 
type Color = string;
 
export type ControlValue = number | Color | NamedNode;
 

	
 
const log = debug("effect");
 

	
 
@@ -30,13 +31,13 @@ export class Effect {
 
  constructor(
 
    public graph: SyncedGraph,
 
    public uri: NamedNode,
 
    // called if the graph changes our values and not when the caller uses edit()
 
    private onValuesChanged: (values: void) => void
 
  ) {
 
    this.ctxForEffect = this.graph.Uri(this.uri.value.replace("light9.bigasterisk.com/effect", "light9.bigasterisk.com/show/dance2019/effect"));
 
    this.ctxForEffect = this.graph.Uri(this.uri.value.replace("light9.bigasterisk.com/effect", `light9.bigasterisk.com/show/${shortShow}/effect`));
 
    graph.runHandler(this.rebuildSettingsFromGraph.bind(this), `effect sync ${uri.value}`);
 
  }
 

	
 
  addNewEffectToGraph() {
 
    const U = this.graph.U();
 
    const quad = (s: Quad_Subject, p: Quad_Predicate, o: Quad_Object) => this.graph.Quad(s, p, o, this.ctxForEffect);
light9/web/show_specific.ts
Show inline comments
 
new file 100644
 
export const shortShow = "dance2023";
 
export const showRoot = `http://light9.bigasterisk.com/show/${shortShow}`;
 
\ No newline at end of file
light9/web/timeline/TimelineEditor.coffee
Show inline comments
 
@@ -82,13 +82,13 @@ class TimelineEditor extends LitElement
 

	
 
  _onSong: (s) ->
 
    @song = @playerSong if @followPlayerSong
 

	
 
  _onGraph: (graph) ->
 
    @project = new Project(graph)
 
    @show = 'http://light9.bigasterisk.com/show/dance2019'
 
    @show = showRoot
 

	
 
  _onSetAdjuster: () ->
 
    @makeZoomAdjs()
 

	
 
  updateDebugSummary: ->
 
    elemCount = (tag) -> document.getElementsByTagName(tag).length
0 comments (0 inline, 0 general)