Skip to content

feat: use transformFrom arg - #1033

Merged
MakinoharaShoko merged 1 commit into
devfrom
add-transform-from-arg
Sep 23, 2026
Merged

MakinoharaShoko merged 1 commit into
devfrom
add-transform-from-arg

Conversation

@MakinoharaShoko

@MakinoharaShoko MakinoharaShoko commented Sep 16, 2026 •

Copy link
Copy Markdown
Member

使用 transformFrom 参数代替难以理解的 writeDefault 和 ignoreDefault 参数。

具体来说, transformFrom 有两个值可以选:current 和 default 。
current 对应 writeDefault: false, ignoreDefault: true 的情况,维持当前 transform 并只写入动画定义的字段。
default 对应 writeDefault: true, ignoreDefault: false 的情况,将舞台对象以 baseTransform 为基准,完整写入所有字段。

writeDefault: false, ignoreDefault: false 和 writeDefault: true, ignoreDefault: true 的情况一般来说不常用且别扭,因此不设这样的情况。但为了保证兼容性,这两个参数不会移除。如果没有传入 transfromFrom 参数,则这两个参数依然生效。

如果以上三个参数都没有传入,那么实际上相当于 transformFrom=current 的情况,这是新的默认行为和推荐做法。

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14ffc6a28c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/webgal/src/Core/util/getSentenceArg.ts
@MakinoharaShoko
MakinoharaShoko merged commit 868653e into dev Sep 23, 2026
2 checks passed
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