Add a RenderLayer system for global render ordering
维护者通常 1 天内回复
@spydon 已经在做这个了。
开始于 2026年7月22日。
评估
这个 Issue 还没有评估数据。
描述
Motivation
priority only orders siblings, so the draw order of a component is tied to where it sits in the tree. Games regularly need cross-hierarchy ordering (a health bar above all enemies, a projectile under all UI) and the current workaround is restructuring the tree so competitors share a parent.
Proposal
A RenderLayer system, similar in spirit to Godot's CanvasLayer and Unity's sorting layers:
- A
World(per camera pass) owns an ordered set of layers; each layer has a z-index. - Components can declare a target layer; their rendering is routed to that layer instead of their tree position, while updating, lifecycle, and hit-testing stay hierarchical.
- Plain
PositionComponents are replayed onto their layer using their cached absolute transform. Subtrees with hierarchical render state (clips, decorators, snapshots, customrenderTree) stay atomic: they render as a unit at their subtree's layer. - The flattened-traversal infrastructure from #3957 (structure versioning, lazily rebuilt root-owned lists) carries over directly for maintaining per-layer render lists.
This also follows the design note in #3957 about separating render order from update order, and would give y-sort a render-time home (a layer sorted by position.y) with zero structural reordering.
Out of scope
Arbitrary interleaving of components across clip/decorator boundaries; those subtrees remain atomic within a layer.
Related: #3957, and the "Support a global z-index/priority" item in #1938.
- 主要语言
- Dart
- 星标
- 10.8k
- 派生
- 1.1k
- 平均合并
- 1 天 20 小时
- 30 天内合并 PR
- 63
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
flame-engine/flame 的其他 Issue
-
bug
难度 4/5 3-5 天 新手友好度 30/100
flame-engine/flame#4143 · 5 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
flame-engine/flame#4131 · 1 个 reaction ·
维护者通常 1 天内回复
-
enhancement v2
难度 4/5 3-5 天 新手友好度 25/100
flame-engine/flame#4116 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
flame-engine/flame#4063 ·
维护者通常 1 天内回复
-
TextComponent shadows are not affected by OpacityEffect可能已有人在做 @spydon 于 47 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 72/100
flame-engine/flame#4013 ·
维护者通常 1 天内回复
查看 flame-engine/flame 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
linagora/tmail-flutter#5034 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
fable-compiler/Fable#5157 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
bannzai/medicalarm#430 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
fossasia/badgemagic-app#2016 ·
维护者通常 1 天内回复
-
area-vm
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 4 天内回复