Skip to content

画布背景:纯色或模糊视频填充 - #80

Open
devin-ai-integration[bot] wants to merge 7 commits into
devin/1796487041-transitionsfrom
devin/1796487669-canvas-background
Open

devin-ai-integration[bot] wants to merge 7 commits into
devin/1796487041-transitionsfrom
devin/1796487669-canvas-background

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Dec 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

画布背景不再固定为黑色。顶部画布菜单新增「背景颜色」(取色器)和「模糊背景」两项。

type CanvasBackground = { kind: 'color', color: '#rrggbb' } | { kind: 'blur' }  // src/data/canvas.ts
buildScene(..., { background })  // → scene.background(颜色)+ scene.backdrop?(模糊)
  • 模糊背景:取最底层的视频或图片(跳过转场中的前一个片段),等比放大 1.1 倍盖满画布,再做 blur(max(w,h)/40),片段自身的调节滤镜也一起应用。drawBackdrop 复用该片段图层已经取到的同一帧,所以导出时不会为背景再解码一次。预览(PlayerMoveable 里一个单独的 canvas)和 MP4 导出用的是同一个 drawBackdrop。
  • 工程草稿:新增 bg 字段,值为颜色或 'blur';默认黑色不写入,旧工程不受影响。useEditorDraft 会保存和恢复背景,导出 .flycut 文件时也带上背景。
  • 剪映草稿:每个视频、图片片段都挂一个 canvases 素材,纯色用 canvas_color,模糊用 canvas_blur(blur 0.375)。
  • MCP:新增 set_canvas { ratio?, background? };get_timeline().canvas 返回 background。命令的 schema 校验现在支持 pattern。

叠在 #79 上。

Link to Devin session: https://app.devin.ai/sessions/a882af08b80c444280600c6cdc988c2e
Open in Devin Desktop: https://app.devin.ai/desktop/session/a882af08b80c444280600c6cdc988c2e?variant=devin
Requested by: @x007xyz


🟢 Devin Review found nothing to fix · View findings · Follow Devin's work

Devin Review

Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
@vercel

vercel Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
fly-cut Ready Ready Preview Dec 5, 2026 4:51pm UTC

@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

devin-ai-integration Bot and others added 2 commits December 5, 2026 16:29
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
…he keyboard

Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
devin-ai-integration Bot and others added 2 commits December 5, 2026 16:32
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 4 findings. Devin automatically fixed all 4 findings.

Fixed by Devin (4)
  • Wrong initial color after blur — Picker input now binds to the remembered color (kept in sync with restored/MCP backgrounds), so it opens on the saved color while blur is active.
  • Invalid JianYing background color format — canvas_color now written as #RRGGBBFF.
  • Keyboard-inaccessible canvas color picker — Selecting the color item (Enter or click) keeps the menu open and opens the picker via showPicker/click.
  • Remembered color leaves canvas blurred — Opening the swatch now switches the canvas to the remembered solid color.

View findings in Devin Review · Follow Devin's work

Devin Review

…el check

Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>

This branch was successfully deployed

1 active deployment
Preview — dc7ccdd1 Deployed Dec 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant