Skip to content

Commit 7e8929b

Browse files
committed
fix server and ruby merge examples
1 parent 72e43a1 commit 7e8929b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

external_library/gem/geomerative/jruby_merge.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def settings
3535
end
3636

3737
def setup
38-
sketch_title TEXT.join ' '
38+
sketch_title 'JRuby Processing'
3939
RG.init(self)
4040
@my_font = RFont.new(data_path('FreeSans.ttf'), 200, CENTER)
4141
@stop = false

processing_app/library/net/shared_canvas_server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# Canvas (Client) program so see how they interact.
1111
#
1212
load_library :net
13-
include_package 'processing.net'
13+
java_import 'processing.net.Server'
1414

1515
attr_reader :s
1616

@@ -39,7 +39,7 @@ def draw
3939
return if c.nil?
4040
input = c.read_string
4141
# Split values into an array and convert to int
42-
data = input.split(' ').map(&:to_i)
42+
data = input.split(' ').map(&:to_f).to_java(:float)
4343
# Draw line using received coords
4444
line(*data)
4545
end

0 commit comments

Comments
 (0)