File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 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
1111 # Processing port by Raphaël de Courville.
1212 #
1313 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
1516
1617 def settings
1718 size ( 640 , 360 , P2D )
@@ -21,7 +22,7 @@ def setup
2122 sketch_title 'Landscape'
2223 no_stroke
2324 # 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.
2526 @landscape = load_shader ( data_path ( 'landscape.glsl' ) )
2627 landscape . set ( 'resolution' , width . to_f , height . to_f )
2728 end
@@ -31,7 +32,7 @@ def draw
3132 landscape . set ( 'time' , ( millis /1000.0 ) . to_f )
3233 shader ( landscape )
3334 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 ) )
3536 end
3637end
3738
You can’t perform that action at this time.
0 commit comments