@quenty/blend 3.2.0 → 3.2.1-canary.261.5628274.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.2.1-canary.261.5628274.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@3.2.0...@quenty/blend@3.2.1-canary.261.5628274.0) (2022-05-21)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add new API to SpringObject ([7f8a41d](https://github.com/Quenty/NevermoreEngine/commit/7f8a41da6c9d07269e044bcd45493d1e14c565be))
12
+
13
+
14
+
15
+
16
+
6
17
  # [3.2.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/blend@3.1.0...@quenty/blend@3.2.0) (2022-03-27)
7
18
 
8
19
  **Note:** Version bump only for package @quenty/blend
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quenty/blend",
3
- "version": "3.2.0",
3
+ "version": "3.2.1-canary.261.5628274.0",
4
4
  "description": "Declarative UI system.",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -27,23 +27,23 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
- "@quenty/acceltween": "^2.2.0",
31
- "@quenty/brio": "^5.2.0",
32
- "@quenty/instanceutils": "^4.2.0",
33
- "@quenty/loader": "^4.1.0",
34
- "@quenty/maid": "^2.3.0",
35
- "@quenty/promise": "^4.2.0",
36
- "@quenty/rx": "^4.2.0",
37
- "@quenty/signal": "^2.2.0",
38
- "@quenty/spring": "^4.1.0",
39
- "@quenty/steputils": "^3.1.0",
40
- "@quenty/string": "^2.3.0",
41
- "@quenty/valuebaseutils": "^4.2.0",
42
- "@quenty/valueobject": "^4.2.0"
30
+ "@quenty/acceltween": "2.2.0",
31
+ "@quenty/brio": "5.2.1-canary.261.5628274.0",
32
+ "@quenty/instanceutils": "4.2.1-canary.261.5628274.0",
33
+ "@quenty/loader": "4.1.1-canary.261.5628274.0",
34
+ "@quenty/maid": "2.3.0",
35
+ "@quenty/promise": "4.2.1-canary.261.5628274.0",
36
+ "@quenty/rx": "4.2.1-canary.261.5628274.0",
37
+ "@quenty/signal": "2.2.0",
38
+ "@quenty/spring": "4.1.1-canary.261.5628274.0",
39
+ "@quenty/steputils": "3.1.0",
40
+ "@quenty/string": "2.3.0",
41
+ "@quenty/valuebaseutils": "4.2.1-canary.261.5628274.0",
42
+ "@quenty/valueobject": "4.2.1-canary.261.5628274.0"
43
43
  },
44
44
  "devDependencies": {
45
- "@quenty/contentproviderutils": "^4.2.0",
46
- "@quenty/playerthumbnailutils": "^4.2.0"
45
+ "@quenty/contentproviderutils": "4.2.1-canary.261.5628274.0",
46
+ "@quenty/playerthumbnailutils": "4.2.1-canary.261.5628274.0"
47
47
  },
48
- "gitHead": "501844bd6c3d3f765fd3032b997d8030bc963a1f"
48
+ "gitHead": "5628274461f4fa0135e63b62e99fcd508d4c94f9"
49
49
  }
@@ -73,6 +73,32 @@ function SpringObject:ObserveRenderStepped()
73
73
  return self:ObserveOnSignal(RunService.RenderStepped)
74
74
  end
75
75
 
76
+ function SpringObject:ObserveVelocityOnRenderStepped()
77
+ return self:ObserveVelocityOnSignal(RunService.RenderStepped)
78
+ end
79
+
80
+ function SpringObject:ObserveVelocityOnSignal(signal)
81
+ return Observable.new(function(sub)
82
+ local maid = Maid.new()
83
+
84
+ local startAnimate, stopAnimate = StepUtils.bindToSignal(signal, function()
85
+ local animating = SpringUtils.animating(self._currentSpring)
86
+ if animating then
87
+ sub:Fire(SpringUtils.fromLinearIfNeeded(self._currentSpring.Velocity))
88
+ else
89
+ sub:Fire(SpringUtils.fromLinearIfNeeded(0*self._currentSpring.Velocity))
90
+ end
91
+ return animating
92
+ end)
93
+
94
+ maid:GiveTask(stopAnimate)
95
+ maid:GiveTask(self.Changed:Connect(startAnimate))
96
+ startAnimate()
97
+
98
+ return maid
99
+ end)
100
+ end
101
+
76
102
  --[=[
77
103
  Observes the spring animating
78
104
  @param signal RBXScriptSignal