@quenty/animations 8.17.3 → 8.17.4-canary.11a5dcf.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 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.17.4-canary.11a5dcf.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/animations@8.17.3...@quenty/animations@8.17.4-canary.11a5dcf.0) (2025-05-10)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Additional type checking updates ([05ba29a](https://github.com/Quenty/NevermoreEngine/commit/05ba29a03efc9f3feed74b34f1d9dfb237496214))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [8.17.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/animations@8.17.2...@quenty/animations@8.17.3) (2025-04-10)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/animations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/animations",
3
- "version": "8.17.3",
3
+ "version": "8.17.4-canary.11a5dcf.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": "^10.8.3",
29
- "@quenty/enumutils": "^3.4.2",
30
- "@quenty/humanoidanimatorutils": "^3.1.2",
31
- "@quenty/loader": "^10.8.3",
32
- "@quenty/maid": "^3.4.3",
33
- "@quenty/promise": "^10.10.4",
34
- "@quenty/promisemaid": "^5.10.4",
35
- "@quenty/rbxasset": "^5.8.3",
36
- "@quenty/rx": "^13.17.3",
37
- "@quenty/signal": "^7.10.3",
38
- "@quenty/valueobject": "^13.17.3"
28
+ "@quenty/baseobject": "10.8.4-canary.11a5dcf.0",
29
+ "@quenty/enumutils": "3.4.2",
30
+ "@quenty/humanoidanimatorutils": "3.1.3-canary.11a5dcf.0",
31
+ "@quenty/loader": "10.8.4-canary.11a5dcf.0",
32
+ "@quenty/maid": "3.4.4-canary.11a5dcf.0",
33
+ "@quenty/promise": "10.10.5-canary.11a5dcf.0",
34
+ "@quenty/promisemaid": "5.10.5-canary.11a5dcf.0",
35
+ "@quenty/rbxasset": "5.8.4-canary.11a5dcf.0",
36
+ "@quenty/rx": "13.17.4-canary.11a5dcf.0",
37
+ "@quenty/signal": "7.10.4-canary.11a5dcf.0",
38
+ "@quenty/valueobject": "13.17.4-canary.11a5dcf.0"
39
39
  },
40
40
  "publishConfig": {
41
41
  "access": "public"
42
42
  },
43
- "gitHead": "b06c070ae91d5dab7bd8de6e290ad2caabb15d8f"
43
+ "gitHead": "11a5dcf7d4c7a0bfbf3337e97d30e8346ea09d3f"
44
44
  }
@@ -100,7 +100,10 @@ end
100
100
  @param keyframeName string
101
101
  @return Promise
102
102
  ]=]
103
- function AnimationPromiseUtils.promiseKeyframeReached(animationTrack: AnimationTrack, keyframeName: string): Promise.Promise<()>
103
+ function AnimationPromiseUtils.promiseKeyframeReached(
104
+ animationTrack: AnimationTrack,
105
+ keyframeName: string
106
+ ): Promise.Promise<()>
104
107
  assert(typeof(animationTrack) == "Instance", "Bad animationTrack")
105
108
  assert(type(keyframeName) == "string", "Bad endMarkerName")
106
109
 
