@quenty/steputils 3.5.1 → 3.5.2
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 +2 -2
- package/src/Shared/StepUtils.lua +23 -9
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](https://github.com/Quenty/NevermoreEngine/compare/@quenty/steputils@3.5.1...@quenty/steputils@3.5.2) (2024-10-09)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Deprecate a large set of APIs ([#506](https://github.com/Quenty/NevermoreEngine/issues/506)) ([d6bdd65](https://github.com/Quenty/NevermoreEngine/commit/d6bdd6567668f238c45d3bd0c85bedb763d30e5c))
|
|
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.
|
|
3
|
+
"version": "3.5.2",
|
|
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": "
|
|
30
|
+
"gitHead": "b23f80e41579da8313b95ba0a5ebf5295e062b4b"
|
|
31
31
|
}
|
package/src/Shared/StepUtils.lua
CHANGED
|
@@ -43,13 +43,9 @@ end
|
|
|
43
43
|
Yields until the frame deferral is done
|
|
44
44
|
]=]
|
|
45
45
|
function StepUtils.deferWait()
|
|
46
|
-
local
|
|
47
|
-
task.defer(
|
|
48
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|