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.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +4 -4
- data/.github/workflows/test.yml +3 -3
- data/ChangeLog.md +7 -0
- data/LICENSE +1 -1
- data/VERSION +1 -1
- data/examples/breakout.rb +2 -1
- data/examples/camera.rb +2 -1
- data/examples/clock.rb +3 -1
- data/examples/delay_camera.rb +2 -1
- data/examples/hello.rb +2 -1
- data/examples/image.rb +2 -1
- data/examples/shapes.rb +2 -1
- data/lib/processing/all.rb +20 -0
- data/lib/processing/capture.rb +119 -0
- data/lib/processing/context.rb +471 -0
- data/lib/processing/font.rb +62 -0
- data/lib/processing/graphics.rb +40 -0
- data/lib/processing/graphics_context.rb +1676 -0
- data/lib/processing/image.rb +128 -0
- data/lib/processing/shader.rb +157 -0
- data/lib/processing/touch.rb +28 -0
- data/lib/processing/vector.rb +559 -0
- data/lib/processing.rb +30 -11
- data/lib/rubysketch-processing.rb +1 -1
- data/lib/rubysketch.rb +1 -1
- data/processing.gemspec +2 -2
- data/src/RubyProcessing.mm +1 -1
- data/test/helper.rb +8 -2
- data/test/{processing/test_graphics.rb → test_graphics.rb} +3 -3
- data/test/{processing/test_shader.rb → test_shader.rb} +3 -3
- data/test/{processing/test_utility.rb → test_utility.rb} +3 -3
- data/test/{processing/test_vector.rb → test_vector.rb} +8 -4
- metadata +24 -18
- data/lib/processing/include.rb +0 -25
- data/lib/processing/processing.rb +0 -3211
- data/test/processing/helper.rb +0 -11
@@ -4,9 +4,9 @@
|
|
4
4
|
require_relative 'helper'
|
5
5
|
|
6
6
|
|
7
|
-
class
|
7
|
+
class TestVector < Test::Unit::TestCase
|
8
8
|
|
9
|
-
P = 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|
|
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#
|
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
|
+
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:
|
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.
|
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.
|
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
|
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/
|
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/
|
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/
|
78
|
-
- test/
|
79
|
-
- test/
|
80
|
-
- test/
|
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.
|
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/
|
107
|
-
- test/
|
108
|
-
- test/
|
109
|
-
- test/
|
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
|
data/lib/processing/include.rb
DELETED
@@ -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
|