lib/whirled_peas/command/play.rb in whirled_peas-0.11.1 vs lib/whirled_peas/command/play.rb in whirled_peas-0.12.0
- old
+ new
@@ -26,17 +26,15 @@
require 'whirled_peas/utils/ansi'
Utils::Ansi.with_screen do |width, height|
consumer = Animator::RendererConsumer.new(
WhirledPeas.config.template_factory,
- Device::Screen.new(WhirledPeas.config.refresh_rate),
+ Device::Screen.new,
width,
height
)
- Animator::Producer.produce(
- consumer, WhirledPeas.config.refresh_rate
- ) do |producer|
+ Animator::Producer.produce(consumer) do |producer|
config.application.start(producer)
end
end
rescue LoadError => e
puts e
@@ -58,12 +56,12 @@
require 'whirled_peas/device/screen'
require 'whirled_peas/utils/ansi'
require 'whirled_peas/utils/file_handler'
Utils::Ansi.with_screen do
- screen = Device::Screen.new(WhirledPeas.config.refresh_rate)
- renders = Utils::FileHandler.read(wpz_file)
- screen.handle_renders(renders)
+ screen = Device::Screen.new
+ rendered_frames = Utils::FileHandler.read(wpz_file)
+ screen.handle_rendered_frames(rendered_frames)
end
end
private