MCPcopy
hub / github.com/stemdeckapp/stemdeck / stemWave

Function stemWave

static/mobile/app.js:376–387  ·  view source on GitHub ↗
(idx, color, vol, eff)

Source from the content-addressed store, hash-verified

374}
375
376function stemWave(idx, color, vol, eff) {
377 const wn = 28;
378 const wplayed = Math.round(state.progress * wn);
379 let out = "";
380 for (let i = 0; i < wn; i++) {
381 let wh = 16 + Math.abs(Math.sin(i * (0.55 + idx * 0.13)) + Math.sin(i * 0.33 + idx) * 0.6) * 62 + ((i * (7 + idx * 3)) % 9);
382 wh = Math.max(7, Math.min(98, wh)) * (0.3 + 0.7 * vol);
383 const wc = eff ? "#34343c" : i <= wplayed ? color : color + "3d";
384 out += `<i style="height:${wh}%;background:${wc}"></i>`;
385 }
386 return out;
387}
388
389function stemsBody() {
390 const c = state.current;

Callers 1

stemsBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected