vue实现短剧剧本分镜头视频生成无限画布前端代码

代码语言:html

所属分类:其他

代码描述:vue实现短剧剧本分镜头视频生成无限画布前端代码

代码标签: vue 短剧 剧本 分镜头 视频 生成 无限 画布 前端 代码

下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开

<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>短剧专用无限画布 - 剧本 / 九宫格 / 分镜高清 / 视频流程</title>
  <script src="https://unpkg.com/vue@3/dist/vue.global.prod.js"></script>
  <style>
    * { box-sizing: border-box; }
    html, body {
      margin: 0;
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: #0b1020;
      color: #fff;
      font-family: Inter, Arial, "Microsoft YaHei", sans-serif;
    }
    [v-cloak] { display: none; }

    #app {
      width: 100%;
      height: 100%;
      position: relative;
      overflow: hidden;
      background:
        radial-gradient(circle at 12% 18%, rgba(88, 95, 255, 0.14), transparent 30%),
        radial-gradient(circle at 82% 12%, rgba(0, 174, 255, 0.12), transparent 28%),
        radial-gradient(circle at 78% 85%, rgba(255, 97, 97, 0.08), transparent 26%),
        #0b1020;
    }

    .topbar {
      position: fixed;
      left: 14px;
      top: 14px;
      z-index: 50;
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: wrap;
      max-width: calc(100vw - 430px);
      padding: 10px 12px;
      background: rgba(17,24,39,0.82);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 16px;
      backdrop-filter: blur(12px);
      box-shadow: 0 14px 36px rgba(0,0,0,0.28);
    }

    .topbar .title {
      font-size: 15px;
      font-weight: 700;
      color: #f6f9ff;
      margin-right: 8px;
    }

    .btn {
      border: 0;
      outline: none;
      color: #fff;
      border-radius: 12px;
      padding: 9px 14px;
      cursor: pointer;
      background: #1f2937;
      transition: .18s;
      font-size: 13px;
      white-space: nowrap;
    }
    .btn:hover { background: #2d3a4f; }
    .btn.primary { background: #2563eb; }
    .btn.primary:hover { background: #1d4ed8; }
    .btn.success { background: #0f9f6e; }
    .btn.success:hover { background: #0b845b; }
    .btn.warn { background: #d97706; }
    .btn.warn:hover { background: #b96004; }
    .btn.danger { background: #dc2626; }
    .btn.danger:hover { background: #b91c1c; }
    .btn.ghost {
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.1);
    }
    .btn:disabled {
      opacity: .45;
      cursor: not-allowed;
    }

    .switch-wrap {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #d8e4ff;
      font-size: 13px;
      padding: 0 4px;
    }

    .viewport {
      position: absolute;
      inset: 0;
      overflow: hidden;
      cursor: grab;
    }
    .viewport.panning { cursor: grabbing; }

    .edges-layer {
      position: absolute;
      inset: 0;
      z-index: 5;
      pointer-events: none;
    }

    .world {
      position: absolute;
      inset: 0;
      transform-origin: 0 0;
      z-index: 10;
      overflow: visible;
      will-change: transform;
    }

    .node-card {
      position: absolute;
      border-radius: 18px;
      background: rgba(16, 22, 38, 0.94);
      border: 1px solid rgba(255,255,255,0.08);
      box-shadow: 0 18px 48px rgba(0,0,0,0.30);
      color: #fff;
      user-select: none;
      overflow: hidden;
      transition: box-shadow .15s, border-color .15s;
    }
    .node-card:hover {
      border-color: rgba(255,255,255,0.16);
      box-shadow: 0 22px 54px rgba(0,0,0,0.38);
    }
    .node-card.selected {
      border-color: #7c94ff;
      box-shadow:
        0 0 0 2px rgba(124,148,255,0.24),
        0 22px 60px rgba(0,0,0,0.35);
    }
    .node-card.loading { border-color: #f6c25b; }
    .node-card.error { border-color: #ff6d6d; }

    .node-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 12px 14px 10px;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    }

    .node-left-title {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
    }

    .node-right-tools {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 0 0 auto;
    }

    .node-badge {
      padding: 5px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 700;
      color: #fff;
      flex: 0 0 auto;
    }
    .badge-text { background: #64748b; }
    .badge-script { background: #7c3aed; }
    .badge-storyboard { background: #2563eb; }
    .badge-ninegrid { background: #16a34a; }
    .badge-crop { background: #0ea5a4; }
    .badge-hd { background: #ea580c; }
    .badge-video { background: #dc2626; }
    .badge-merge { background: #4f46e5; }
    .badge-final-video { background: #ca8a04; }

    .node-title {
      max-width: 165px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 14px;
      font-weight: 700;
      color: #f5f8ff;
    }

    .node-order {
      font-size: 11px;
      color: #d5dfff;
      background: rgba(255,255,255,0.08);
      border-radius: 999px;
      padding: 4px 8px;
      white-space: nowrap;
    }

    .node-delete {
      width: 26px;
      height: 26px;
      border-radius: 999px;
      border: 0;
      cursor: pointer;
      color: #fff;
      background: rgba(255,255,255,0.08);
      font-size: 16px;
      line-height: 1;
      transition: .18s;
    }
    .node-delete:hover {
      background: #dc2626;
    }

    .node-body {
      padding: 12px 14px 14px;
      height: calc(100% - 55px);
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .node-summary {
      font-size: 12px;
      line-height: 1.58;
      color: #d4dff8;
      white-space: pre-wrap;
      word-break: break-word;
      display: -webkit-box;
      -webkit-line-clamp: 4;
      -webkit-box-orient: vertical;
      overflow: hidden;
      min-height: 58px;
    }

    .node-preview {
      flex: 1;
      min-height: 90px;
      border-radius: 14px;
      overflow: hidden;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.06);
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .node-preview img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .video-flag {
      position: absolute;
      right: 10px;
      bottom: 10px;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 11px;
      background: rgba(0,0,0,0.56);
      border: 1px solid rgba(255,255,255,0.08);
    }

    .node-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      font-size: 11px;
      color: #bad0f7;
    }
    .node-chip {
      padding: 4px 8px;
      border-radius: 999px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.06);
    }

    .status-line {
      font-size: 11px;
      color: #ffd48a;
      background: rgba(247,185,85,0.1);
      border: 1px solid rgba(247,185,85,0.18);
      border-radius: 10px;
      padding: 6px 8px;
    }
    .status-line.error {
      color: #ffb0b0;
      background: rgba(255,109,109,0.08);
      border-color: rgba(255,109,109,0.18);
    }

    .node-port {
      position: absolute;
      top: 50%;
      width: 12px;
      height: 12px;
      border-radius: 50%;
      background: #7c94ff;
      border: 2px solid #dce5ff;
      transform: translateY(-50%);
      box-shadow: 0 0 0 4px rgba(124,148,255,0.12);
    }
    .node-port.left { left: -6px; }
    .node-port.right { right: -6px; }

    .sidebar {
      position: fixed;
      top: 14px;
      right: 14px;
      bottom: 14px;
      width: 390px;
      z-index: 60;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: rgba(17,24,39,0.84);
      border: 1px solid rgba(255,255,255,0.08);
      border-radius: 20px;
      backdrop-filter: blur(14px);
      box-shadow: 0 16px 44px rgba(0,0,0,0.34);
    }

    .sidebar-header {
      padding: 16px 16px 12px;
  .........完整代码请登录后点击上方下载按钮下载查看

网友评论0