box.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <script>
  5. (function () {
  6. if (/\?|&/.test(location.search) && /full=1/.test(location.search)) return;
  7. if (/Android|iPhone|iPad|iPod|Mobile/i.test(navigator.userAgent)) {
  8. location.replace('m.html');
  9. }
  10. })();
  11. </script>
  12. <meta charset="UTF-8">
  13. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  14. <meta name="theme-color" content="#ffffff">
  15. <link rel="icon" type="image/svg+xml" href="assets/favicon.svg">
  16. <title>3D云设计编辑器 — 袋研社 POUCHLAB</title>
  17. <meta name="description" content="在线 3D 纸盒设计:盒型库、模板、素材、文字、条码二维码、智能参数、动效预览与印刷下单。">
  18. <link rel="stylesheet" href="assets/css/base.css?v=1.8.26">
  19. <link rel="stylesheet" href="assets/css/antd.css?v=1.8.26">
  20. <link rel="stylesheet" href="assets/css/auth.css?v=1.8.26">
  21. <link rel="stylesheet" href="assets/css/box.css?v=1.8.26">
  22. <script src="assets/js/i18n-en.js?v=1.8.26"></script>
  23. <script src="assets/js/i18n.js?v=1.8.26"></script>
  24. </head>
  25. <body class="bx-body">
  26. <header class="bx-topbar">
  27. <div class="bx-brand">
  28. <a class="logo" href="index.html" aria-label="返回首页">
  29. <span class="logo-mark">
  30. <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
  31. <path d="M7 8.2h10l1 10.1a2.8 2.8 0 0 1-2.8 3H8.8A2.8 2.8 0 0 1 6 18.3L7 8.2Z" fill="#fffdf8"/>
  32. <path d="M7.4 11.1h9.2" stroke="#17140f" stroke-width="1.4" stroke-linecap="round"/>
  33. <circle cx="14.2" cy="11.1" r="1.15" fill="#ff5c2b"/>
  34. <path d="M9.5 14.4h4.9" stroke="#ff5c2b" stroke-width="1.4" stroke-linecap="round"/>
  35. <path d="M17.8 5.2v2.4M16.6 6.4h2.4" stroke="#17140f" stroke-width="1.2" stroke-linecap="round"/>
  36. </svg>
  37. </span>
  38. <span class="logo-type"><b>袋研社</b><span>POUCHLAB</span></span>
  39. </a>
  40. <div class="bx-file-menu-wrap">
  41. <button class="bx-file-btn" id="bxFileBtn">文件 <i class="caret"></i></button>
  42. <div class="bx-file-menu" id="bxFileMenu" hidden>
  43. <div class="bx-file-name" id="bxFileNameWrap">
  44. <span id="bxFileName">未命名纸盒</span>
  45. <svg viewBox="0 0 24 24" class="edit-ic"><path d="M4 20h4L19 9l-4-4L4 16v4Z" fill="none" stroke="currentColor" stroke-width="1.6"/></svg>
  46. </div>
  47. <button data-file="new">新建设计方案</button>
  48. <button data-file="copy">创建副本</button>
  49. <button data-file="mine">查看我的设计方案</button>
  50. <button data-file="history">历史版本记录</button>
  51. <div class="bx-file-sep"></div>
  52. <button data-file="save">保存</button>
  53. <button data-file="import-art">导入PSD/AI/PDF</button>
  54. <button data-file="import-cad">导入CAD</button>
  55. <button data-file="submit">投稿至模板中心</button>
  56. </div>
  57. </div>
  58. </div>
  59. <div class="bx-top-tools">
  60. <button class="tb-btn" id="bxShareBtn" title="分享">
  61. <svg viewBox="0 0 24 24"><path d="M14 5l7 7-7 7v-4C7 15 4 17 3 20c0-7 4-10 11-11V5Z" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linejoin="round"/></svg>
  62. </button>
  63. <button class="tb-btn" id="bxSaveBtn" title="保存">
  64. <svg viewBox="0 0 24 24"><path d="M5 4h11l4 4v12H5V4Z" fill="none" stroke="currentColor" stroke-width="1.7"/><path d="M8 4v5h7V4M8 20v-6h8v6" fill="none" stroke="currentColor" stroke-width="1.7"/></svg>
  65. </button>
  66. <button class="tb-btn" id="bxUndoBtn" title="撤销" disabled>
  67. <svg viewBox="0 0 24 24"><path d="M8 5 3 10l5 5" fill="none" stroke="currentColor" stroke-width="1.7"/><path d="M3 10h11a6 6 0 0 1 0 12h-3" fill="none" stroke="currentColor" stroke-width="1.7"/></svg>
  68. </button>
  69. <button class="tb-btn" id="bxRedoBtn" title="重做" disabled>
  70. <svg viewBox="0 0 24 24"><path d="m16 5 5 5-5 5" fill="none" stroke="currentColor" stroke-width="1.7"/><path d="M21 10H10a6 6 0 0 0 0 12h3" fill="none" stroke="currentColor" stroke-width="1.7"/></svg>
  71. </button>
  72. </div>
  73. <div class="bx-mode-switch" id="bxModeSwitch">
  74. <button data-mode="2d" class="on">2D设计</button>
  75. <button data-mode="3d">3D预览</button>
  76. </div>
  77. <div class="bx-top-actions">
  78. <span data-lang-slot></span>
  79. <button class="btn-print" id="bxPrintBtn">
  80. <svg viewBox="0 0 24 24"><path d="M7 8V3h10v5M5 8h14a2 2 0 0 1 2 2v6h-4v5H7v-5H3v-6a2 2 0 0 1 2-2Z" fill="none" stroke="currentColor" stroke-width="1.7"/><path d="M7 16h10" stroke="currentColor" stroke-width="1.7"/></svg>
  81. 印刷下单
  82. </button>
  83. <button class="btn-plain" id="bxRenderBtn">渲 染</button>
  84. <button class="btn-export" id="bxExportBtn">导出</button>
  85. <button class="btn-plain" id="bxAiBtn" title="AI 排版(登录后可用)">✨ AI 排版</button>
  86. <button class="btn-plain" id="bxOrdersBtn" title="我的订单" onclick="location.href='orders.html'">我的订单</button>
  87. <button class="bx-avatar" id="bxAvatar" title="登录 / 账号">
  88. <svg viewBox="0 0 24 24"><circle cx="12" cy="8.2" r="3.4" fill="#ffb27a"/><path d="M4.5 20c1.4-3.8 4.2-5.4 7.5-5.4s6.1 1.6 7.5 5.4" fill="#ffd9b8"/></svg>
  89. </button>
  90. </div>
  91. </header>
  92. <main class="bx-main">
  93. <nav class="bx-rail" id="bxRail" aria-label="设计工具">
  94. <button data-tab="box" class="on">
  95. <svg viewBox="0 0 24 24"><path d="M12 3 3 8.2v7.6L12 21l9-5.2V8.2L12 3Z"/><path d="M3 8.2 12 13l9-4.8M12 13v8"/></svg>
  96. <span>盒型</span>
  97. </button>
  98. <button data-tab="template">
  99. <svg viewBox="0 0 24 24"><rect x="3.5" y="3.5" width="17" height="17" rx="2"/><path d="M3.5 9.5h17M9.5 9.5v11"/></svg>
  100. <span>模板</span>
  101. </button>
  102. <button data-tab="asset">
  103. <svg viewBox="0 0 24 24"><path d="M12 4 4 19h16L12 4Z"/><circle cx="17" cy="7.5" r="2.2"/></svg>
  104. <span>素材</span>
  105. </button>
  106. <button data-tab="text">
  107. <svg viewBox="0 0 24 24"><path d="M5 6h14M12 6v13M8.5 19h7"/></svg>
  108. <span>文字</span>
  109. </button>
  110. <button data-tab="tool">
  111. <svg viewBox="0 0 24 24"><path d="M9.5 14.5 4 20l1.6 1.6M9.5 14.5l6-9.6a4 4 0 0 1 5.4 5.4l-9.6 6"/></svg>
  112. <span>工具</span>
  113. </button>
  114. <button data-tab="upload">
  115. <svg viewBox="0 0 24 24"><path d="M12 15V5M7.5 9 12 4.5 16.5 9"/><path d="M4 15v4h16v-4" fill="none"/></svg>
  116. <span>上传</span>
  117. </button>
  118. <button data-tab="layers">
  119. <svg viewBox="0 0 24 24"><path d="m12 3 9 5-9 5-9-5 9-5Z"/><path d="m3 13 9 5 9-5"/></svg>
  120. <span>图层</span>
  121. </button>
  122. <button data-tab="help">
  123. <svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="8.6" fill="none"/><path d="M9.6 9.4a2.6 2.6 0 1 1 3.6 2.4c-.8.4-1.2 1-1.2 1.9" fill="none"/><circle cx="12" cy="16.8" r=".9" fill="currentColor" stroke="none"/></svg>
  124. <span>帮助</span>
  125. </button>
  126. </nav>
  127. <aside class="bx-panel" id="bxPanel">
  128. <div class="bx-panel-body" id="bxPanelBody"></div>
  129. </aside>
  130. <section class="bx-stage" id="bxStage">
  131. <!-- 2D 刀版画布 -->
  132. <div class="bx-flat" id="bxFlat">
  133. <div class="bx-flat-inner" id="bxFlatInner">
  134. <div class="dieline-wrap" id="boxDieline"></div>
  135. </div>
  136. <div class="bx-canvas-corner left">
  137. <button id="bxPreviewToggle" title="预览(隐藏刀版线)">
  138. <svg viewBox="0 0 24 24"><path d="M2.5 12S6 5.8 12 5.8 21.5 12 21.5 12 18 18.2 12 18.2 2.5 12 2.5 12Z" fill="none" stroke="currentColor" stroke-width="1.6"/><circle cx="12" cy="12" r="2.6" fill="none" stroke="currentColor" stroke-width="1.6"/></svg>
  139. </button>
  140. <button id="bxPanToggle" title="平移画布">
  141. <svg viewBox="0 0 24 24"><path d="M12 3v18M3 12h18M12 3 9.5 5.5M12 3l2.5 2.5M12 21l-2.5-2.5M12 21l2.5-2.5M3 12l2.5-2.5M3 12l2.5 2.5M21 12l-2.5-2.5M21 12l-2.5 2.5" fill="none" stroke="currentColor" stroke-width="1.5"/></svg>
  142. </button>
  143. </div>
  144. <div class="bx-canvas-corner right">
  145. <button id="bxZoomOut2d" aria-label="缩小">−</button>
  146. <span id="bxZoom2dLabel">60 %</span>
  147. <button id="bxZoomIn2d" aria-label="放大">+</button>
  148. <button id="bxFit2d" title="适应画布">
  149. <svg viewBox="0 0 24 24"><path d="M4 9V4h5M20 9V4h-5M4 15v5h5M20 15v5h-5" fill="none" stroke="currentColor" stroke-width="1.6"/></svg>
  150. </button>
  151. </div>
  152. <!-- 外侧 / 内侧 浮窗 -->
  153. <div class="bx-side-float" id="bxSideFloat">
  154. <div class="side-tabs">
  155. <button data-side="outer" class="on">外侧</button>
  156. <i>|</i>
  157. <button data-side="inner">内侧</button>
  158. </div>
  159. <div class="side-thumb" id="bxSideThumb"></div>
  160. <a class="side-model" id="bxModelId" href="index.html" target="_blank">模型ID: 100010</a>
  161. </div>
  162. </div>
  163. <!-- 3D 预览 -->
  164. <div class="bx-3dview" id="bx3dView" hidden>
  165. <div class="box-scene" id="boxScene">
  166. <div class="box3d" id="box3d"></div>
  167. <div class="box-shadow" id="boxShadow"></div>
  168. </div>
  169. <div class="bx-3d-ctrl" id="bx3dCtrl">
  170. <div class="ctrl-color" id="bxColorQuick">
  171. <button class="cc-main" id="bxColorBtn" title="盒身颜色">
  172. <svg viewBox="0 0 24 24"><path d="m5 17 7-12 7 12-7 3-7-3Z" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/></svg>
  173. </button>
  174. <span class="cc-cur" id="bxColorCur"></span>
  175. <div class="cc-pop" id="bxColorPop" hidden>
  176. <div class="cc-row">
  177. <label class="cc-picker" title="自定义颜色">
  178. <svg viewBox="0 0 24 24"><path d="m5 17 7-12 7 12-7 3-7-3Z" fill="none" stroke="currentColor" stroke-width="1.6"/></svg>
  179. <input type="color" id="bxColorInput" value="#4a90e2">
  180. </label>
  181. <span class="cc-swatch cur" data-cc="#4a90e2" style="background:#4a90e2"></span>
  182. <span class="cc-swatch" data-cc="none" title="无颜色"><i class="none"></i></span>
  183. </div>
  184. <div class="cc-grid" id="bxColorGrid"></div>
  185. </div>
  186. </div>
  187. <div class="ctrl-fold">
  188. <button id="bxFoldPlay">▶</button>
  189. <span class="fl">开</span>
  190. <input type="range" id="boxFoldRange" min="0" max="100" value="0" aria-label="折叠程度">
  191. <span class="fr">合</span>
  192. <button id="bxFoldReset" title="重置视角">
  193. <svg viewBox="0 0 24 24"><path d="M4 10a8 8 0 1 1 2 6" fill="none" stroke="currentColor" stroke-width="1.7"/><path d="M4 4v6h6" fill="none" stroke="currentColor" stroke-width="1.7"/></svg>
  194. </button>
  195. </div>
  196. <button class="ctrl-4k" id="bx4kBtn">下载4K图片</button>
  197. </div>
  198. </div>
  199. </section>
  200. <aside class="bx-props" id="bxProps">
  201. <!-- 迷你 3D 实时预览(2D 模式显示) -->
  202. <div class="bx-mini3d" id="bxMini3d" hidden>
  203. <div class="mini-stage" id="bxMiniStage"></div>
  204. <div class="mini-ctrl">
  205. <button id="bxMiniAuto" title="自动播放" class="on">
  206. <svg class="ic-play" viewBox="0 0 24 24"><path d="M8 5.5v13l11-6.5L8 5.5Z"/></svg>
  207. <svg class="ic-pause" viewBox="0 0 24 24"><path d="M8.5 5.5v13M15.5 5.5v13" fill="none" stroke="currentColor" stroke-width="2.6" stroke-linecap="round"/></svg>
  208. </button>
  209. <button id="bxMiniPlay" title="播放开合">▶</button>
  210. <span class="ml">开</span>
  211. <input type="range" id="bxMiniFold" min="0" max="100" value="0">
  212. <span class="mr">合</span>
  213. <button id="bxMiniReset" title="重置视角">
  214. <svg viewBox="0 0 24 24"><path d="M4 10a8 8 0 1 1 2 6" fill="none" stroke="currentColor" stroke-width="1.7"/><path d="M4 4v6h6" fill="none" stroke="currentColor" stroke-width="1.7"/></svg>
  215. </button>
  216. <button id="bxMiniZoom" title="放大预览">
  217. <svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="6.5" fill="none" stroke="currentColor" stroke-width="1.7"/><path d="m16 16 5 5M8.5 11h5M11 8.5v5" stroke="currentColor" stroke-width="1.7"/></svg>
  218. </button>
  219. </div>
  220. </div>
  221. <div class="bx-props-body" id="bxPropsBody"></div>
  222. </aside>
  223. </main>
  224. <!-- 弹窗挂载点 -->
  225. <div id="bxModals"></div>
  226. <script src="assets/vendor/react.production.min.js?v=1.8.26"></script>
  227. <script src="assets/vendor/react-dom.production.min.js?v=1.8.26"></script>
  228. <script src="assets/vendor/dayjs.min.js?v=1.8.26"></script>
  229. <script src="assets/vendor/antd.min.js?v=1.8.26"></script>
  230. <script src="assets/vendor/three.min.js?v=1.8.26"></script>
  231. <script src="assets/js/data.js?v=1.8.26"></script>
  232. <script src="assets/js/pantone.js?v=1.8.26"></script>
  233. <script src="assets/js/render.js?v=1.8.26"></script>
  234. <script src="assets/js/antd-bridge.js?v=1.8.26"></script>
  235. <script src="assets/js/api.js?v=1.8.26"></script>
  236. <script src="assets/js/auth.js?v=1.8.26"></script>
  237. <script src="assets/js/qr.js?v=1.8.26"></script>
  238. <script src="assets/js/boxlib.js?v=1.8.26"></script>
  239. <script src="assets/js/boxdieline.js?v=1.8.26"></script>
  240. <script src="assets/js/box3d.js?v=1.8.26"></script>
  241. <script src="assets/js/box.js?v=1.8.26"></script>
  242. </body>
  243. </html>