diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f6520be56c..316136ff0f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -10,9 +10,9 @@ jobs: uses: actions/checkout@v2 - name: Setup Aftman - uses: ok-nick/setup-aftman@v0.3.0 + uses: ok-nick/setup-aftman@v0.4.2 with: - version: "v0.2.7" + version: 'v0.3.0' token: ${{ secrets.GITHUB_TOKEN }} - name: Generate standard library diff --git a/src/numbersequenceutils/src/Shared/NumberSequenceUtils.lua b/src/numbersequenceutils/src/Shared/NumberSequenceUtils.lua index 6d60b1a445..7ff9934d2c 100644 --- a/src/numbersequenceutils/src/Shared/NumberSequenceUtils.lua +++ b/src/numbersequenceutils/src/Shared/NumberSequenceUtils.lua @@ -124,6 +124,27 @@ function NumberSequenceUtils.scale(sequence, scale) return NumberSequence.new(waypoints) end +--[=[ + Scale the transparency + + @param sequence NumberSequence + @param scale number + @return NumberSequence +]=] +function NumberSequenceUtils.scaleTransparency(sequence, scale) + local waypoints = {} + + local keypoints = sequence.Keypoints + for _, keypoint in pairs(keypoints) do + table.insert(waypoints, NumberSequenceKeypoint.new( + keypoint.Time, + Math.map(keypoint.Value, 0, 1, scale, 1), + keypoint.Envelope*scale)) + end + + return NumberSequence.new(waypoints) +end + --[=[ Generates a number sequence with stripes, which can be used in a variety of ways. diff --git a/tools/nevermore-cli/templates/game-template/.github/workflows/build.yml b/tools/nevermore-cli/templates/game-template/.github/workflows/build.yml index 071272ec9d..e82c9d3797 100644 --- a/tools/nevermore-cli/templates/game-template/.github/workflows/build.yml +++ b/tools/nevermore-cli/templates/game-template/.github/workflows/build.yml @@ -8,9 +8,9 @@ jobs: uses: actions/checkout@v2 - name: Setup Aftman - uses: ok-nick/setup-aftman@v0.3.0 + uses: ok-nick/setup-aftman@v0.4.2 with: - version: 'v0.2.7' + version: 'v0.3.0' token: $\{{ secrets.GITHUB_TOKEN }} - name: Generate standard library