evomeme 0.1.7 → 0.1.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,15 +68,12 @@
68
68
  <button type="button" data-action="cutout" hidden>智能抠图</button>
69
69
  <button type="button" data-action="interactive-edit" hidden>交互编辑</button>
70
70
  <button type="button" data-action="layer-decomposition" hidden>大模型图层分离</button>
71
- <button type="button" data-action="video-trim" hidden>裁剪视频</button>
72
71
  <button type="button" data-action="video-cycle" hidden>智能周期提取</button>
73
- <button type="button" data-action="video-to-sequence" hidden>序列帧化</button>
72
+ <button type="button" data-action="video-to-frame-sheet" hidden>视频转序列帧图</button>
74
73
  <button type="button" data-action="smart-split">智能切分</button>
75
74
  <button type="button" data-action="manual-split">手动切分</button>
76
- <button type="button" data-action="edit-sequence" hidden>在左侧编辑序列</button>
77
- <button type="button" data-action="sequence-to-sheet" hidden>拼成单图</button>
78
- <button type="button" data-action="ungroup-sequence" hidden>拆散为单图</button>
79
- <button type="button" data-action="combine-sequence" hidden>组合为序列帧</button>
75
+ <button type="button" data-action="frame-sheet-preview" hidden>序列帧预览</button>
76
+ <button type="button" data-action="frame-sheet-edit" hidden>序列帧编辑</button>
80
77
  <button type="button" data-action="delete" class="ctx-danger">删除</button>
81
78
  </div>
82
79
 
@@ -234,135 +231,82 @@
234
231
  <div class="modal-backdrop modal-backdrop-dark" id="frame-extract-modal" hidden>
235
232
  <div class="modal-dialog" role="dialog" aria-modal="true" aria-labelledby="frame-extract-title">
236
233
  <div class="seq-panel-head">
237
- <strong id="frame-extract-title">序列帧化</strong>
234
+ <strong id="frame-extract-title">视频转序列帧图</strong>
238
235
  <button type="button" class="ghost-btn" id="frame-extract-close">关闭</button>
239
236
  </div>
240
237
  <p class="modal-hint">
241
- 按总帧数计算步长均匀取帧:首帧与尾帧必含,中间为 1 + n×⌊T/(C-1)⌋。
238
+ 均匀抽取视频帧后,自动按从左到右、从上到下的顺序拼成一张 PNG 图片。
242
239
  </p>
243
240
  <label class="seq-field frame-extract-field">
244
- 序列帧长度
241
+ 抽取帧数
245
242
  <input type="number" id="frame-extract-count" min="2" max="30" step="1" value="10" />
246
243
  <span class="frame-extract-range">2 – 30</span>
247
244
  </label>
248
245
  <p class="modal-hint" id="frame-extract-status" hidden></p>
249
246
  <div class="modal-actions">
250
247
  <button type="button" class="ghost-btn" id="frame-extract-cancel">取消</button>
251
- <button type="button" class="tool-btn" id="frame-extract-confirm">开始抽帧</button>
248
+ <button type="button" class="tool-btn" id="frame-extract-confirm">生成序列帧图</button>
252
249
  </div>
253
250
  </div>
254
251
  </div>
255
252
 
256
- <div class="modal-backdrop modal-backdrop-dark" id="video-trim-modal" hidden>
257
- <div class="modal-dialog modal-dialog-wide" role="dialog" aria-modal="true" aria-labelledby="video-trim-title">
253
+ <div class="modal-backdrop modal-backdrop-dark" id="frame-preview-modal" hidden>
254
+ <div class="modal-dialog" role="dialog" aria-modal="true" aria-labelledby="frame-preview-title">
258
255
  <div class="seq-panel-head">
259
- <strong id="video-trim-title">裁剪视频</strong>
260
- <button type="button" class="ghost-btn" id="video-trim-close">关闭</button>
256
+ <strong id="frame-preview-title">序列帧预览</strong>
257
+ <button type="button" class="ghost-btn" id="frame-preview-close">关闭</button>
261
258
  </div>
