@quenty/blend 12.3.0 → 12.3.1-canary.478.2801f00.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 +18 -18
- package/src/Shared/Blend/Blend.lua +5 -43
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
|
+
## [12.3.1-canary.478.2801f00.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@12.3.0...@quenty/blend@12.3.1-canary.478.2801f00.0) (2024-08-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* Update Blend.Spring to use SpringObject underneath ([b5d41f5](https://github.com/Quenty/NevermoreEngine/commit/b5d41f5b6955fc77bd37d9ec97b9704410c7c3f5))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
# [12.3.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@12.2.0...@quenty/blend@12.3.0) (2024-05-09)
|
|
7
18
|
|
|
8
19
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/blend",
|
|
3
|
-
"version": "12.3.0",
|
|
3
|
+
"version": "12.3.1-canary.478.2801f00.0",
|
|
4
4
|
"description": "Declarative UI system.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -27,24 +27,24 @@
|
|
|
27
27
|
"access": "public"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@quenty/acceltween": "
|
|
31
|
-
"@quenty/brio": "
|
|
32
|
-
"@quenty/ducktype": "
|
|
33
|
-
"@quenty/instanceutils": "
|
|
34
|
-
"@quenty/loader": "
|
|
35
|
-
"@quenty/maid": "
|
|
36
|
-
"@quenty/promise": "
|
|
37
|
-
"@quenty/rx": "
|
|
38
|
-
"@quenty/signal": "
|
|
39
|
-
"@quenty/spring": "
|
|
40
|
-
"@quenty/steputils": "
|
|
41
|
-
"@quenty/string": "
|
|
42
|
-
"@quenty/valuebaseutils": "
|
|
43
|
-
"@quenty/valueobject": "
|
|
30
|
+
"@quenty/acceltween": "2.4.1-canary.478.2801f00.0",
|
|
31
|
+
"@quenty/brio": "14.3.1-canary.478.2801f00.0",
|
|
32
|
+
"@quenty/ducktype": "5.3.1-canary.478.2801f00.0",
|
|
33
|
+
"@quenty/instanceutils": "13.3.1-canary.478.2801f00.0",
|
|
34
|
+
"@quenty/loader": "10.3.1-canary.478.2801f00.0",
|
|
35
|
+
"@quenty/maid": "3.2.0",
|
|
36
|
+
"@quenty/promise": "10.3.1-canary.478.2801f00.0",
|
|
37
|
+
"@quenty/rx": "13.3.1-canary.478.2801f00.0",
|
|
38
|
+
"@quenty/signal": "7.3.1-canary.478.2801f00.0",
|
|
39
|
+
"@quenty/spring": "10.3.1-canary.478.2801f00.0",
|
|
40
|
+
"@quenty/steputils": "3.4.0",
|
|
41
|
+
"@quenty/string": "3.2.0",
|
|
42
|
+
"@quenty/valuebaseutils": "13.3.1-canary.478.2801f00.0",
|
|
43
|
+
"@quenty/valueobject": "13.3.1-canary.478.2801f00.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@quenty/contentproviderutils": "
|
|
47
|
-
"@quenty/playerthumbnailutils": "
|
|
46
|
+
"@quenty/contentproviderutils": "12.3.1-canary.478.2801f00.0",
|
|
47
|
+
"@quenty/playerthumbnailutils": "10.3.1-canary.478.2801f00.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "2801f00e2650bc489a90fedd4613c5ccc9d6f449"
|
|
50
50
|
}
|
|
@@ -17,13 +17,12 @@ local BrioUtils = require("BrioUtils")
|
|
|
17
17
|
local RxInstanceUtils = require("RxInstanceUtils")
|
|
18
18
|
local RxValueBaseUtils = require("RxValueBaseUtils")
|
|
19
19
|
local Signal = require("Signal")
|
|
20
|
-
local Spring = require("Spring")
|
|
21
|
-
local SpringUtils = require("SpringUtils")
|
|
22
20
|
local StepUtils = require("StepUtils")
|
|
23
21
|
local ValueBaseUtils = require("ValueBaseUtils")
|
|
24
22
|
local ValueObject = require("ValueObject")
|
|
25
23
|
local ValueObjectUtils = require("ValueObjectUtils")
|
|
26
24
|
local RxBrioUtils = require("RxBrioUtils")
|
|
25
|
+
local SpringObject
|
|
27
26
|
|
|
28
27
|
local Blend = {}
|
|
29
28
|
|
|
@@ -410,53 +409,16 @@ end
|
|
|
410
409
|
@return Observable?
|
|
411
410
|
]=]
|
|
412
411
|
function Blend.Spring(source, speed, damper)
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
local damperObservable = Blend.toNumberObservable(damper)
|
|
416
|
-
|
|
417
|
-
local function createSpring(maid, initialValue)
|
|
418
|
-
local spring = Spring.new(initialValue)
|
|
419
|
-
|
|
420
|
-
if speedObservable then
|
|
421
|
-
maid:GiveTask(speedObservable:Subscribe(function(value)
|
|
422
|
-
assert(type(value) == "number", "Bad value")
|
|
423
|
-
spring.Speed = value
|
|
424
|
-
end))
|
|
425
|
-
end
|
|
426
|
-
|
|
427
|
-
if damperObservable then
|
|
428
|
-
maid:GiveTask(damperObservable:Subscribe(function(value)
|
|
429
|
-
assert(type(value) == "number", "Bad value")
|
|
430
|
-
|
|
431
|
-
spring.Damper = value
|
|
432
|
-
end))
|
|
433
|
-
end
|
|
434
|
-
|
|
435
|
-
return spring
|
|
412
|
+
if not SpringObject then
|
|
413
|
+
SpringObject = require("SpringObject")
|
|
436
414
|
end
|
|
437
415
|
|
|
438
|
-
-- TODO: Centralize and cache
|
|
439
416
|
return Observable.new(function(sub)
|
|
440
|
-
local spring
|
|
441
417
|
local maid = Maid.new()
|
|
442
418
|
|
|
443
|
-
local
|
|
444
|
-
local animating, position = SpringUtils.animating(spring)
|
|
445
|
-
sub:Fire(SpringUtils.fromLinearIfNeeded(position))
|
|
446
|
-
return animating
|
|
447
|
-
end)
|
|
419
|
+
local spring = maid:Add(SpringObject.new(source, speed, damper))
|
|
448
420
|
|
|
449
|
-
maid:GiveTask(
|
|
450
|
-
maid:GiveTask(sourceObservable:Subscribe(function(value)
|
|
451
|
-
if value then
|
|
452
|
-
local linearValue = SpringUtils.toLinearIfNeeded(value)
|
|
453
|
-
spring = spring or createSpring(maid, linearValue)
|
|
454
|
-
spring.t = SpringUtils.toLinearIfNeeded(value)
|
|
455
|
-
startAnimate()
|
|
456
|
-
else
|
|
457
|
-
warn("Got nil value from emitted source")
|
|
458
|
-
end
|
|
459
|
-
end))
|
|
421
|
+
maid:GiveTask(spring:Observe():Subscribe(sub:GetFireFailComplete()))
|
|
460
422
|
|
|
461
423
|
return maid
|
|
462
424
|
end)
|