Repository navigation
画布背景图片 - #83
Open
devin-ai-integration[bot] wants to merge 3 commits into
Open
画布背景图片#83devin-ai-integration[bot] wants to merge 3 commits into
devin-ai-integration[bot] wants to merge 3 commits into
Conversation
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Co-Authored-By: zhangxiang chen <x007xyzabc@gmail.com>
Contributor
Author
There was a problem hiding this comment.
Devin Review found 2 findings. Devin automatically fixed all 2 findings.
Fixed by Devin (2)
- Cleanup deletes newly selected backgrounds — usedAssets now also counts the current canvas background image, so cleanup before autosave keeps it.
- Project backup omits its background — exportProject captures the background once and uses it for both the draft JSON and the packed asset list.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
画布背景在纯色、模糊之外新增「背景图片」:从素材库选一张图片(或直接导入),按比例放大盖满画布、居中裁切。叠在 #82 上。
buildScene生成scene.backgroundImage = { sourceId, format, rect: coverRect(...) };loadFrameSources额外取背景图(imageDecoder,动图取第一帧),drawBackdrop先画背景图再画模糊背景。预览的背景 canvas 和 MP4 导出共用这条路径。bg字段可以是图片对象;assetIdsOf(lines, background)把背景图算作工程引用的素材,自动保存和.flycut工程包都会带上它,素材清理也不会删掉它。恢复时图片丢失则退回黑色背景并提示素材丢失。canvas_image画布,图片写入草稿的materials/(和片段素材共用新的addMaterialFile)。set_canvas({ background: { kind: 'image', assetId } }),get_timeline/set_canvas返回{ kind: 'image', assetId, name }。测试:单测覆盖校验、
coverRect、草稿往返和assetIdsOf;MCP e2e 覆盖设置背景图后预览像素、剪映草稿中的canvas_image及图片文件、导出 MP4 四角为背景图颜色、菜单选择和刷新后恢复。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 fixed all 2 findings · Follow Devin's work