@quenty/animations 8.18.0 → 8.18.1-canary.bc9c542.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/package.json +13 -13
- package/src/Shared/AnimationSlotPlayer.lua +40 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [8.18.1-canary.bc9c542.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/animations@8.18.0...@quenty/animations@8.18.1-canary.bc9c542.0) (2025-07-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **AnimationSlotPlayer:** promise animation Stopped ([674b3af](https://github.com/Quenty/NevermoreEngine/commit/674b3afe54848bddd18faebace0f075e1b541a12))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [8.18.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/animations@8.17.3...@quenty/animations@8.18.0) (2025-05-10)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/animations",
|
|
3
|
-
"version": "8.18.0",
|
|
3
|
+
"version": "8.18.1-canary.bc9c542.0",
|
|
4
4
|
"description": "Utility methods for playing back animations on Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,20 +25,20 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/baseobject": "
|
|
29
|
-
"@quenty/enumutils": "
|
|
30
|
-
"@quenty/humanoidanimatorutils": "
|
|
31
|
-
"@quenty/loader": "
|
|
32
|
-
"@quenty/maid": "
|
|
33
|
-
"@quenty/promise": "
|
|
34
|
-
"@quenty/promisemaid": "
|
|
35
|
-
"@quenty/rbxasset": "
|
|
36
|
-
"@quenty/rx": "
|
|
37
|
-
"@quenty/signal": "
|
|
38
|
-
"@quenty/valueobject": "
|
|
28
|
+
"@quenty/baseobject": "10.9.0",
|
|
29
|
+
"@quenty/enumutils": "3.4.2",
|
|
30
|
+
"@quenty/humanoidanimatorutils": "3.2.0",
|
|
31
|
+
"@quenty/loader": "10.9.0",
|
|
32
|
+
"@quenty/maid": "3.5.0",
|
|
33
|
+
"@quenty/promise": "10.11.0",
|
|
34
|
+
"@quenty/promisemaid": "5.11.0",
|
|
35
|
+
"@quenty/rbxasset": "5.9.0",
|
|
36
|
+
"@quenty/rx": "13.18.0",
|
|
37
|
+
"@quenty/signal": "7.11.0",
|
|
38
|
+
"@quenty/valueobject": "13.18.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "bc9c54214ba5ef245787085e26626eaaf9fb0e9e"
|
|
44
44
|
}
|
|
@@ -12,6 +12,8 @@ local AnimationUtils = require("AnimationUtils")
|
|
|
12
12
|
local BaseObject = require("BaseObject")
|
|
13
13
|
local EnumUtils = require("EnumUtils")
|
|
14
14
|
local Maid = require("Maid")
|
|
15
|
+
local Promise = require("Promise")
|
|
16
|
+
local PromiseMaidUtils = require("PromiseMaidUtils")
|
|
15
17
|
local RbxAssetUtils = require("RbxAssetUtils")
|
|
16
18
|
local ValueObject = require("ValueObject")
|
|
17
19
|
|
|
@@ -93,6 +95,44 @@ type AnimationData = {
|
|
|
93
95
|
originalPriority: Enum.AnimationPriority?,
|
|
94
96
|
}
|
|
95
97
|
|
|
98
|
+
--[=[
|
|
99
|
+
Promises that the animation has stopped playing
|
|
100
|
+
]=]
|
|
101
|
+
function AnimationSlotPlayer.PromiseStopped(self: AnimationSlotPlayer): Promise.Promise<boolean>
|
|
102
|
+
local promise = Promise.new()
|
|
103
|
+
|
|
104
|
+
PromiseMaidUtils.whilePromise(promise, function(topMaid)
|
|
105
|
+
topMaid:GiveTask(self._currentAnimationTrackData
|
|
106
|
+
:ObserveBrio(function(data: AnimationData?)
|
|
107
|
+
return data ~= nil
|
|
108
|
+
end)
|
|
109
|
+
:Subscribe(function(brio)
|
|
110
|
+
if brio:IsDead() then
|
|
111
|
+
return
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
local data: AnimationData = brio:GetValue()
|
|
115
|
+
if not data.track.IsPlaying then
|
|
116
|
+
promise:Resolve(true)
|
|
117
|
+
return
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
local maid = brio:ToMaid()
|
|
121
|
+
maid:GiveTask(data.track.Stopped:Connect(function()
|
|
122
|
+
promise:Resolve()
|
|
123
|
+
end))
|
|
124
|
+
end))
|
|
125
|
+
|
|
126
|
+
topMaid:GiveTask(function()
|
|
127
|
+
self._maid[promise] = nil
|
|
128
|
+
end)
|
|
129
|
+
end)
|
|
130
|
+
|
|
131
|
+
self._maid[promise] = promise
|
|
132
|
+
|
|
133
|
+
return promise
|
|
134
|
+
end
|
|
135
|
+
|
|
96
136
|
--[=[
|
|
97
137
|
Adjusts the speed of the animation playing in the slot
|
|
98
138
|
|