独立显示修正

This commit is contained in:
tianmo committed 2026-10-26 10:26:17 +08:00
1 parent 7069b168de
commit 0f578d29a4
6 files changed
+16 -7

No files matched your search

+8 -1
View File
@@ -15,6 +15,7 @@ export interface RenderLayerSlot {
export interface RenderLayerSpine {
id: number
enabled: boolean
visible: boolean
status: string
slots?: RenderLayerSlot[]
}
@@ -40,7 +41,13 @@ export function resolveRenderTarget(
drawOrder?: readonly string[] | null,
): RenderTarget | null {
if (config.renderLayerMode !== 'slot') return null
const spine = spines.find((item) => item.id === config.renderLayerSpineId && item.enabled && item.status === 'ready')
// 隐藏 Spine 时回退到 world 层,粒子不随插槽容器隐藏;重新显示后再恢复原渲染层级。
const spine = spines.find((item) =>
item.id === config.renderLayerSpineId
&& item.enabled
&& item.visible !== false
&& item.status === 'ready',
)
if (!spine) return null
const slots = spine.slots || []
const target = slots.find((slot) => slot.name === config.renderLayerSlotName)