Skip to content

Commit 1571ee1

Browse files
committed
more path tidy up
1 parent 5148604 commit 1571ee1

File tree

12 files changed

+32
-45
lines changed

12 files changed

+32
-45
lines changed

external_library/gem/toxiclibs/volume_utils/tentacle.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def settings
1212

1313
def setup
1414
sketch_title 'Tentacle'
15-
@tex = load_image('rock_texture2.png')
15+
@tex = load_image(data_path('rock_texture2.png'))
1616
ArcBall.init(self)
1717
@gfx = Gfx::MeshToVBO.new(self)
1818
# gfx.fill_color(color(0, 0, 200))

processing_app/basics/image/extrusion.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def setup
1414
no_fill
1515
# Load the image into a new array
1616
# Extract the values and store in an array
17-
@a = load_image('ystone08.jpg')
17+
@a = load_image(data_path('ystone08.jpg'))
1818
a.load_pixels
1919
(0 ... a.height).each do |i|
2020
row = []

processing_app/library/file_chooser/image_viewer.rb

Lines changed: 0 additions & 27 deletions
This file was deleted.

processing_app/library/chooser/resizable.rb renamed to processing_app/library/file_chooser/resizable.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def settings
77
end
88

99
def setup
10-
sketch_title 'Chooser'
10+
sketch_title 'Image Chooser'
1111
resizable
1212
fill 0, 0, 200
1313
text('Click Window to Load Image', 10, 100)
@@ -29,5 +29,5 @@ def file_selected(selection)
2929
def mouse_clicked
3030
@img = nil
3131
# java_signature 'void selectInput(String, String)'
32-
select_input('select an image', 'file_selected')
32+
select_input('Select Image File', 'file_selected')
3333
end
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
load_library :chooser
2+
###########
3+
# Example Native File Chooser using vanilla processing
4+
# select_input, and file_selected
5+
###########
6+
7+
def setup
8+
sketch_title 'File Chooser'
9+
# java_signature 'void selectInput(String, String)'
10+
select_input('Select a File', 'file_selected')
11+
end
12+
13+
def settings
14+
size 200, 100
15+
end
16+
17+
# signature 'void file_selected(java.io.File file)'
18+
def file_selected(file)
19+
puts file.get_absolute_path unless file.nil?
20+
end

processing_app/library/vecmath/vec2d/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ end
2222

2323
def run_sample(sample_name)
2424
puts "Running #{sample_name}...quit to run next sample"
25-
open("|k9 --nojruby run #{sample_name}", 'r') do |io|
25+
open("|k9 run #{sample_name}", 'r') do |io|
2626
while l = io.gets
2727
puts(l.chop)
2828
end

processing_app/library/vecmath/vec2d/particle_system_pshape.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
def setup
1313
sketch_title 'Particle System PShape'
1414
# Load the image
15-
sprite = load_image('sprite.png')
15+
sprite = load_image(data_path('sprite.png'))
1616
# A new particle system with 10,000 particles
1717
@ps = ParticleSystem.new(width, height, sprite, 10_000)
1818
# Writing to the depth buffer is disabled to avoid rendering

processing_app/topics/effects/lens.rb

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
require 'JRubyArt'
2-
31
# Original by luis2048
42

53
# A picture is shown and it looks like a magnifying glass
@@ -13,8 +11,6 @@
1311
# destination look like a lens is beeing held over the source
1412
# picture. Based on lens formula by on Abe Racadabra.
1513

16-
17-
1814
def setup
1915
sketch_title 'Lens'
2016
@lens_d = 160
@@ -26,7 +22,7 @@ def setup
2622

2723
# Load background image.
2824
@lens_effect.begin_draw
29-
@lens_effect.image(load_image('red_smoke.jpg'), 0, 0, width, height)
25+
@lens_effect.image(load_image(data_path('red_smoke.jpg')), 0, 0, width, height)
3026
@lens_effect.end_draw
3127
image(@lens_effect, 0, 0, width, height)
3228

@@ -91,9 +87,6 @@ def draw
9187
image(@lens_image, @xx, @yy, @lens_d, @lens_d)
9288
end
9389

94-
95-
9690
def settings
9791
size 640, 300, P3D
9892
end
99-

processing_app/topics/gui/scrollbar.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ def setup
1515
@hs1 = HScrollbar.new(app: self, height: height / 2 - 8, wd: 16, loose: 16)
1616
@hs2 = HScrollbar.new(app: self, height: height / 2 + 8, wd: 16, loose: 16)
1717
# Load images
18-
@img1 = load_image('seedTop.jpg')
19-
@img2 = load_image('seedBottom.jpg')
18+
@img1 = load_image(data_path('seedTop.jpg'))
19+
@img2 = load_image(data_path('seedBottom.jpg'))
2020
end
2121

2222
def draw

processing_app/topics/shaders/image_filtering/bilateral.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
# Original shader by mrharicot
23
# https://www.shadertoy.com/view/4dfGDH
34
# Ported to Processing by Raphaël de Courville <twitter: @sableRaph>

0 commit comments

Comments
 (0)