Add PAGX node channel reflection API, matrix animation, and in-place notifyChange refresh.#3505
Open
Hparty wants to merge 31 commits into
Open
Add PAGX node channel reflection API, matrix animation, and in-place notifyChange refresh.#3505Hparty wants to merge 31 commits into
Hparty wants to merge 31 commits into
Conversation
…nels by name. (cherry picked from commit 67ab9e4d89bf7daf3ea061c9c21368bb9d5ab688)
…e channels via a subclassed runtime target. (cherry picked from commit b2f0fe1f4b1565bc818548fa6184fcc2f3de7d81)
… registry consistency test. (cherry picked from commit c453d7ee78f6278ef060322ec97eccf73eaa154c)
…eries and refresh scenes via notifyChange.
…yout via the reset branch.
…tion requires layout.
…nvalid VectorLayer cast.
…prevent dangling bindings.
…ar rotation channel for precise turns.
…to de-duplicate the two interpolators.
…ther painter still references them.
… in-place refresh.
…ginating document node.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3505 +/- ##
==========================================
+ Coverage 80.57% 80.65% +0.07%
==========================================
Files 620 623 +3
Lines 67021 68881 +1860
Branches 19885 20320 +435
==========================================
+ Hits 54002 55553 +1551
- Misses 9083 9278 +195
- Partials 3936 4050 +114 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…ren keep their subtree root.
… runtimeLayer re-sync path.
…/remove/edit takes effect.
…s-PAGX edits in notifyChange.
…ing a foreign document's nodes.
… a scene runtime-tree rebuild.
…tration across rebuild.
…animatable-writer registry test.
…n MakeChild path.
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
新增按名读写 PAGX 节点通道的反射 API、矩阵关键帧动画,以及增量式的
PAGXDocument::notifyChange——把构建后的编辑反映到所有存活的PAGScene上,涵盖属性编辑、结构增删、动画(timeline)编辑和跨文档(外部 composition)编辑。同时在PAGLayer上暴露源节点 id。反射 API (
include/pagx/PAGXNodeChannel.h)GetNodeChannel/SetNodeChannel—— 按通道名读写节点的标量属性(通道名与 PAGX XML 一致,如alpha、position.x、blendMode)。IsAnimatableChannel/RequiresLayout—— 两个正交查询。一个通道可同时满足两者:形状的size.width在播放时可原地动画,但在文档上编辑它需要重新布局。内部由ChannelFlags位标志支撑(src/pagx/PAGXChannelTable.h)。notifyChange —— 增量刷新
PAGXDocument::notifyChange(dirtyNodes, layoutChanged)把编辑反映到每个存活 scene,并尽量保留 tgfx layer 句柄:layoutChanged为 true 时对影响布局的字段重新布局。VectorLayer。@id引用(如AnimationObject.target、Fill.color),调用方需把受影响引用链上的所有节点都标记为脏。notifyChange会重建所有嵌入它的 scene 的运行时树。节点只能通过其所属文档来通知(父文档不能通知子文档的节点)。动画
MatrixDecompose.h);为每个可动画通道注册运行时 writer,并由一个注册表一致性测试守护。Group::rotation通道。PAGLayer
PAGLayer::id()返回源节点的 id,调用方可据此识别其对应的文档节点。加固(来自两轮多 agent review)
x/y、形状 position → 可动画且影响布局)。VectorLayer强转加类型守卫,避免类型不匹配。unbindSubtree会回收内容元素 / 颜色源 / ColorStop / ImagePattern-Image 的绑定,并通过存活引用扫描尊重共享(@id)资源。PAGTimeline现在通过所属 scene 懒解析其 binding,从而在运行时树重建后依然有效。兼容性
没有任何 PAGX 节点新增可序列化的属性字段。唯一的数据模型变更是
Channel的值类型新增了Matrix备选项(向后兼容)。旧的 PAGX 文件解析行为不变。测试
PAGFullTest编译干净;全部 231 个PAGXTest/PAGXRuntimeTest用例通过,新增覆盖包括时间轴重建、跨文档与嵌套(A→B→C)同步、重建后显示选项保留,以及缓存 timeline 跨重建的路径。已知限制 / 后续
Group::rotation通道。