File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
processing_app/library/video Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 7
7
def setup
8
8
sketch_title 'Test Capture'
9
9
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?
11
11
p 'Matching cameras available:'
12
12
size_pattern = Regexp . new ( format ( '%dx%d' , width , height ) )
13
13
select = cameras . grep size_pattern # filter available cameras
14
14
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?
16
16
start_capture ( select [ 0 ] )
17
17
end
18
18
@@ -38,4 +38,3 @@ def captureEvent(c)
38
38
def settings
39
39
size 1280 , 720 , P2D
40
40
end
41
-
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ def setup
13
13
sketch_title 'Loop'
14
14
background ( 0 )
15
15
# Load and play the video in a loop
16
- @movie = Movie . new ( self , 'transit.mov' )
16
+ @movie = Movie . new ( self , data_path ( 'transit.mov' ) )
17
17
movie . loop
18
18
end
19
19
@@ -27,6 +27,5 @@ def movieEvent(m)
27
27
end
28
28
29
29
def settings
30
- size 640 , 360 , FX2D
30
+ size 640 , 360
31
31
end
32
-
You can’t perform that action at this time.
0 commit comments