mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-06 07:14:55 +08:00
Add set empty animation.
This commit is contained in:
parent
57c2fa1cfd
commit
be761e2792
@ -120,6 +120,21 @@
|
||||
"id": "stop",
|
||||
"scriptName": "Stop",
|
||||
"highlight": false
|
||||
},
|
||||
{
|
||||
"id": "set-empty-animation",
|
||||
"scriptName": "SetEmptyAnimation",
|
||||
"highlight": false,
|
||||
"params": [
|
||||
{
|
||||
"id": "track",
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"id": "mix-duration",
|
||||
"type": "number"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"expressions": [
|
||||
|
||||
@ -31,6 +31,10 @@ C3.Plugins.EsotericSoftware_SpineConstruct3.Acts =
|
||||
|
||||
Stop (this: SDKInstanceClass) {
|
||||
this.stop();
|
||||
},
|
||||
|
||||
SetEmptyAnimation (this: SDKInstanceClass, track: number, mixDuration: number) {
|
||||
this.setEmptyAnimation(track, mixDuration);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@ -175,6 +175,10 @@ class SpineC3Instance extends globalThis.ISDKWorldInstanceBase {
|
||||
this.isPlaying = false;
|
||||
}
|
||||
|
||||
public setEmptyAnimation (track: number, mixDuration = 0) {
|
||||
this.state?.setEmptyAnimation(track, mixDuration);
|
||||
}
|
||||
|
||||
private _setSkin () {
|
||||
const { skeleton } = this;
|
||||
if (!skeleton) return;
|
||||
|
||||
@ -194,6 +194,21 @@
|
||||
"list-name": "Stop",
|
||||
"display-text": "Stop animation",
|
||||
"description": "Pause or stop the animation"
|
||||
},
|
||||
"set-empty-animation": {
|
||||
"list-name": "Set empty animation",
|
||||
"display-text": "Set empty animation on track {0} with mix duration {1}",
|
||||
"description": "Set an empty animation on a specific track",
|
||||
"params": {
|
||||
"track": {
|
||||
"name": "Track",
|
||||
"desc": "Track index"
|
||||
},
|
||||
"mix-duration": {
|
||||
"name": "Mix duration",
|
||||
"desc": "Duration in seconds to mix from the current animation to empty"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"expressions": {
|
||||
|
||||
@ -196,6 +196,21 @@
|
||||
"display-text": "停止动画",
|
||||
"description": "暂停或停止动画"
|
||||
},
|
||||
"set-empty-animation": {
|
||||
"list-name": "设置空动画",
|
||||
"display-text": "在轨道{0}上设置空动画,混合时长{1}",
|
||||
"description": "在特定轨道上设置空动画",
|
||||
"params": {
|
||||
"track": {
|
||||
"name": "轨道",
|
||||
"desc": "轨道索引"
|
||||
},
|
||||
"mix-duration": {
|
||||
"name": "混合时长",
|
||||
"desc": "从当前动画混合到空动画的持续时间(秒)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"expressions": {
|
||||
"double": {
|
||||
"description": "将数字翻倍。",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user