Skip to content

Commit

Permalink
refine movie sketches
Browse files Browse the repository at this point in the history
  • Loading branch information
monkstone committed Oct 3, 2016
1 parent 05ecfd5 commit cb046db
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions processing_app/library/video/capture/test_capture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -38,4 +38,3 @@ def captureEvent(c)
def settings
size 1280, 720, P2D
end

5 changes: 2 additions & 3 deletions processing_app/library/video/movie/loop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -27,6 +27,5 @@ def movieEvent(m)
end

def settings
size 640, 360, FX2D
size 640, 360
end

0 comments on commit cb046db

Please sign in to comment.