File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,8 @@ class Landscape < Propane::App
11
11
# Processing port by Raphaël de Courville.
12
12
#
13
13
attr_reader :landscape
14
- java_alias :background_int , :background , [ Java ::int ]
14
+ java_alias :background_int , :background , [ Java ::int ]
15
+ TITLE_FORMAT = 'frame: %d - fps: %0.2f' . freeze
15
16
16
17
def settings
17
18
size ( 640 , 360 , P2D )
@@ -21,7 +22,7 @@ def setup
21
22
sketch_title 'Landscape'
22
23
no_stroke
23
24
# The code of this shader shows how to integrate shaders from shadertoy
24
- # into Processing with minimal changes.
25
+ # into Processing/JRubyArt/propane with minimal changes.
25
26
@landscape = load_shader ( data_path ( 'landscape.glsl' ) )
26
27
landscape . set ( 'resolution' , width . to_f , height . to_f )
27
28
end
@@ -31,7 +32,7 @@ def draw
31
32
landscape . set ( 'time' , ( millis /1000.0 ) . to_f )
32
33
shader ( landscape )
33
34
rect ( 0 , 0 , width , height )
34
- frame . set_title ( "frame: #{ frame_count } - fps: #{ format ( '%0.2f' , frame_rate ) } " )
35
+ sketch_title ( format ( TITLE_FORMAT , frame_count , frame_rate ) )
35
36
end
36
37
end
37
38
You can’t perform that action at this time.
0 commit comments