分享图
动画工坊
引擎就绪
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>极耳通道内壁自剥离包胶原理动画</title>
  <style>
    :root {
      --bg-dark: #0a0e17;
      --panel-bg: rgba(16, 24, 39, 0.75);
      --border-color: rgba(64, 150, 255, 0.2);
      --accent-cyan: #00f0ff;
      --accent-amber: #ffb703;
      --accent-orange: #fb8500;
      --metal-primary: #cbd5e1;
      --text-muted: #94a3b8;
    }

    * {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
      user-select: none;
    }

    body {
      background-color: var(--bg-dark);
      background-image: 
        radial-gradient(ellipse at 50% 20%, rgba(14, 165, 233, 0.12) 0%, transparent 60%),
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
      background-size: 100% 100%, 32px 32px, 32px 32px;
      color: #e2e8f0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 16px;
      overflow-x: hidden;
    }

    .main-stage {
      width: 100%;
      max-width: 960px;
      background: var(--panel-bg);
      border: 1px solid var(--border-color);
      border-radius: 12px;
      box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 240, 255, 0.06);
      backdrop-filter: blur(12px);
      display: flex;
      flex-direction: column;
      position: relative;
      overflow: hidden;
    }

    .header-bar {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 14px 24px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }

    .title-group {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .status-badge {
      font-size: 11px;
      font-weight: 600;
      padding: 2px 8px;
      border-radius: 4px;
      background: rgba(0, 240, 255, 0.12);
      color: var(--accent-cyan);
      border: 1px solid rgba(0, 240, 255, 0.3);
      letter-spacing: 0.5px;
    }

    .title-group h1 {
      font-size: 16px;
      font-weight: 600;
      letter-spacing: 0.5px;
      color: #f1f5f9;
    }

    .triz-tag {
      font-size: 12px;
      color: var(--accent-amber);
      background: rgba(255, 183, 3, 0.08);
      border: 1px dashed rgba(255, 183, 3, 0.35);
      padding: 3px 10px;
      border-radius: 20px;
    }

    .viewport-box {
      width: 100%;
      height: 480px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    svg {
      width: 100%;
      height: 100%;
      display: block;
    }

    .controls-strip {
      display: grid;
      grid-template-columns: auto 1fr auto auto;
      gap: 16px;
      align-items: center;
      padding: 12px 24px 16px;
      background: rgba(10, 14, 23, 0.65);
      border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    .btn-action {
      background: rgba(255, 255, 255, 0.07);
      border: 1px solid rgba(255, 255, 255, 0.15);
      color: #fff;
      padding: 6px 14px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 13px;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s ease;
    }

    .btn-action:hover {
      background: rgba(0, 240, 255, 0.18);
      border-color: var(--accent-cyan);
      color: var(--accent-cyan);
    }

    .timeline-container {
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .timeline-bar {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .timeline-slider {
      flex: 1;
      height: 5px;
      -webkit-appearance: none;
      appearance: none;
      background: #1e293b;
      border-radius: 3px;
      outline: none;
    }

    .timeline-slider::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 14px;
      height: 14px;
      border-radius: 50%;
      background: var(--accent-cyan);
      cursor: pointer;
      box-shadow: 0 0 8px var(--accent-cyan);
      transition: transform 0.1s;
    }

    .time-label {
      font-size: 12px;
      font-family: monospace;
      color: var(--text-muted);
      width: 44px;
    }

    .phase-indicator {
      display: flex;
      justify-content: space-between;
      font-size: 10.5px;
      color: #64748b;
      padding: 0 2px;
    }

    .phase-node.active {
      color: var(--accent-cyan);
      font-weight: 500;
    }

    .param-pill {
      font-size: 12px;
      color: var(--text-muted);
      display: flex;
      align-items: center;
      gap: 6px;
      padding-left: 8px;
      border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .param-val {
      font-family: monospace;
      color: var(--accent-amber);
    }
  </style>
</head>
<body>

  <div class="main-stage">
    <!-- 顶部状态栏 -->
    <div class="header-bar">
      <div class="title-group">
        <span class="status-badge">IFR 最终理想解</span>
        <h1>极耳通道内壁自剥离贴胶机理</h1>
      </div>
      <div class="triz-tag">自服务原理:借用极耳自身插入动能零附加动力轴</div>
    </div>

    <!-- SVG 画布区域 -->
    <div class="viewport-box">
      <svg id="stageSvg" viewBox="0 0 800 480" preserveAspectRatio="xMidYMid meet">
        <defs>
          <!-- 极耳金属材质 -->
          <linearGradient id="tabMetal" x1="0%" y1="0%" x2="100%" y2="0%">
            <stop offset="0%" stop-color="#b0b8c4" />
            <stop offset="40%" stop-color="#f1f5f9" />
            <stop offset="70%" stop-color="#94a3b8" />
            <stop offset="100%" stop-color="#64748b" />
          </linearGradient>

          <!-- 铝壳/电芯主体渐变 -->
          <linearGradient id="cellBodyGrad" x1="0%" y1="0%" x2="0%" y2="100%">
            <stop offset="0%" stop-color="#334155" />
            <stop offset="100%" stop-color="#1e293b" />
          </linearGradient>

          <!-- 导向槽模具渐变 -->
          <linearGradient id="moldSteel" x1="0%" y1="0%" x2="100%" y2="0%">
            <stop offset="0%" stop-color="#1e293b" />
            <stop offset="50%" stop-color="#334155" />
            <stop offset="100%" stop-color="#0f172a" />
          </linearGradient>

          <!-- 胶带层渐变 -->
          <linearGradient id="tapeAdhesive" x1="0%" y1="0%" x2="100%" y2="0%">
            <stop offset="0%" stop-color="#ffb703" />
            <stop offset="70%" stop-color="#fb8500" />
            <stop offset="100%" stop-color="#d47000" />
          </linearGradient>

          <!-- 发光滤镜 -->
          <filter id="cyanGlow" x="-20%" y="-20%" width="140%" height="140%">
            <feGaussianBlur stdDeviation="3" result="blur" />
            <feComposite in="SourceGraphic" in2="blur" operator="over" />
          </filter>
        </defs>

        <!-- 背景网格参考标尺线 -->
        <g opacity="0.15">
          <line x1="160" y1="40" x2="160" y2="440" stroke="#00f0ff" stroke-dasharray="3,3" />
          <line x1="640" y1="40" x2="640" y2="440" stroke="#00f0ff" stroke-dasharray="3,3" />
          <line x1="400" y1="20" x2="400" y2="460" stroke="#fff" stroke-dasharray="2,4" />
        </g>

        <!-- ===== 左侧导向模块 ===== -->
        <g id="leftGuideGroup">
          <!-- 导向槽金属块 -->
          <path d="M 230 80 
                   L 330 80 
                   L 358 170 
                   C 362 185, 368 230, 369.2 280
                   L 369.2 380 
                   L 230 380 Z" 
                fill="url(#moldSteel)" stroke="#475569" stroke-width="1.5" />
          
          <!-- 低粘离型衬面 (黄色高亮线带) -->
          <path id="leftLiner" d="M 358 170 C 362 185, 368 230, 369.2 280" 
                fill="none" stroke="#38bdf8" stroke-width="2.5" stroke-dasharray="4,2" opacity="0.8" />
          
          <!-- 出口聚氨酯刮板 (左) 邵氏A70 -->
          <path d="M 353 380 L 369.2 380 L 368.5 408 C 368.5 410, 364 412, 360 410 L 353 392 Z" 
                fill="#10b981" stroke="#059669" stroke-width="1" />
        </g>

        <!-- ===== 右侧导向模块 (镜像) ===== -->
        <g id="rightGuideGroup">
          <path d="M 570 80 
                   L 470 80 
                   L 442 170 
                   C 438 185, 432 230, 430.8 280
                   L 430.8 380 
                   L 570 380 Z" 
                fill="url(#moldSteel)" stroke="#475569" stroke-width="1.5" />

          <!-- 低粘离型衬面 (右) -->
          <path id="rightLiner" d="M 442 170 C 438 185, 432 230, 430.8 280" 
                fill="none" stroke="#38bdf8" stroke-width="2.5" stroke-dasharray="4,2" opacity="0.8" />

          <!-- 出口聚氨酯刮板 (右) -->
          <path d="M 447 380 L 430.8 380 L 431.5 408 C 431.5 410, 436 412, 440 410 L 447 392 Z" 
                fill="#10b981" stroke="#059669" stroke-width="1" />
        </g>

        <!-- 间隙尺寸标注 -->
        <g opacity="0.75" font-size="11" fill="#94a3b8">
          <!-- 入口开度 -->
          <line x1="335" y1="88" x2="465" y2="88" stroke="#64748b" stroke-width="1" marker-start="url(#dot)" marker-end="url(#dot)" />
          <text x="400" y="82" text-anchor="middle" fill="#38bdf8">导向入口喇叭段</text>
          
          <!-- 出口微收口单边间隙 -->
          <line x1="371" y1="360" x2="429" y2="360" stroke="#f59e0b" stroke-width="1" stroke-dasharray="2,2"/>
          <text x="400" y="355" text-anchor="middle" fill="#f59e0b" font-weight="600">出口收口间隙 0.2mm</text>
        </g>

        <!-- ===== 动态胶带路径 (左右对称) ===== -->
        <!-- 左胶带 -->
        <path id="tapeLeft" d="" fill="url(#tapeAdhesive)" stroke="#d97706" stroke-width="0.8" />
        <!-- 右胶带 -->
        <path id="tapeRight" d="" fill="url(#tapeAdhesive)" stroke="#d97706" stroke-width="0.8" />

        <!-- ===== 动子组件:极耳与电芯顶盖 ===== -->
        <g id="tabMoverGroup" transform="translate(0, 0)">
          <!-- 电芯本体基座 (示意) -->
          <rect x="330" y="-120" width="140" height="120" rx="4" fill="url(#cellBodyGrad)" stroke="#475569" stroke-width="1.5" />
          <text x="400" y="-20" font-size="11" fill="#94a3b8" text-anchor="middle">电芯主输送夹持</text>

          <!-- 极耳根部肩部与 R 角过度结构 -->
          <path d="M 370 0 
                   L 386 0 
                   C 392 0, 395 6, 395 12 
                   L 395 140 
                   L 405 140 
                   L 405 12 
                   C 405 6, 408 0, 414 0 
                   L 430 0 
                   L 430 6 
                   L 370 6 Z" 
                fill="url(#tabMetal)" stroke="#64748b" stroke-width="1" />
          
          <!-- 极耳中心刀片主体 (厚度 0.8mm 缩放表达) -->
          <rect x="395" y="12" width="10" height="140" fill="url(#tabMetal)" stroke="#94a3b8" stroke-width="0.8" />

          <!-- 运动矢量动态光标 -->
          <g id="velocityArrow" opacity="0.8">
            <line x1="400" y1="-75" x2="400" y2="-45" stroke="#00f0ff" stroke-width="2.5" marker-end="url(#arrowCyan)" />
            <polygon points="397,-47 400,-38 403,-47" fill="#00f0ff" />
            <text x="415" y="-55" fill="#00f0ff" font-size="10.5" font-family="monospace">V: 100mm/s</text>
          </g>

          <!-- 极耳前端导向倒角高亮 -->
          <line x1="395" y1="152" x2="405" y2="152" stroke="#38bdf8" stroke-width="2" filter="url(#cyanGlow)" />
        </g>

        <!-- 关键部件标注线框 (精炼简洁) -->
        <g id="callouts" font-size="11" fill="#cbd5e1" opacity="0.88">
          <!-- 左侧:内壁离型衬面 -->
          <line x1="290" y1="210" x2="362" y2="210" stroke="#38bdf8" stroke-width="1" />
          <circle cx="362" cy="210" r="2.5" fill="#38bdf8" />
          <text x="220" y="214" fill="#38bdf8">微粘离型衬壁</text>

          <!-- 左侧:微收口段 -->
          <line x1="280" y1="270" x2="369" y2="270" stroke="#00f0ff" stroke-width="1" />
          <circle cx="369" cy="270" r="2.5" fill="#00f0ff" />
          <text x="180" y="274" fill="#00f0ff">几何收口压紧段 (8~15mm)</text>

          <!-- 右侧:预置胶带 -->
          <line x1="510" y1="185" x2="437" y2="185" stroke="#ffb703" stroke-width="1" />
          <circle cx="437" cy="185" r="2.5" fill="#ffb703" />
          <text x="518" y="189" fill="#ffb703">预定位绝缘胶带 (胶面朝内)</text>

          <!-- 右侧:出口刮板 -->
          <line x1="500" y1="395" x2="438" y2="395" stroke="#10b981" stroke-width="1" />
          <circle cx="438" cy="395" r="2.5" fill="#10b981" />
          <text x="508" y="399" fill="#10b981">弹性刮板压实边缘 (邵氏A70)</text>
        </g>

        <!-- 创新交互核心提示 -->
        <g id="forceTip" opacity="0" transform="translate(400, 260)">
          <circle cx="0" cy="0" r="16" fill="rgba(0, 240, 255, 0.15)" stroke="#00f0ff" stroke-width="1.5" stroke-dasharray="3,2" />
          <text x="0" y="4" font-size="10" fill="#00f0ff" text-anchor="middle" font-weight="600">根部包覆</text>
        </g>
      </svg>
    </div>

    <!-- 底部控制面板 -->
    <div class="controls-strip">
      <button id="btnToggle" class="btn-action">
        <svg id="playIcon" width="12" height="12" viewBox="0 0 24 24" fill="currentColor">
          <polygon points="5 3 19 12 5 21 5 3"></polygon>
        </svg>
        <span id="btnText">暂停</span>
      </button>

      <div class="timeline-container">
        <div class="timeline-bar">
          <input type="range" id="progressSlider" class="timeline-slider" min="0" max="1000" value="0">
          <span id="timeDisplay" class="time-label">0.0s</span>
        </div>
        <div class="phase-indicator">
          <span id="p1" class="phase-node active">① 胶带预张紧吸附</span>
          <span id="p2" class="phase-node">② 极耳穿入导向槽</span>
          <span id="p3" class="phase-node">③ 肩部顶离与被动包覆</span>
          <span id="p4" class="phase-node">④ 出口刮板压实</span>
        </div>
      </div>

      <div class="param-pill">
        <span>插入速度:</span>
        <span class="param-val">100 mm/s</span>
      </div>

      <button id="btnReset" class="btn-action" title="重置动画">
        <svg width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
          <path d="M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"></path>
          <path d="M3 3v5h5"></path>
        </svg>
        <span>复位</span>
      </button>
    </div>
  </div>

  <script>
    (function () {
      const TOTAL_DURATION = 4200; // 动画周期 4.2s (毫秒)
      let startTime = null;
      let isPlaying = true;
      let progress = 0; // 0 ~ 1
      let rafId = null;

      // DOM 元素
      const tabMover = document.getElementById('tabMoverGroup');
      const tapeLeft = document.getElementById('tapeLeft');
      const tapeRight = document.getElementById('tapeRight');
      const forceTip = document.getElementById('forceTip');
      const slider = document.getElementById('progressSlider');
      const timeDisplay = document.getElementById('timeDisplay');
      const btnToggle = document.getElementById('btnToggle');
      const btnText = document.getElementById('btnText');
      const playIcon = document.getElementById('playIcon');
      const btnReset = document.getElementById('btnReset');

      const phaseNodes = [
        document.getElementById('p1'),
        document.getElementById('p2'),
        document.getElementById('p3'),
        document.getElementById('p4')
      ];

      // 导向槽特征关键坐标
      // 槽口入口 Y=170, X_L=358, X_R=442
      // 收口深处 Y=280, X_L=369.2, X_R=430.8
      // 出口刮板 Y=385, X_L=369, X_R=431
      
      function renderFrame(p) {
        // 极耳向下位移量:-120 到 +280
        const startY = -40;
        const endY = 270;
        const currentY = startY + (endY - startY) * p;
        tabMover.setAttribute('transform', `translate(0, ${currentY})`);

        // 极耳肩部当前在世界坐标下的 Y
        // 肩部相对于 mover 顶端原点约为 Y = 0~12
        const shoulderY = currentY + 10;
        const tipY = currentY + 140; // 极耳前尖端

        // 阶段 1: 0.00 ~ 0.22 (胶带已预置在衬壁上)
        // 阶段 2: 0.22 ~ 0.45 (极耳前端下行穿入,未碰胶带)
        // 阶段 3: 0.45 ~ 0.78 (肩部接触并顶离胶带,几何收口压覆到 R 角)
        // 阶段 4: 0.78 ~ 1.00 (穿出收口,刮板压实边缘,胶带完整贴覆在根部)

        updatePhases(p);

        // 计算胶带形态多边形
        // 胶带宽约 2.4mm, 长约 50mm
        const tapeLen = 65;
        const tapeThick = 2.4;

        if (p < 0.38) {
          // 状态 A:完整紧贴在槽壁衬面上
          // 左侧贴在衬面
          tapeLeft.setAttribute('d', `
            M 358 175 
            C 362 195, 368 225, 369.2 245 
            L ${369.2 + tapeThick} 245 
            C ${368 + tapeThick} 225, ${362 + tapeThick} 195, ${358 + tapeThick} 175 
            Z
          `);
          // 右侧对称
          tapeRight.setAttribute('d', `
            M 442 175 
            C 438 195, 432 225, 430.8 245 
            L ${430.8 - tapeThick} 245 
            C ${432 - tapeThick} 225, ${438 - tapeThick} 195, ${442 - tapeThick} 175 
            Z
          `);
          forceTip.setAttribute('opacity', '0');
        } else if (p < 0.78) {
          // 状态 B:动态剥离与包覆过程
          // 随着肩部向下,肩部把胶带中下部推向极耳根部
          const peelRatio = (p - 0.38) / (0.78 - 0.38); // 0 -> 1
          
          // 胶带随极耳一起向下运动
          const peelTopY = 175 + peelRatio * 75;
          const peelMidY = 245 + peelRatio * 85;

          // 胶带内侧贴合极耳肩部及 R 角 (X=395/405)
          const attachX_L = 369.2 + (395 - 369.2) * Math.min(1, peelRatio * 1.3);
          const attachX_R = 430.8 - (430.8 - 405) * Math.min(1, peelRatio * 1.3);

          tapeLeft.setAttribute('d', `
            M 364 ${peelTopY}
            Q ${attachX_L - 8} ${peelTopY + 20}, ${attachX_L} ${peelMidY}
            L ${attachX_L + tapeThick} ${peelMidY}
            Q ${attachX_L - 8 + tapeThick} ${peelTopY + 20}, ${364 + tapeThick} ${peelTopY}
            Z
          `);

          tapeRight.setAttribute('d', `
            M 436 ${peelTopY}
            Q ${attachX_R + 8} ${peelTopY + 20}, ${attachX_R} ${peelMidY}
            L ${attachX_R - tapeThick} ${peelMidY}
            Q ${attachX_R + 8 - tapeThick} ${peelTopY + 20}, ${436 - tapeThick} ${peelTopY}
            Z
          `);

          // 核心受力高亮提示
          forceTip.setAttribute('opacity', (Math.sin(peelRatio * Math.PI) * 0.95).toFixed(2));
          forceTip.setAttribute('transform', `translate(400, ${shoulderY})`);
        } else {
          // 状态 C:完全贴覆在极耳肩部与根部表面,通过出口刮板被刮紧
          const exitRatio = (p - 0.78) / 0.22;
          const finalTopY = shoulderY - 4;
          const finalBotY = shoulderY + 55;

          // 紧密包覆在极耳两侧 (左边贴在 392.5 ~ 395, 右边贴在 405 ~ 407.5)
          tapeLeft.setAttribute('d', `
            M 388 ${finalTopY}
            C 392 ${finalTopY}, 394 ${finalTopY + 8}, 394 ${finalTopY + 12}
            L 394 ${finalBotY}
            L 391.8 ${finalBotY}
            L 391.8 ${finalTopY + 12}
            C 391.8 ${finalTopY + 6}, 386 ${finalTopY}, 386 ${finalTopY - 2}
            Z
          `);

          tapeRight.setAttribute('d', `
            M 412 ${finalTopY}
            C 408 ${finalTopY}, 406 ${finalTopY + 8}, 406 ${finalTopY + 12}
            L 406 ${finalBotY}
            L 408.2 ${finalBotY}
            L 408.2 ${finalTopY + 12}
            C 408.2 ${finalTopY + 6}, 414 ${finalTopY}, 414 ${finalTopY - 2}
            Z
          `);

          forceTip.setAttribute('opacity', '0');
        }

        // 更新 UI
        slider.value = Math.round(p * 1000);
        timeDisplay.textContent = ((p * TOTAL_DURATION) / 1000).toFixed(1) + 's';
      }

      function updatePhases(p) {
        let activeIdx = 0;
        if (p < 0.22) activeIdx = 0;
        else if (p < 0.45) activeIdx = 1;
        else if (p < 0.78) activeIdx = 2;
        else activeIdx = 3;

        phaseNodes.forEach((node, idx) => {
          if (idx === activeIdx) {
            node.classList.add('active');
          } else {
            node.classList.remove('active');
          }
        });
      }

      function tick(timestamp) {
        if (!startTime) startTime = timestamp - (progress * TOTAL_DURATION);
        const elapsed = timestamp - startTime;

        progress = (elapsed % TOTAL_DURATION) / TOTAL_DURATION;
        renderFrame(progress);

        if (isPlaying) {
          rafId = requestAnimationFrame(tick);
        }
      }

      // 播放/暂停控制
      function setPlay(playing) {
        isPlaying = playing;
        if (isPlaying) {
          btnText.textContent = '暂停';
          playIcon.innerHTML = '<rect x="6" y="4" width="4" height="16"></rect><rect x="14" y="4" width="4" height="16"></rect>';
          startTime = performance.now() - (progress * TOTAL_DURATION);
          rafId = requestAnimationFrame(tick);
        } else {
          btnText.textContent = '播放';
          playIcon.innerHTML = '<polygon points="5 3 19 12 5 21 5 3"></polygon>';
          if (rafId) cancelAnimationFrame(rafId);
        }
      }

      btnToggle.addEventListener('click', () => {
        setPlay(!isPlaying);
      });

      btnReset.addEventListener('click', () => {
        progress = 0;
        startTime = performance.now();
        renderFrame(0);
        if (!isPlaying) setPlay(true);
      });

      // 滑块交互
      slider.addEventListener('input', (e) => {
        if (isPlaying) setPlay(false);
        progress = parseFloat(e.target.value) / 1000;
        renderFrame(progress);
      });

      // 确保进入页面或 iframe 重开时自动运行
      window.addEventListener('DOMContentLoaded', () => {
        setPlay(true);
      });

      // 兜底自动启动
      setTimeout(() => {
        if (!rafId && isPlaying) {
          setPlay(true);
        }
      }, 100);
    })();
  </script>
</body>
</html>
积分规则:每轮对话扣10分