@quenty/steputils 3.5.1 → 3.5.2-canary.506.9cbf2c1.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
+ ## [3.5.2-canary.506.9cbf2c1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/steputils@3.5.1...@quenty/steputils@3.5.2-canary.506.9cbf2c1.0) (2024-10-08)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * Deprecate a large set of APIs ([9cbf2c1](https://github.com/Quenty/NevermoreEngine/commit/9cbf2c15d68e45eecbfbfa9f359c1a19cfa4fd5e))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [3.5.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/steputils@3.5.0...@quenty/steputils@3.5.1) (2024-10-04)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/steputils
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/steputils",
3
- "version": "3.5.1",
3
+ "version": "3.5.2-canary.506.9cbf2c1.0",
4
4
  "description": "Binds animations into step, where the animation only runs as needed",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,5 +27,5 @@
27
27
  "publishConfig": {
28
28
  "access": "public"
29
29
  },
30
- "gitHead": "539802fea720a92f81ad48d6d5579605d8844d0a"
30
+ "gitHead": "9cbf2c15d68e45eecbfbfa9f359c1a19cfa4fd5e"
31
31
  }
@@ -43,13 +43,9 @@ end
43
43
  Yields until the frame deferral is done
44
44
  ]=]
45
45
  function StepUtils.deferWait()
46
- local signal = Instance.new("BindableEvent")
47
- task.defer(function()
48
- signal:Fire()
49
- signal:Destroy()
50
- end)
51
-
52
- signal.Event:Wait()
46
+ local current = coroutine.running()
47
+ task.defer(task.spawn, current)
48
+ coroutine.yield()
53
49
  end
54
50
 
55
51
  --[=[
@@ -158,26 +154,44 @@ end
158
154
  part.CFrame = CFrame.new(0, 0, )
159
155
  end))
160
156
  ```
157
+
158
+ :::tip
159
+ use `RunService.Stepped:Once()` instead
160
+ :::
161
+
162
+ @deprecated 3.5.2
161
163
  @param func function -- Function to call
162
164
  @return function -- Call this function to cancel call
163
165
  ]=]
164
166
  function StepUtils.onceAtStepped(func)
165
- return StepUtils.onceAtEvent(RunService.Stepped, func)
167
+ local conn = RunService.Stepped:Once(func)
168
+ return function()
169
+ conn:Disconnect()
170
+ end
166
171
  end
167
172
 
168
173
  --[=[
169
174
  Invokes the function once at renderstepped, unless the cancel callback is called.
170
175
 
176
+ :::tip
177
+ use `RunService.RenderStepped:Once()` instead
178
+ :::
179
+
180
+ @deprecated 3.5.2
171
181
  @param func function -- Function to call
172
182
  @return function -- Call this function to cancel call
173
183
  ]=]
174
184
  function StepUtils.onceAtRenderStepped(func)
175
- return StepUtils.onceAtEvent(RunService.RenderStepped, func)
185
+ local conn = RunService.RenderStepped:Once(func)
186
+ return function()
187
+ conn:Disconnect()
188
+ end
176
189
  end
177
190
 
178
191
  --[=[
179
192
  Invokes the function once at the given event, unless the cancel callback is called.
180
193
 
194
+ @deprecated 3.5.2
181
195
  @param event Signal | RBXScriptSignal
182
196
  @param func function -- Function to call
183
197
  @return function -- Call this function to cancel call