262
- <p class="modal-hint">一条时间轴:拖白点定位画面,拖青绿柄设入/出点;滚轮可微调(Shift=1ms)。</p>
263
- <div class="trim-player">
264
- <div class="trim-stage">
265
- <video id="video-trim-preview" muted playsinline preload="auto"></video>
266
- </div>
267
- <div class="trim-bar">
268
- <button type="button" class="trim-play-btn" id="video-trim-play" title="播放/暂停">▶</button>
269
- <span class="trim-clock">
270
- <strong id="video-trim-now-label">0:00.000</strong>
271
- <span>/</span>
272
- <span id="video-trim-total-label">0:00.000</span>
273
- </span>
274
- </div>
275
- <div class="trim-timeline" id="video-trim-timeline">
276
- <div class="trim-track" id="video-trim-track">
277
- <div class="trim-range" id="video-trim-range"></div>
278
- <input
279
- type="range"
280
- class="trim-scrub-input"
281
- id="video-trim-scrub"
282
- min="0"
283
- max="0"
284
- step="0.001"
285
- value="0"
286
- aria-label="播放进度"
287
- />
288
- <div
289
- class="trim-handle trim-handle-start"
290
- id="video-trim-handle-start"
291
- title="入点"
292
- role="slider"
293
- tabindex="0"
294
- ></div>
295
- <div
296
- class="trim-handle trim-handle-end"
297
- id="video-trim-handle-end"
298
- title="出点"
299
- role="slider"
300
- tabindex="0"
301
- ></div>
302
- </div>
303
- </div>
304
- <div class="trim-times">
305
- <span>入点 <strong id="video-trim-start-label">0:00.000</strong></span>
306
- <span>选区 <strong id="video-trim-dur-label">0:00.000</strong></span>
307
- <span>出点 <strong id="video-trim-end-label">0:00.000</strong></span>
308
- </div>
259
+ <p class="modal-hint">
260
+ 将当前图片等分为网格,并按照从左到右、从上到下的顺序在画布内循环播放。不会修改图片文件。
261
+ </p>
262
+ <div class="seq-sheet-fields">
263
+ <label class="seq-field frame-extract-field">
264
+ 行数
265
+ <input type="number" id="frame-preview-rows" min="1" max="64" step="1" value="2" />
266
+ </label>
267
+ <label class="seq-field frame-extract-field">
268
+ 列数
269
+ <input type="number" id="frame-preview-columns" min="1" max="64" step="1" value="2" />
270
+ </label>
309
271
  </div>
310
- <p class="modal-hint" id="video-trim-status" hidden></p>
272
+ <p class="modal-hint" id="frame-preview-info"></p>
273
+ <div class="seq-sheet-preview" id="frame-preview-grid" aria-hidden="true"></div>
274
+ <label class="seq-field frame-extract-field">
275
+ FPS
276
+ <input type="number" id="frame-preview-fps" min="0.000001" step="any" value="8" />
277
+ </label>
278
+ <p class="modal-hint" id="frame-preview-status" hidden></p>
311
279
  <div class="modal-actions">
312
- <button type="button" class="ghost-btn" id="video-trim-cancel">取消</button>
313
- <button type="button" class="tool-btn" id="video-trim-confirm">裁剪并生成</button>
280
+ <button type="button" class="ghost-btn" id="frame-preview-cancel">取消</button>
281
+ <button type="button" class="tool-btn" id="frame-preview-confirm">开始预览</button>
314
282
  </div>
315
283
  </div>
316
284
  </div>
317
285
 
318
- <div class="modal-backdrop modal-backdrop-dark" id="seq-sheet-modal" hidden>
319
- <div class="modal-dialog" role="dialog" aria-modal="true" aria-labelledby="seq-sheet-title">
286
+ <div class="modal-backdrop modal-backdrop-dark" id="frame-editor-split-modal" hidden>
287
+ <div class="modal-dialog" role="dialog" aria-modal="true" aria-labelledby="frame-editor-split-title">
320
288
  <div class="seq-panel-head">
