Skip to content

Commit 94bb564

Browse files
committed
fix Rakefiles
1 parent d1b9eea commit 94bb564

File tree

4 files changed

+13
-15
lines changed

4 files changed

+13
-15
lines changed

contributed/plain.rb

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# encoding: utf-8
22
# frozen_string_literal: true
33
# Description:
4-
# This is a full-screen demo
4+
# This is a full-screen demo
55
# Since processing-3.0a10 set in settings
66

77
class FullScreen < Processing::App
@@ -13,19 +13,18 @@ def setup
1313
end
1414

1515
def draw
16-
background 200
16+
background 0
1717
fill 120, 160, 220
1818
stroke 0
1919
rect_mode(CENTER)
2020
(dim..width - dim).step(dim) do |x|
2121
(dim..height - dim).step(dim) do |y|
22-
rect x, y, dim, dim, rnd, rnd, rnd, rnd
22+
rect x, y, dim, dim, rnd, rnd, rnd, rnd
2323
end
2424
end
25-
end
25+
end
2626

2727
def settings
2828
full_screen
2929
end
3030
end
31-

processing_app/demos/performance/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 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/topics/shaders/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 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/topics/vectors/vector_math.rb

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
11
#
2-
# Vector
3-
# by Daniel Shiffman.
4-
#
2+
# Vector
3+
# by Daniel Shiffman.
4+
#
55
# Demonstration some basic vector math: subtraction, normalization, scaling
66
# Normalizing a vector sets its length to 1. See library/vecmath for example
77
# using the more ruby like Vec2D class instead of Vec2D
88
#
99

10-
1110
def setup
1211
sketch_title 'Vector Math'
1312
end
1413

1514
def draw
16-
background(0)
15+
background(0)
1716
# A vector that points to the mouse location
1817
mouse = Vec2D.new(mouse_x, mouse_y)
1918
# A vector that points to the center of the window
2019
center = Vec2D.new(width / 2,height / 2)
2120
# Subtract center from mouse which results in a vector that points from center to mouse
22-
mouse -= center
21+
mouse -= center
2322
# Normalize the vector
24-
mouse.normalize!
23+
mouse.normalize!
2524
# Multiply its length by 150 (Scaling its length)
2625
mouse *= 150
2726
translate(width / 2,height / 2)
2827
# Draw the resulting vector
2928
stroke(255)
3029
stroke_weight(4)
31-
line(0, 0, mouse.x, mouse.y)
30+
line(0, 0, mouse.x, mouse.y)
3231
end
3332

3433
def settings

0 commit comments

Comments
 (0)