11# frozen_string_literal: false
2-
32require 'java'
43require_relative '../rpextras'
54require_relative '../jruby_art/helper_methods'
@@ -31,7 +30,7 @@ module Render
3130 key_pressed : :keyPressed ,
3231 key_released : :keyReleased ,
3332 key_typed : :keyTyped
34- }
33+ } . freeze
3534 # All sketches extend this class
3635 class App < PApplet
3736 include HelperMethods , Math , MathTool , Render
@@ -87,7 +86,7 @@ def method_added(method_name) #:nodoc:
8786 def library_loaded? ( library_name )
8887 self . class . library_loaded? ( library_name )
8988 end
90-
89+
9190 # Since processing-3.0 you should prefer setting the sketch width and
9291 # height and renderer using the size method in the settings loop of the
9392 # sketch (as with vanilla processing) but is hidden see created java.
@@ -108,7 +107,7 @@ def initialize
108107 # NB: this is the processing runSketch() method as used by processing.py
109108 run_sketch
110109 end
111-
110+
112111 def size ( *args )
113112 w , h , mode = *args
114113 @width ||= w
@@ -129,8 +128,8 @@ def sketch_path(spath = nil)
129128
130129 def data_path ( dat )
131130 dat_root = File . join ( SKETCH_ROOT , 'data' )
132- Dir . mkdir ( dat_root ) unless File . exist? ( dat_root )
133- File . join ( dat_root , dat )
131+ Dir . mkdir ( dat_root ) unless File . exist? ( dat_root )
132+ File . join ( dat_root , dat )
134133 end
135134
136135 def sketch_size ( x , y )
@@ -181,8 +180,8 @@ def mix_proxy_into_inner_classes
181180 def import_opengl
182181 # Include processing opengl classes that we'd like to use:
183182 %w( FontTexture FrameBuffer LinePath LineStroker PGL
184- PGraphics2D PGraphics3D PGraphicsOpenGL PShader
185- PShapeOpenGL Texture ) . each do |klass |
183+ PGraphics2D PGraphics3D PGraphicsOpenGL PShader
184+ PShapeOpenGL Texture ) . each do |klass |
186185 java_import format ( 'processing.opengl.%s' , klass )
187186 end
188187 end
0 commit comments