@quenty/numbersequenceutils 8.7.1 → 8.8.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
+ # [8.8.0](https://github.com/Quenty/NevermoreEngine/compare/@quenty/numbersequenceutils@8.7.1...@quenty/numbersequenceutils@8.8.0) (2025-01-08)
7
+
8
+
9
+ ### Features
10
+
11
+ * Add NumberSequenceUtils.scaleTransparency(sequence, scale) ([6659d0b](https://github.com/Quenty/NevermoreEngine/commit/6659d0bb8210616563f25bd20b084c0a4bb7fe36))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [8.7.1](https://github.com/Quenty/NevermoreEngine/compare/@quenty/numbersequenceutils@8.7.0...@quenty/numbersequenceutils@8.7.1) (2024-11-04)
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.7.1",
3
+ "version": "8.8.0",
4
4
  "description": "Utility functions involving NumberSequences on Roblox",
5
5
  "keywords": [
6
6
  "Roblox",
@@ -31,5 +31,5 @@
31
31
  "@quenty/loader": "^10.7.1",
32
32
  "@quenty/math": "^2.7.0"
33
33
  },
34
- "gitHead": "01c43a0ddd3c5e0cb2d9027313dbfa9852eedef1"
34
+ "gitHead": "983dd19fe900614dc698e5dba172439d81b8b4b1"
35
35
  }
@@ -124,6 +124,27 @@ function NumberSequenceUtils.scale(sequence, scale)
124
124
  return NumberSequence.new(waypoints)
125
125
  end
126
126
 
127
+ --[=[
128
+ Scale the transparency
129
+
130
+ @param sequence NumberSequence
131
+ @param scale number
132
+ @return NumberSequence
133
+ ]=]
134
+ function NumberSequenceUtils.scaleTransparency(sequence, scale)
135
+ local waypoints = {}
136
+
137
+ local keypoints = sequence.Keypoints
138
+ for _, keypoint in pairs(keypoints) do
139
+ table.insert(waypoints, NumberSequenceKeypoint.new(
140
+ keypoint.Time,
141
+ Math.map(keypoint.Value, 0, 1, scale, 1),
142
+ keypoint.Envelope*scale))
143
+ end
144
+
145
+ return NumberSequence.new(waypoints)
146
+ end
147
+
127
148
  --[=[
128
149
  Generates a number sequence with stripes, which can be used in a variety of ways.
129
150