Skip to content

Commit cb046db

Browse files
committed
refine movie sketches
1 parent 05ecfd5 commit cb046db

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

processing_app/library/video/capture/test_capture.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
def setup
88
sketch_title 'Test Capture'
99
cameras = Capture.list
10-
fail 'There are no cameras available for capture.' if (cameras.length == 0)
10+
fail 'There are no cameras available for capture.' if cameras.length.zero?
1111
p 'Matching cameras available:'
1212
size_pattern = Regexp.new(format('%dx%d', width, height))
1313
select = cameras.grep size_pattern # filter available cameras
1414
select.uniq.map { |cam| p cam.strip }
15-
fail 'There are no matching cameras.' if (select.length == 0)
15+
fail 'There are no matching cameras.' if select.length.zero?
1616
start_capture(select[0])
1717
end
1818

@@ -38,4 +38,3 @@ def captureEvent(c)
3838
def settings
3939
size 1280, 720, P2D
4040
end
41-

processing_app/library/video/movie/loop.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def setup
1313
sketch_title 'Loop'
1414
background(0)
1515
# Load and play the video in a loop
16-
@movie = Movie.new(self, 'transit.mov')
16+
@movie = Movie.new(self, data_path('transit.mov'))
1717
movie.loop
1818
end
1919

@@ -27,6 +27,5 @@ def movieEvent(m)
2727
end
2828

2929
def settings
30-
size 640, 360, FX2D
30+
size 640, 360
3131
end
32-

0 commit comments

Comments
 (0)