阶段七落盘文档
This commit is contained in:
1 parent
5f4667f736
commit
031359586d
4 files changed
+452
-9
No files matched your search
@@ -15,6 +15,11 @@ export interface CollisionBody extends SceneCollider {
|
||||
tags: string[]
|
||||
selectedTag: string
|
||||
followPath: boolean
|
||||
followPathId: number
|
||||
followDuration: number
|
||||
followPathRotation: boolean
|
||||
followCurveMode: '跟随导出' | '线性' | '贝塞尔'
|
||||
followCurve: Array<{ x: number; y: number }>
|
||||
}
|
||||
|
||||
export interface ScenePath {
|
||||
@@ -156,6 +161,11 @@ export const useParticleStore = defineStore('particle', {
|
||||
elasticity: 0.8,
|
||||
friction: 0.3,
|
||||
followPath: false,
|
||||
followPathId: 0,
|
||||
followDuration: 2,
|
||||
followPathRotation: false,
|
||||
followCurveMode: '跟随导出',
|
||||
followCurve: [{ x: 0, y: 0 }, { x: 1, y: 1 }],
|
||||
}
|
||||
this.colliders.push(collider)
|
||||
this.activeObjectType = 'collision'
|
||||
@@ -303,6 +313,11 @@ export const useParticleStore = defineStore('particle', {
|
||||
const end = Math.max(0, Number(spine.timeOffset) || 0) + Math.max(0, animation.duration || 0)
|
||||
if (end > maxSec) maxSec = end
|
||||
}
|
||||
for (const collider of this.colliders) {
|
||||
if (!collider.followPath || !collider.followPathId) continue
|
||||
const end = Math.max(0, Number(collider.followDuration) || 0)
|
||||
if (end > maxSec) maxSec = end
|
||||
}
|
||||
const frames = Math.max(1, Math.ceil(maxSec * fps))
|
||||
this.timeline.totalFrames = frames
|
||||
// clamp 当前帧
|
||||
|
||||
Reference in new issue
Block a user