INNER CODE UNIT · JavaScript

buildChaos

mario-andreschak/FLUJO · githubpages/short/app.js:181

  function buildChaos() {
    const container = $("#chaos-tools");
    const paths = $("#chaos-paths");
    TOOL_DATA.forEach((tool, index) => {
      const card = document.createElement("div");
      card.className = "tool-card";
      card.dataset.index = String(index);
      card.innerHTML = `
        <span class="tool-logo" style="--tool-color:${tool.color}">${tool.icon}</span>
        <span class="tool-copy"><b>${tool.name}</b><small>${tool.kind}</small></span>
      `;
      container.appendChild(card);

      const cx = tool.x + 85;
      const cy = tool.y + 29;
      const controlX = lerp(cx, 800, .52) + ((index % 3) - 1) * 65;
      const controlY = lerp(cy, 450, .52) + ((index % 4) - 1.5) * 45;
      const path = document.createElementNS("http://www.w3.org/2000/svg", "path");

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…