Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spine设计结构和UIOpacity并不匹配 #18123

Open
kaxifakl opened this issue Jan 4, 2025 · 11 comments
Open

spine设计结构和UIOpacity并不匹配 #18123

kaxifakl opened this issue Jan 4, 2025 · 11 comments
Assignees
Labels
Milestone

Comments

@kaxifakl
Copy link
Contributor

kaxifakl commented Jan 4, 2025

Cocos Creator version

3.8.5

System information

Window 10

Issue description

ts引擎中,spine用的opacity并不是从祖先节点中传递过来的,这会导致spine的透明度显示异常,这个问题存在很久了,整个spine设计结构和UIOpacity并不匹配

Relevant error log output

No response

Steps to reproduce

...

Minimal reproduction project

No response

@kaxifakl kaxifakl added Bug Needs Triage Needs to be assigned by the team labels Jan 4, 2025
@minggo
Copy link
Contributor

minggo commented Jan 7, 2025

请描述下具体的错误是什么以及如何重现的。

@kaxifakl
Copy link
Contributor Author

kaxifakl commented Jan 8, 2025

spine-bug.zip

@kaxifakl
Copy link
Contributor Author

kaxifakl commented Jan 8, 2025

动画 (0)

@kaxifakl
Copy link
Contributor Author

kaxifakl commented Jan 8, 2025

spine第一帧会闪一下,因为spine刷新渲染数据时,并没有用父节点的opacity

@kaxifakl
Copy link
Contributor Author

kaxifakl commented Jan 8, 2025

@minggo @qiuguohua

@kaxifakl
Copy link
Contributor Author

kaxifakl commented Jan 9, 2025

spine-bug.zip

@kaxifakl
Copy link
Contributor Author

kaxifakl commented Jan 9, 2025

@minggo @bofeng-song 这个修复有问题,只读取了父节点的opacity,我把透明度改到了祖先节点上,问题依旧

@bofeng-song
Copy link
Contributor

祖先节点的opacity由 batcher2d计算;这里只计算当前节点的opacity;理论上有问题最多是延迟一帧

@kaxifakl
Copy link
Contributor Author

kaxifakl commented Jan 9, 2025

@minggo @bofeng-song 这个修复有问题,只读取了父节点的opacity,我把透明度改到了祖先节点上,问题依旧

延迟一帧这种方案并不合理,开发者也无法接受
uiRendererManager.updateAllDirtyRenderers()时填充数据时并没有拿到祖先节点的opacity,然后又在batcher2d的walk()中再把opacity塞进去,这里也并没有处理spine的opacity
另外batche2d中updateOpacity的操作也存在多余的性能消耗

@bofeng-song bofeng-song modified the milestones: 3.8.6, May be later Jan 10, 2025
@bofeng-song
Copy link
Contributor

后面再择机处理

@bofeng-song bofeng-song reopened this Jan 10, 2025
@kaxifakl
Copy link
Contributor Author

spine相关的问题优先级需要很高,大部分公司的项目都是用spine的,而且这个问题很常见

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants