propane 0.8.0-java → 0.9.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +3 -1
  3. data/README.md +1 -1
  4. data/lib/propane/app.rb +56 -55
  5. data/lib/propane/creators/sketch_writer.rb +7 -3
  6. data/lib/propane/helper_methods.rb +40 -29
  7. data/lib/propane/runner.rb +3 -2
  8. data/lib/propane/version.rb +1 -1
  9. data/pom.rb +1 -1
  10. data/pom.xml +1 -1
  11. data/vendors/Rakefile +31 -1
  12. metadata +2 -59
  13. data/examples/data_path/Rakefile +0 -32
  14. data/examples/data_path/bw_shader.rb +0 -47
  15. data/examples/data_path/data/Texture01.jpg +0 -0
  16. data/examples/data_path/data/Texture02.jpg +0 -0
  17. data/examples/data_path/data/Univers45.vlw +0 -0
  18. data/examples/data_path/data/bwfrag.glsl +0 -23
  19. data/examples/data_path/data/displaceFrag.glsl +0 -8
  20. data/examples/data_path/data/displaceVert.glsl +0 -201
  21. data/examples/data_path/data/lachoy.jpg +0 -0
  22. data/examples/data_path/data/landscape.glsl +0 -352
  23. data/examples/data_path/data/monjori.glsl +0 -30
  24. data/examples/data_path/data/moon.jpg +0 -0
  25. data/examples/data_path/data/sea.jpg +0 -0
  26. data/examples/data_path/edge_detection.rb +0 -49
  27. data/examples/data_path/glsl_heightmap_noise.rb +0 -125
  28. data/examples/data_path/kinetic_type.rb +0 -79
  29. data/examples/data_path/landscape.rb +0 -34
  30. data/examples/data_path/linear_image.rb +0 -51
  31. data/examples/data_path/monjori.rb +0 -35
  32. data/examples/regular/Rakefile +0 -30
  33. data/examples/regular/arcball_box.rb +0 -28
  34. data/examples/regular/arcball_constrain.rb +0 -29
  35. data/examples/regular/bezier_playground.rb +0 -206
  36. data/examples/regular/circle_collision.rb +0 -118
  37. data/examples/regular/colors_two.rb +0 -60
  38. data/examples/regular/creating_colors.rb +0 -64
  39. data/examples/regular/drawolver.rb +0 -93
  40. data/examples/regular/elegant_ball.rb +0 -159
  41. data/examples/regular/empathy.rb +0 -80
  42. data/examples/regular/fern.rb +0 -57
  43. data/examples/regular/fibonacci_sphere.rb +0 -91
  44. data/examples/regular/flight_patterns.rb +0 -64
  45. data/examples/regular/fractions.rb +0 -32
  46. data/examples/regular/grapher.rb +0 -40
  47. data/examples/regular/gravity.rb +0 -120
  48. data/examples/regular/grey_circles.rb +0 -28
  49. data/examples/regular/jwishy.rb +0 -99
  50. data/examples/regular/letters.rb +0 -42
  51. data/examples/regular/lib/boundary.rb +0 -38
  52. data/examples/regular/lib/particle.rb +0 -77
  53. data/examples/regular/lib/particle_system.rb +0 -111
  54. data/examples/regular/lib/rain_drops.rb +0 -54
  55. data/examples/regular/liquidy.rb +0 -41
  56. data/examples/regular/mouse_button_demo.rb +0 -32
  57. data/examples/regular/polyhedrons.rb +0 -249
  58. data/examples/regular/raining.rb +0 -60
  59. data/examples/regular/ribbon_doodle.rb +0 -89
  60. data/examples/regular/select_file.rb +0 -32
  61. data/examples/regular/select_image.rb +0 -40
  62. data/examples/regular/slider_demo.rb +0 -61
  63. data/examples/regular/slider_example.rb +0 -53
  64. data/examples/regular/slider_simple.rb +0 -47
  65. data/examples/regular/tree.rb +0 -76
  66. data/examples/regular/vector_math.rb +0 -37
  67. data/examples/regular/words.rb +0 -41
  68. data/lib/propane/helpers/string_extra.rb +0 -45
  69. data/lib/propane/underscorer.rb +0 -19
