Skip to content

Commit

Permalink
Revert Set Color @ Speed 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lakr233 committed Aug 14, 2024
1 parent 1df46ad commit b1acbe1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ extension AnimatedMulticolorGradientView {
var inplaceEdit = colorElements[idx]
defer { colorElements[idx] = inplaceEdit }

if speed <= 0 {
inplaceEdit.transitionProgress.setCurrent(1)
} else if inplaceEdit.transitionProgress.context.currentPos < 1 {
if inplaceEdit.transitionProgress.context.currentPos < 1 {
inplaceEdit.transitionProgress.update(withDeltaTime: deltaTime * transitionSpeed)
}
if moveDelta > 0 {
Expand Down
3 changes: 0 additions & 3 deletions Sources/ColorfulX/AnimatedMulticolorGradientView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ open class AnimatedMulticolorGradientView: MulticolorGradientView {
if colors.isEmpty { colors.append(.init(v: .zero, space: .rgb)) }
colors = colors.map { $0.color(in: .lab) }

var interpolationEnabled = interpolationEnabled
if speed <= 0 { interpolationEnabled = false }

let endingIndex = repeatToFillColorSlots ? Uniforms.COLOR_SLOT : min(colors.count, Uniforms.COLOR_SLOT)
guard endingIndex > 0 else { return }
for idx in 0 ..< endingIndex {
Expand Down

0 comments on commit b1acbe1

Please sign in to comment.