修复导出问题
This commit is contained in:
1 parent
d224939efd
commit
5d12bf895b
8 files changed
+90
-56
No files matched your search
@@ -79,6 +79,33 @@ const source = `
|
||||
console.error('骨骼池复用:死亡/复用边界应写阶跃关键帧,实际为 ' + JSON.stringify(poolStepped))
|
||||
}
|
||||
|
||||
// 子发射器的帧从父事件时刻才开始,不能按自身生命周期从 0f 截断。
|
||||
const childFrames = Array.from({ length: 80 }, (_, frame) => (
|
||||
frame >= 50 && frame < 65 ? [poolState(frame, 1, frame, 0)] : []
|
||||
))
|
||||
const subEmitterSystem = {
|
||||
id: 2, animation: 'animation', visible: true, frames: childFrames,
|
||||
config: {
|
||||
name: 'verify_child', mode: 'burst', lifeMode: 'fixed', lifeMin: 0.5, lifeMax: 0.5, delay: 0,
|
||||
imageResources: [resource], trail: false, trailResources: [], eventEnabled: false, events: [],
|
||||
},
|
||||
}
|
||||
const parentSystem = {
|
||||
id: 1, animation: 'animation', visible: true, frames: Array.from({ length: 80 }, () => []),
|
||||
config: {
|
||||
name: 'verify_parent', mode: 'burst', lifeMode: 'fixed', lifeMin: 0.5, lifeMax: 0.5, delay: 0,
|
||||
imageResources: [resource], trail: false, trailResources: [], eventEnabled: true,
|
||||
events: [{ id: 1, event: 'death', targetSystemId: 2, probability: 1 }],
|
||||
},
|
||||
}
|
||||
const subResult = buildSpineJson({ systems: [parentSystem, subEmitterSystem], timeline, settings: poolSettings })
|
||||
const subBone = subResult.json.animations.animation.bones.verify_child_0
|
||||
const subFirstFrame = subBone?.translate ? Math.round(subBone.translate[0].time * 30) : -1
|
||||
if (subFirstFrame !== 50) {
|
||||
failures++
|
||||
console.error('子发射器:父事件之后的帧被按自身生命周期截断,实际首帧为 ' + subFirstFrame)
|
||||
}
|
||||
|
||||
// 循环持续(开始 30f / 循环 80f / 结束 30f):段边界 30f、110f 必须在所有动画通道上打关键帧。
|
||||
const loopConfig = {
|
||||
name: 'loop', mode: 'stream', streamBehavior: 'loop', rate: 4, delay: 0,
|
||||
|
||||
Reference in new issue
Block a user