From cb046db21d14185507ec28e665b88edc02d65bf6 Mon Sep 17 00:00:00 2001 From: monkstone Date: Mon, 3 Oct 2016 14:12:05 +0100 Subject: [PATCH] refine movie sketches --- processing_app/library/video/capture/test_capture.rb | 5 ++--- processing_app/library/video/movie/loop.rb | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/processing_app/library/video/capture/test_capture.rb b/processing_app/library/video/capture/test_capture.rb index 66f2e6e..1353773 100644 --- a/processing_app/library/video/capture/test_capture.rb +++ b/processing_app/library/video/capture/test_capture.rb @@ -7,12 +7,12 @@ def setup sketch_title 'Test Capture' cameras = Capture.list - fail 'There are no cameras available for capture.' if (cameras.length == 0) + fail 'There are no cameras available for capture.' if cameras.length.zero? p 'Matching cameras available:' size_pattern = Regexp.new(format('%dx%d', width, height)) select = cameras.grep size_pattern # filter available cameras select.uniq.map { |cam| p cam.strip } - fail 'There are no matching cameras.' if (select.length == 0) + fail 'There are no matching cameras.' if select.length.zero? start_capture(select[0]) end @@ -38,4 +38,3 @@ def captureEvent(c) def settings size 1280, 720, P2D end - diff --git a/processing_app/library/video/movie/loop.rb b/processing_app/library/video/movie/loop.rb index 83a64cd..f32a94d 100644 --- a/processing_app/library/video/movie/loop.rb +++ b/processing_app/library/video/movie/loop.rb @@ -13,7 +13,7 @@ def setup sketch_title 'Loop' background(0) # Load and play the video in a loop - @movie = Movie.new(self, 'transit.mov') + @movie = Movie.new(self, data_path('transit.mov')) movie.loop end @@ -27,6 +27,5 @@ def movieEvent(m) end def settings - size 640, 360, FX2D + size 640, 360 end -