@quenty/timedtween 7.18.3 → 7.18.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 +11 -0
- package/package.json +12 -12
- package/src/Shared/TimedTween.lua +11 -12
- package/src/Shared/TimedTween.story.lua +9 -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
|
+
## [7.18.4-canary.11a5dcf.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/timedtween@7.18.3...@quenty/timedtween@7.18.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
|
## [7.18.3](https://github.com/Quenty/NevermoreEngine/compare/@quenty/timedtween@7.18.2...@quenty/timedtween@7.18.3) (2025-04-10)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/timedtween
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/timedtween",
|
|
3
|
-
"version": "7.18.
|
|
3
|
+
"version": "7.18.4-canary.11a5dcf.0",
|
|
4
4
|
"description": "Linear timed tweening model",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
"Quenty"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@quenty/basicpane": "
|
|
29
|
-
"@quenty/blend": "
|
|
30
|
-
"@quenty/loader": "
|
|
31
|
-
"@quenty/maid": "
|
|
32
|
-
"@quenty/math": "
|
|
33
|
-
"@quenty/promise": "
|
|
34
|
-
"@quenty/promisemaid": "
|
|
35
|
-
"@quenty/rx": "
|
|
36
|
-
"@quenty/steputils": "
|
|
37
|
-
"@quenty/valueobject": "
|
|
28
|
+
"@quenty/basicpane": "13.17.4-canary.11a5dcf.0",
|
|
29
|
+
"@quenty/blend": "12.18.4-canary.11a5dcf.0",
|
|
30
|
+
"@quenty/loader": "10.8.4-canary.11a5dcf.0",
|
|
31
|
+
"@quenty/maid": "3.4.4-canary.11a5dcf.0",
|
|
32
|
+
"@quenty/math": "2.7.3",
|
|
33
|
+
"@quenty/promise": "10.10.5-canary.11a5dcf.0",
|
|
34
|
+
"@quenty/promisemaid": "5.10.5-canary.11a5dcf.0",
|
|
35
|
+
"@quenty/rx": "13.17.4-canary.11a5dcf.0",
|
|
36
|
+
"@quenty/steputils": "3.5.6-canary.11a5dcf.0",
|
|
37
|
+
"@quenty/valueobject": "13.17.4-canary.11a5dcf.0"
|
|
38
38
|
},
|
|
39
39
|
"publishConfig": {
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "11a5dcf7d4c7a0bfbf3337e97d30e8346ea09d3f"
|
|
43
43
|
}
|
|
@@ -10,13 +10,13 @@ local require = require(script.Parent.loader).load(script)
|
|
|
10
10
|
local RunService = game:GetService("RunService")
|
|
11
11
|
|
|
12
12
|
local BasicPane = require("BasicPane")
|
|
13
|
-
local
|
|
13
|
+
local Maid = require("Maid")
|
|
14
14
|
local Math = require("Math")
|
|
15
|
-
local StepUtils = require("StepUtils")
|
|
16
15
|
local Observable = require("Observable")
|
|
17
|
-
local Maid = require("Maid")
|
|
18
16
|
local Promise = require("Promise")
|
|
19
|
-
local
|
|
17
|
+
local Signal = require("Signal")
|
|
18
|
+
local StepUtils = require("StepUtils")
|
|
19
|
+
local ValueObject = require("ValueObject")
|
|
20
20
|
|
|
21
21
|
local TimedTween = setmetatable({}, BasicPane)
|
|
22
22
|
TimedTween.ClassName = "TimedTween"
|
|
@@ -43,7 +43,7 @@ export type TimedTween = typeof(setmetatable(
|
|
|
43
43
|
-- From BasicPane
|
|
44
44
|
IsVisible: (self: TimedTween) -> boolean,
|
|
45
45
|
SetVisible: (self: TimedTween, isVisible: boolean, doNotAnimate: boolean?) -> (),
|
|
46
|
-
VisibleChanged:
|
|
46
|
+
VisibleChanged: Signal.Signal<boolean, boolean>,
|
|
47
47
|
Destroy: (self: TimedTween) -> (),
|
|
48
48
|
},
|
|
49
49
|
{} :: typeof({ __index = TimedTween })
|
|
@@ -228,21 +228,20 @@ function TimedTween._computeState(self: TimedTween, now: number): ComputedState
|
|
|
228
228
|
p = Math.map(math.clamp(now, state.t0, state.t1), state.t0, state.t1, state.p0, state.p1)
|
|
229
229
|
end
|
|
230
230
|
|
|
231
|
-
local rtime = math.abs(state.p1 - p)*duration
|
|
231
|
+
local rtime = math.abs(state.p1 - p) * duration
|
|
232
232
|
|
|
233
233
|
local v
|
|
234
234
|
if rtime > 0 and duration > 0 then
|
|
235
|
-
v = (state.p1 - state.p0)/duration
|
|
235
|
+
v = (state.p1 - state.p0) / duration
|
|
236
236
|
else
|
|
237
237
|
v = 0
|
|
238
238
|
end
|
|
239
239
|
|
|
240
240
|
return {
|
|
241
|
-
p = p
|
|
242
|
-
v = v
|
|
243
|
-
rtime = rtime
|
|
241
|
+
p = p,
|
|
242
|
+
v = v,
|
|
243
|
+
rtime = rtime,
|
|
244
244
|
}
|
|
245
245
|
end
|
|
246
246
|
|
|
247
|
-
|
|
248
|
-
return TimedTween
|
|
247
|
+
return TimedTween
|
|
@@ -2,11 +2,12 @@
|
|
|
2
2
|
@class TimedTween.story
|
|
3
3
|
]]
|
|
4
4
|
|
|
5
|
-
local require =
|
|
5
|
+
local require =
|
|
6
|
+
require(game:GetService("ServerScriptService"):FindFirstChild("LoaderUtils", true).Parent).bootstrapStory(script)
|
|
6
7
|
|
|
8
|
+
local Blend = require("Blend")
|
|
7
9
|
local Maid = require("Maid")
|
|
8
10
|
local TimedTween = require("TimedTween")
|
|
9
|
-
local Blend = require("Blend")
|
|
10
11
|
|
|
11
12
|
return function(target)
|
|
12
13
|
local maid = Maid.new()
|
|
@@ -14,21 +15,20 @@ return function(target)
|
|
|
14
15
|
local timedTween = TimedTween.new(0.3)
|
|
15
16
|
maid:GiveTask(timedTween)
|
|
16
17
|
|
|
17
|
-
|
|
18
18
|
maid:GiveTask(Blend.mount(target, {
|
|
19
19
|
Blend.New "TextButton" {
|
|
20
|
-
Size = UDim2.fromScale(1, 1)
|
|
20
|
+
Size = UDim2.fromScale(1, 1),
|
|
21
21
|
BackgroundTransparency = Blend.Computed(timedTween:Observe(), function(position)
|
|
22
22
|
return 1 - position
|
|
23
|
-
end)
|
|
23
|
+
end),
|
|
24
24
|
|
|
25
25
|
[Blend.OnEvent "Activated"] = function()
|
|
26
26
|
timedTween:Toggle()
|
|
27
|
-
end
|
|
28
|
-
}
|
|
29
|
-
}))
|
|
27
|
+
end,
|
|
28
|
+
},
|
|
29
|
+
}))
|
|
30
30
|
|
|
31
31
|
return function()
|
|
32
32
|
maid:DoCleaning()
|
|
33
33
|
end
|
|
34
|
-
end
|
|
34
|
+
end
|