Class: WSLight::Animation::FadeAnimation
Overview
Slides from one set to another from left to right (obviously depending on the hardware setup)
Constant Summary
collapse
- FADE_DURATION =
50
Instance Attribute Summary
#set_from, #set_to, #type
Instance Method Summary
collapse
#frame_data, #initialize
Instance Method Details
#frame(count) ⇒ Object
13
14
15
16
17
18
19
20
21
22
23
24
|
# 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 ⇒ Object
9
10
11
|
# File 'lib/ws_light/animation/fade_animation.rb', line 9
def frames
FADE_DURATION + 1
end
|
#frames_per_second ⇒ Object
26
27
28
|
# File 'lib/ws_light/animation/fade_animation.rb', line 26
def frames_per_second
nil
end
|