class WSLight::Animation::FadeAnimation

Slides from one set to another from left to right (obviously depending on the hardware setup)

Constants

FADE_DURATION

Public Instance Methods

frame(count) click to toggle source
# File lib/ws_light/animation/fade_animation.rb, line 13
def frame(count)
  set = []

  @set_from.next_frame
  @set_to.next_frame

  @set_from.full_length.times do |i|
    set << @set_from.pixel(i).mix(@set_to.pixel(i), count.to_f / FADE_DURATION.to_f)
  end

  set
end
frames() click to toggle source
# File lib/ws_light/animation/fade_animation.rb, line 9
def frames
  FADE_DURATION + 1
end
frames_per_second() click to toggle source
# File lib/ws_light/animation/fade_animation.rb, line 26
def frames_per_second
  nil
end