321
- <strong id="seq-sheet-title">拼成单图</strong>
322
- <button type="button" class="ghost-btn" id="seq-sheet-close">关闭</button>
289
+ <strong id="frame-editor-split-title">创建序列帧编辑器</strong>
290
+ <button type="button" class="ghost-btn" id="frame-editor-split-close">关闭</button>
323
291
  </div>
324
292
  <p class="modal-hint">
325
- 按行列排布序列帧:先从左到右填满一行,再换到下一行;多出的格子保持透明。
293
+ 请设置当前图片包含的行数和列数。已有序列帧预览时会自动填入相同配置;这里允许 1×1。
326
294
  </p>
327
- <p class="modal-hint" id="seq-sheet-frame-info">共 0 帧</p>
328
295
  <div class="seq-sheet-fields">
329
296
  <label class="seq-field frame-extract-field">
330
297
  行数
331
- <input type="number" id="seq-sheet-rows" min="1" max="64" step="1" value="1" />
298
+ <input type="number" id="frame-editor-split-rows" min="1" max="64" step="1" value="2" />
332
299
  </label>
333
300
  <label class="seq-field frame-extract-field">
334
301
  列数
335
- <input type="number" id="seq-sheet-cols" min="1" max="64" step="1" value="1" />
302
+ <input type="number" id="frame-editor-split-columns" min="1" max="64" step="1" value="2" />
336
303
  </label>
337
304
  </div>
338
- <div class="seq-sheet-preview" id="seq-sheet-preview" aria-hidden="true"></div>
339
- <p class="modal-hint" id="seq-sheet-status" hidden></p>
340
- <div class="modal-actions">
341
- <button type="button" class="ghost-btn" id="seq-sheet-cancel">取消</button>
342
- <button type="button" class="tool-btn" id="seq-sheet-confirm">生成单图</button>
343
- </div>
344
- </div>
345
- </div>
346
-
347
- <div class="modal-backdrop" id="seq-modal" hidden>
348
- <div class="modal-dialog" role="dialog" aria-modal="true" aria-labelledby="seq-panel-title">
349
- <div class="seq-panel-head">
350
- <strong id="seq-panel-title">编辑序列</strong>
351
- <button type="button" class="ghost-btn" id="seq-panel-close">关闭</button>
352
- </div>
353
- <p class="modal-hint">调整播放速度、循环,以及帧顺序。</p>
354
- <label class="seq-field">
355
- 播放速度 (FPS)
356
- <input type="range" id="seq-fps" min="1" max="24" value="8" />
357
- <span id="seq-fps-val">8</span>
358
- </label>
359
- <label class="seq-field seq-check">
360
- <input type="checkbox" id="seq-loop" checked />
361
- 循环播放
362
- </label>
363
- <div class="seq-frames" id="seq-frames"></div>
305
+ <p class="modal-hint" id="frame-editor-split-info"></p>
306
+ <p class="modal-hint" id="frame-editor-split-status" hidden></p>
364
307
  <div class="modal-actions">
365
- <button type="button" class="ghost-btn" id="seq-panel-done">完成</button>
308
+ <button type="button" class="ghost-btn" id="frame-editor-split-cancel">取消</button>
309
+ <button type="button" class="tool-btn" id="frame-editor-split-confirm">创建编辑器</button>
366
310
  </div>
367
311
  </div>
368
312
  </div>
@@ -139,7 +139,7 @@ export async function smartSplitImage(imageUrl) {
139
139
  return a.minX - b.minX
140
140
  })
141
141
 
142
- // 原图尺寸裁切(更高清),并统一到完全相同的画布尺寸,保证序列播放不抖动
142
+ // 原图尺寸裁切(更高清),并统一到完全相同的画布尺寸,保证序列播放不抖动
143
143
  const inv = 1 / scale
144
144
  const crops = []
145
145
  for (const box of boxes) {