@quenty/steputils 3.1.0 → 3.1.1-canary.293.c1c91bd.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/LICENSE.md +1 -1
- package/package.json +2 -2
- package/src/Shared/StepUtils.lua +17 -1
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.1.1-canary.293.c1c91bd.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/steputils@3.1.0...@quenty/steputils@3.1.1-canary.293.c1c91bd.0) (2022-10-11)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Add StepUtils.bindToStepped ([f49f70d](https://github.com/Quenty/NevermoreEngine/commit/f49f70d870fa9fd8276a9cb0056a40ebeb85c049))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [3.1.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/steputils@3.0.1...@quenty/steputils@3.1.0) (2022-03-27)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/steputils
|
package/LICENSE.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/steputils",
|
|
3
|
-
"version": "3.1.0",
|
|
3
|
+
"version": "3.1.1-canary.293.c1c91bd.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": "
|
|
30
|
+
"gitHead": "c1c91bd797aeee5cd167d614890f0999809a9a93"
|
|
31
31
|
}
|
package/src/Shared/StepUtils.lua
CHANGED
|
@@ -9,7 +9,7 @@ local RunService = game:GetService("RunService")
|
|
|
9
9
|
local StepUtils = {}
|
|
10
10
|
|
|
11
11
|
--[=[
|
|
12
|
-
Binds the given update function to
|
|
12
|
+
Binds the given update function to [RunService.RenderStepped].
|
|
13
13
|
|
|
14
14
|
```lua
|
|
15
15
|
local spring = Spring.new(0)
|
|
@@ -39,6 +39,22 @@ function StepUtils.bindToRenderStep(update)
|
|
|
39
39
|
return StepUtils.bindToSignal(RunService.RenderStepped, update)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
--[=[
|
|
43
|
+
Binds the given update function to [RunService.Stepped]. See [StepUtils.bindToRenderStep] for details.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
:::tip
|
|
47
|
+
Be sure to call the disconnect function when cleaning up, otherwise you may memory leak.
|
|
48
|
+
:::
|
|
49
|
+
|
|
50
|
+
@param update () -> boolean -- should return true while it needs to update
|
|
51
|
+
@return (...) -> () -- Connect function
|
|
52
|
+
@return () -> () -- Disconnect function
|
|
53
|
+
]=]
|
|
54
|
+
function StepUtils.bindToStepped(update)
|
|
55
|
+
return StepUtils.bindToSignal(RunService.Stepped, update)
|
|
56
|
+
end
|
|
57
|
+
|
|
42
58
|
--[=[
|
|
43
59
|
Binds an update event to a signal until the update function stops returning a truthy
|
|
44
60
|
value.
|