@quenty/numbersequenceutils 8.9.1 → 8.9.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 +4 -4
- package/src/Shared/NumberSequenceUtils.lua +6 -6
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
|
+
## [8.9.2](https://github.com/Quenty/NevermoreEngine/compare/@quenty/numbersequenceutils@8.9.1...@quenty/numbersequenceutils@8.9.2) (2025-04-05)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* Add types to packages ([2374fb2](https://github.com/Quenty/NevermoreEngine/commit/2374fb2b043cfbe0e9b507b3316eec46a4e353a0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [8.9.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/numbersequenceutils@8.9.0...@quenty/numbersequenceutils@8.9.1) (2025-03-21)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @quenty/numbersequenceutils
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quenty/numbersequenceutils",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.2",
|
|
4
4
|
"description": "Utility functions involving NumberSequences on Roblox",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Roblox",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@quenty/loader": "^10.8.
|
|
32
|
-
"@quenty/math": "^2.7.
|
|
31
|
+
"@quenty/loader": "^10.8.1",
|
|
32
|
+
"@quenty/math": "^2.7.2"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "78c3ac0ab08dd18085b6e6e6e4f745e76ed99f68"
|
|
35
35
|
}
|
|
@@ -101,7 +101,7 @@ function NumberSequenceUtils.forEachValue(sequence: NumberSequence, callback: (n
|
|
|
101
101
|
local waypoints = {}
|
|
102
102
|
|
|
103
103
|
local keypoints = sequence.Keypoints
|
|
104
|
-
for _, keypoint in
|
|
104
|
+
for _, keypoint in keypoints do
|
|
105
105
|
table.insert(waypoints, NumberSequenceKeypoint.new(keypoint.Time, callback(keypoint.Value), keypoint.Envelope))
|
|
106
106
|
end
|
|
107
107
|
|
|
@@ -118,7 +118,7 @@ function NumberSequenceUtils.scale(sequence: NumberSequence, scale: number): Num
|
|
|
118
118
|
local waypoints = {}
|
|
119
119
|
|
|
120
120
|
local keypoints = sequence.Keypoints
|
|
121
|
-
for _, keypoint in
|
|
121
|
+
for _, keypoint in keypoints do
|
|
122
122
|
table.insert(
|
|
123
123
|
waypoints,
|
|
124
124
|
NumberSequenceKeypoint.new(keypoint.Time, keypoint.Value * scale, keypoint.Envelope * scale)
|
|
@@ -139,7 +139,7 @@ function NumberSequenceUtils.scaleTransparency(sequence: NumberSequence, scale:
|
|
|
139
139
|
local waypoints = {}
|
|
140
140
|
|
|
141
141
|
local keypoints = sequence.Keypoints
|
|
142
|
-
for _, keypoint in
|
|
142
|
+
for _, keypoint in keypoints do
|
|
143
143
|
table.insert(
|
|
144
144
|
waypoints,
|
|
145
145
|
NumberSequenceKeypoint.new(
|
|
@@ -185,7 +185,7 @@ function NumberSequenceUtils.stripe(
|
|
|
185
185
|
timeOffset = timeOffset % timeWidth
|
|
186
186
|
|
|
187
187
|
-- Generate initialial points
|
|
188
|
-
local waypoints = {}
|
|
188
|
+
local waypoints: { NumberSequenceKeypoint } = {}
|
|
189
189
|
for i = 0, stripes - 1 do
|
|
190
190
|
local timestampStart = (i / stripes + timeOffset) % 1
|
|
191
191
|
local timeStampMiddle = (timestampStart + timeWidth * (1 - percentStripeThickness)) % 1
|
|
@@ -198,7 +198,7 @@ function NumberSequenceUtils.stripe(
|
|
|
198
198
|
return a.Time < b.Time
|
|
199
199
|
end)
|
|
200
200
|
|
|
201
|
-
local fullWaypoints = {}
|
|
201
|
+
local fullWaypoints: { NumberSequenceKeypoint } = {}
|
|
202
202
|
|
|
203
203
|
-- Handle first!
|
|
204
204
|
table.insert(fullWaypoints, waypoints[1])
|
|
@@ -217,7 +217,7 @@ function NumberSequenceUtils.stripe(
|
|
|
217
217
|
-- Add beginning
|
|
218
218
|
local first = fullWaypoints[1]
|
|
219
219
|
if first.Time >= EPSILON then
|
|
220
|
-
local transparency
|
|
220
|
+
local transparency: number
|
|
221
221
|
if first.Value == backgroundTransparency then
|
|
222
222
|
transparency = stripeTransparency
|
|
223
223
|
elseif first.Value == stripeTransparency then
|