@@ -127,5 +130,4 @@ function AnimationPromiseUtils.promiseKeyframeReached(animationTrack: AnimationT
127
130
  return promise
128
131
  end
129
132
 
130
-
131
- return AnimationPromiseUtils
133
+ return AnimationPromiseUtils
@@ -108,7 +108,6 @@ function AnimationSlotPlayer.AdjustSpeed(self: AnimationSlotPlayer, id: string |
108
108
 
109
109
  local topMaid = Maid.new()
110
110
 
111
- -- stylua: ignore
112
111
  topMaid:GiveTask(self._currentAnimationTrackData
113
112
  :ObserveBrio(function(data: AnimationData)
114
113
  return data and data.animationId == animationId
@@ -159,7 +158,6 @@ function AnimationSlotPlayer.AdjustWeight(self: AnimationSlotPlayer, id: string,
159
158
 
160
159
  local topMaid = Maid.new()
161
160
 
162
- -- stylua: ignore
163
161
  topMaid:GiveTask(self._currentAnimationTrackData
164
162
  :ObserveBrio(function(data)
165
163
  return data and data.animationId == animationId
@@ -272,4 +270,4 @@ function AnimationSlotPlayer.Stop(self: AnimationSlotPlayer)
272
270
  self._maid._current = nil
273
271
  end
274
272
 
275
- return AnimationSlotPlayer
273
+ return AnimationSlotPlayer
@@ -7,11 +7,11 @@
7
7
 
8
8
  local require = require(script.Parent.loader).load(script)
9
9
 
10
+ local AnimationUtils = require("AnimationUtils")
10
11
  local BaseObject = require("BaseObject")
11
- local ValueObject = require("ValueObject")
12
12
  local Rx = require("Rx")
13
- local AnimationUtils = require("AnimationUtils")
14
13
  local Signal = require("Signal")
14
+ local ValueObject = require("ValueObject")
15
15
 
16
16
  local AnimationTrackPlayer = setmetatable({}, BaseObject)
17
17
  AnimationTrackPlayer.ClassName = "AnimationTrackPlayer"
@@ -215,16 +215,18 @@ function AnimationTrackPlayer:IsPlaying(): boolean
215
215
  end
216
216
 
217
217
  function AnimationTrackPlayer:_onEachTrack(callback)
218
- return self._currentTrack:ObserveBrio(function(track)
219
- return track ~= nil
220
- end):Subscribe(function(brio)
221
- if brio:IsDead() then
222
- return
223
- end
218
+ return self._currentTrack
219
+ :ObserveBrio(function(track)
220
+ return track ~= nil
221
+ end)
222
+ :Subscribe(function(brio)
223
+ if brio:IsDead() then
224
+ return
225
+ end
224
226
 
225
- local track = brio:GetValue()
226
- callback(brio:ToMaid(), track)
227
- end)
227
+ local track = brio:GetValue()
228
+ callback(brio:ToMaid(), track)
229
+ end)
228
230
  end
229
231
 
230
- return AnimationTrackPlayer
232
+ return AnimationTrackPlayer
@@ -5,9 +5,9 @@
5
5
 
6
6
  local require = require(script.Parent.loader).load(script)
7
7
 
8
- local RbxAssetUtils = require("RbxAssetUtils")
9
- local HumanoidAnimatorUtils = require("HumanoidAnimatorUtils")
10
8
  local EnumUtils = require("EnumUtils")
9
+ local HumanoidAnimatorUtils = require("HumanoidAnimatorUtils")
10
+ local RbxAssetUtils = require("RbxAssetUtils")
11
11
 
12
12
  local AnimationUtils = {}
13
13
 
@@ -173,7 +173,9 @@ end
173
173
  --[=[
174
174
  Finds an animator for the current instance
175
175
  ]=]
176
- function AnimationUtils.getOrCreateAnimator(target: Animator | Player | Model | AnimationController): Animator?
176
+ function AnimationUtils.getOrCreateAnimator(
177
+ target: Animator | Player | Model | Humanoid | AnimationController
178
+ ): Animator?
177
179
  assert(typeof(target) == "Instance", "Bad target")
178
180
 
179
181
  if target:IsA("Animator") then
@@ -1,3 +1,4 @@
1
+ --!strict
1
2
  --[=[
2
3
  Helps to run animations in hoarcekat or in Studio when the game isn't running.
3
4
 
@@ -12,13 +13,22 @@ local require = require(script.Parent.loader).load(script)
12
13
 
13
14
  local RunService = game:GetService("RunService")
14
15
 
15
- local BaseObject = require("BaseObject")
16
16
  local AnimationUtils = require("AnimationUtils")
17
+ local BaseObject = require("BaseObject")
17
18
 
18
19
  local StudioRigAnimator = setmetatable({}, BaseObject)
19
20
  StudioRigAnimator.ClassName = "StudioRigAnimator"
20
21
  StudioRigAnimator.__index = StudioRigAnimator
21
22
 
23
+ export type StudioRigAnimator = typeof(setmetatable(
24
+ {} :: {
25
+ _animator: Animator?,
26
+ _obj: Animator | Humanoid,
27
+ _lastTime: number,
28
+ },
29
+ {} :: typeof({ __index = StudioRigAnimator })
30
+ )) & BaseObject.BaseObject
31
+
22
32
  --[=[
23
33
  Constructs a new rig animator which will play the animations for the lifetime of the
24
34
  object.
@@ -26,8 +36,10 @@ StudioRigAnimator.__index = StudioRigAnimator
26
36
  @param animatorOrHumanoid Animator | Humanoid
27
37
  @return StudioRigAnimator
28
38
  ]=]
29
- function StudioRigAnimator.new(animatorOrHumanoid: Animator | Humanoid)
30
- local self = setmetatable(BaseObject.new(animatorOrHumanoid), StudioRigAnimator)
39
+ function StudioRigAnimator.new(animatorOrHumanoid: Animator | Humanoid): StudioRigAnimator
40
+ local self: StudioRigAnimator = setmetatable(BaseObject.new(animatorOrHumanoid) :: any, StudioRigAnimator)
41
+
42
+ self._lastTime = 0
31
43
 
32
44
  if RunService:IsStudio() and not RunService:IsRunning() then
33
45
  self:_setupStudio()
@@ -36,7 +48,7 @@ function StudioRigAnimator.new(animatorOrHumanoid: Animator | Humanoid)
36
48
  return self
37
49
  end
38
50
 
39
- function StudioRigAnimator:_setupStudio()
51
+ function StudioRigAnimator._setupStudio(self: StudioRigAnimator): ()
40
52
  self._animator = AnimationUtils.getOrCreateAnimator(self._obj)
41
53
  if not self._animator then
42
54
  return