@@ -1,37 +0,0 @@
1
- #
2
- # Vector
3
- # by Daniel Shiffman.
4
- # PVector was used in the original (instead of Vec2D)
5
- # Demonstration some basic vector math: subtraction, normalization, scaling
6
- # Normalizing a vector sets its length to 1.
7
- #
8
- require 'propane'
9
-
10
- class VectorMath < Propane::App
11
- attr_reader :center
12
- def setup
13
- size(640, 360)
14
- stroke(255)
15
- stroke_weight(4)
16
- # A vector that points to the center of the window
17
- @center = Vec2D.new(width/2, height/2)
18
- puts (center.eql? center)
19
- end
20
-
21
- def draw
22
- background(0)
23
- # A vector that points to the mouse location
24
- mouse = Vec2D.new(mouse_x, mouse_y)
25
- # Subtract center from mouse which results in a vector that points from center to mouse
26
- mouse -= center
27
- # Normalize the vector
28
- mouse.normalize!
29
- # Multiply its length by 150 (Scaling its length)
30
- mouse *= 150
31
- translate(width / 2,height / 2)
32
- # Draw the resulting vector
33
- line(0, 0, mouse.x, mouse.y)
34
- end
35
- end
36
-
37
- VectorMath.new title: 'Vector Math'
@@ -1,41 +0,0 @@
1
- # encoding: utf-8
2
- # frozen_string_literal: true
3
- require 'propane'
4
- # Words.
5
- class Words < Propane::App
6
- # The text() function is used for writing words to the screen.
7
-
8
- def setup
9
- size 640, 360
10
- @x = 30
11
- Propane::PFont.list.each {|fnt| puts fnt}
12
- @font = create_font('Georgia', 24)
13
- text_font @font, 32
14
- no_loop
15
- end
16
-
17
- def draw
18
- background(102)
19
- text_align(RIGHT)
20
- draw_type(width * 0.25)
21
- text_align(CENTER)
22
- draw_type(width * 0.5)
23
- text_align(LEFT);
24
- draw_type(width * 0.75)
25
- end
26
-
27
- def draw_type x
28
- line(x, 0, x, 65)
29
- line(x, 220, x, height)
30
- fill 0
31
- text 'ichi', x, 95
32
- fill 51
33
- text 'ni', x, 130
34
- fill 204
35
- text 'san', x, 165
36
- fill 255
37
- text 'shi', x, 210
38
- end
39
- end
40
-
41
- Words.new title: 'Words'
@@ -1,45 +0,0 @@
1
- # encoding: utf-8
2
- # frozen_string_literal: false
3
-
4
- require 'forwardable'
5
-
6
- # String utility for creating titles and class-names
7
- class StringExtra
8
- extend Forwardable
9
- def_delegators :@str, :upcase, :capitalize, :length, :downcase, :gsub, :tr
10
- def initialize(str)
11
- @str = str
12
- end
13
-
14
- def titleize
15
- gsub(/::/, '/')
16
- .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
17
- .gsub(/([a-z\d])([A-Z])/, '\1_\2')
18
- .tr('-', '_')
19
- .downcase
20
- .gsub(/_id$/, '')
21
- .tr('_', ' ').capitalize
22
- .gsub(/\b([a-z])/) { Regexp.last_match[1].capitalize }
23
- end
24
-
25
- def humanize
26
- gsub(/_id$/, '').tr(/_/, ' ').capitalize
27
- end
28
-
29
- def underscore
30
- gsub(/::/, '/')
31
- .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
32
- .gsub(/([a-z\d])([A-Z])/, '\1_\2')
33
- .sub('-', '_')
34
- .downcase
35
- end
36
-
37
- def camelize(first_letter_in_uppercase = true)
38
- if first_letter_in_uppercase
39
- @str.gsub(%r{/(.?)}) { '::' + Regexp.last_match[1].upcase }
40
- .gsub(/(^|_)(.)/) { Regexp.last_match[2].upcase }
41
- else
42
- @str[0] + camelize[1..-1]
43
- end
44
- end
45
- end
@@ -1,19 +0,0 @@
1
- # encoding: utf-8
2
- # frozen_string_literal: false
3
- module Propane
4
- # This class defines a single method that converts a method name
5
- # from camel or mixed case to snake case.
6
- #
7
- class Underscorer
8
- # Underscorer.("CamelCase") => "camel_case"
9
- #
10
- def self.call(input)
11
- string = input.to_s
12
- string.gsub(/::/, '/')
13
- .gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
14
- .gsub(/([a-z\d])([A-Z])/, '\1_\2')
15
- .tr('-', '_')
16
- .downcase
17
- end
18
- end
19
- end