elements.diffuse.sh / Blur / Artwork controller
artwork-controller.html
edited
1<style>
2 @import "./styles/vendor/phosphor/bold/style.css";
3 @import "./styles/vendor/phosphor/fill/style.css";
4 @import "./styles/base.css";
5</style>
6
7<script type="module">
8 import foundation from "./common/facets/foundation.js";
9 import ArtworkController from "./themes/blur/artwork-controller/element.js";
10
11 // Setup the prerequisite elements
12 foundation.features.fillQueueAutomatically();
13 foundation.features.playAudioFromQueue();
14 foundation.features.processInputs();
15
16 const aud = foundation.engine.audio();
17 const art = foundation.processor.artwork();
18 const inp = foundation.orchestrator.input();
19 const que = foundation.engine.queue();
20 const rse = foundation.engine.repeatShuffle();
21
22 // Controller
23 const dac = new ArtworkController();
24 dac.setAttribute("artwork-processor-selector", art.selector);
25 dac.setAttribute("audio-engine-selector", aud.selector);
26 dac.setAttribute("input-selector", inp.selector);
27 dac.setAttribute("queue-engine-selector", que.selector);
28 dac.setAttribute("repeat-shuffle-engine-selector", rse.selector);
29
30 // Add to DOM
31 document.body.append(dac);
32</script>