processing 0.4.0 → 0.5.0

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.
@@ -4,9 +4,9 @@
4
4
  require_relative 'helper'
5
5
 
6
6
 
7
- class TestProcessingVector < Test::Unit::TestCase
7
+ class TestVector < Test::Unit::TestCase
8
8
 
9
- P = Processing::Processing
9
+ P = Processing
10
10
  V = P::Vector
11
11
  M = Math
12
12
  PI = M::PI
@@ -327,7 +327,11 @@ class TestProcessingVector < Test::Unit::TestCase
327
327
 
328
328
  def test_rotate()
329
329
  angle = PI * 2 * 0.1
330
- context = Object.new.tap {|o| def o.toAngle__(a); a * 2 * P::RAD2DEG__; end}
330
+ context = Object.new.tap {|o|
331
+ def o.toAngle__(a)
332
+ a * 2 * P::GraphicsContext::RAD2DEG__
333
+ end
334
+ }
331
335
 
332
336
  v = vec 1, 0, 0
333
337
  assert_equal_vector vec(M.cos(angle), M.sin(angle), 0), v.rotate(angle)
@@ -391,4 +395,4 @@ class TestProcessingVector < Test::Unit::TestCase
391
395
  assert_in_delta 1, v2.mag, 0.000001
392
396
  end
393
397
 
394
- end# TestProcessingVector
398
+ end# TestVector
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: processing
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - xordog
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-12-28 00:00:00.000000000 Z
11
+ date: 2023-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reflexion
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.29
19
+ version: 0.1.30
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.29
26
+ version: 0.1.30
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: yard
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Creative Coding Framework has API compatible to Processing API or p5.js.
41
+ description: Creative Coding Framework has API compatible to Processing or p5.js.
42
42
  email: xordog@gmail.com
43
43
  executables: []
44
44
  extensions: []
@@ -63,10 +63,18 @@ files:
63
63
  - examples/image.rb
64
64
  - examples/shapes.rb
65
65
  - lib/processing.rb
66
+ - lib/processing/all.rb
66
67
  - lib/processing/app.rb
67
- - lib/processing/include.rb
68
+ - lib/processing/capture.rb
69
+ - lib/processing/context.rb
70
+ - lib/processing/font.rb
71
+ - lib/processing/graphics.rb
72
+ - lib/processing/graphics_context.rb
73
+ - lib/processing/image.rb
68
74
  - lib/processing/module.rb
69
- - lib/processing/processing.rb
75
+ - lib/processing/shader.rb
76
+ - lib/processing/touch.rb
77
+ - lib/processing/vector.rb
70
78
  - lib/processing/window.rb
71
79
  - lib/rubysketch-processing.rb
72
80
  - lib/rubysketch.rb
@@ -74,11 +82,10 @@ files:
74
82
  - src/RubyProcessing.h
75
83
  - src/RubyProcessing.mm
76
84
  - test/helper.rb
77
- - test/processing/helper.rb
78
- - test/processing/test_graphics.rb
79
- - test/processing/test_shader.rb
80
- - test/processing/test_utility.rb
81
- - test/processing/test_vector.rb
85
+ - test/test_graphics.rb
86
+ - test/test_shader.rb
87
+ - test/test_utility.rb
88
+ - test/test_vector.rb
82
89
  homepage: https://github.com/xord/processing
83
90
  licenses: []
84
91
  metadata: {}
@@ -97,14 +104,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
104
  - !ruby/object:Gem::Version
98
105
  version: '0'
99
106
  requirements: []
100
- rubygems_version: 3.2.33
107
+ rubygems_version: 3.4.1
101
108
  signing_key:
102
109
  specification_version: 4
103
110
  summary: Processing compatible Creative Coding Framework.
104
111
  test_files:
105
112
  - test/helper.rb
106
- - test/processing/helper.rb
107
- - test/processing/test_graphics.rb
108
- - test/processing/test_shader.rb
109
- - test/processing/test_utility.rb
110
- - test/processing/test_vector.rb
113
+ - test/test_graphics.rb
114
+ - test/test_shader.rb
115
+ - test/test_utility.rb
116
+ - test/test_vector.rb
@@ -1,25 +0,0 @@
1
- require 'processing'
2
-
3
-
4
- begin
5
- window = Processing::Window.new {start}
6
- context = Processing::Processing::Context.new window
7
-
8
- (context.methods - Object.instance_methods).each do |method|
9
- define_method method do |*args, **kwargs, &block|
10
- context.__send__ method, *args, **kwargs, &block
11
- end
12
- end
13
-
14
- context.class.constants.each do |const|
15
- self.class.const_set const, context.class.const_get(const)
16
- end
17
-
18
- window.__send__ :begin_draw
19
- at_exit do
20
- window.__send__ :end_draw
21
- Processing::App.new {window.show}.start unless $!
22
- end
23
-
24
- PROCESSING_WINDOW = window
25
- end