propane 2.1.1-java → 2.2.0.pre-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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 96c47e1ea96be925869f7a77d1a6753c24bc9b3b
4
- data.tar.gz: 3485ff56e4408d1eda441481122c28ea7ddf5cfa
3
+ metadata.gz: 40d9dddaa45dc63c70d20b4d7e9c09f955b5ddfe
4
+ data.tar.gz: 5504530c6c2a6394548372253b69978f76ba799e
5
5
  SHA512:
6
- metadata.gz: b1ddb3cdc5dbbb9023512732f5fbcd4c9453483ebd90ea002c72c995bba5043a6843dfa4938db4d224e49736fcb48649842a55ec7ec4cd842c4c29b3c73dc31d
7
- data.tar.gz: 446e7701836640a03f992541e83bfe7d7265c0485d28fc8372fbdb28d184882700df0b7a537a40672011dd0d869b8950032ccce491e0a70db848ea8128e018b1
6
+ metadata.gz: aaeff32b76e08b370f4ccdc1c910c8a97dfb811f703ee24e22e9eaf890e44d224509b5b3e99bdac83012a3a6bffa1ac1dbd9910f23db115dbc96064ab0f8ac70
7
+ data.tar.gz: ffcfefbc3dadf226801da070255144a1bccfdce4445499659cb0813047fe0f022fe178a8619ba2f2e795bc6b72616a4967e1bc4ac2eeedb0c2e79e9af4a594b5
data/.travis.yml CHANGED
@@ -1,10 +1,21 @@
1
1
  language: ruby
2
2
  sudo: false
3
+ addons:
4
+ apt:
5
+ packages:
6
+ -oracle-java8-installer
7
+ -xvfb
8
+ -libxrender1
9
+ -libxtst6
10
+ -libxi6
3
11
 
4
12
  rvm:
5
- - jruby-9.1.6.0
13
+ - jruby-9.1.2.0
6
14
  jdk:
7
15
  - oraclejdk8
8
16
  os:
9
17
  - linux
18
+ env:
19
+ - Xvfb :1 -screen 0 1024x768x24
20
+ - export DISPLAY=":1"
10
21
 
data/CHANGELOG.md CHANGED
@@ -1,6 +1,4 @@
1
- **v2.1.1** Update to core processing-3.2.4 and JRuby-9.1.7.0
2
-
3
- **v2.1.0** Add missing method to ColorUtil.java, `include HelperMethods, PConstants, Math, MathTool` in `Propane::Proxy`, it is just simpler that way. Mixin Renderer for AppRender and ShapeRender. Changes to `Propane::Proxy` are significant enough to warrant versioning bump, samples making use of new code will not be runable by earlier versions.
1
+ **v2.1.0** Add missing method to ColorUtil.java, `include HelperMethods, PConstants, Math, MathTool` in `Propane::Proxy`, it is just simpler that way. Mixin Renderer for AppRender and ShapeRender. Changes to `Propane::Proxy` are significant enough to warrant versioning bump, samples making use of new code will not be runable by earlier versions.
4
2
 
5
3
  **v2.0.6** Update to core processing-3.2.3
6
4
 
data/README.md CHANGED
@@ -1,14 +1,14 @@
1
1
  # Propane
2
2
  [![Gem Version](https://badge.fury.io/rb/propane.svg)](https://badge.fury.io/rb/propane)
3
3
 
4
- A slim layer to communicate with Processing from JRuby, features a polyglot maven build. We have created a configuration free version of ruby processing, for processing-3.2.4, where we include processing core (from a local maven repository and opengl etc from maven central). These jars are small enough to include in a gem distribution, and hence we do not require configuration. This has created a scriptable version, ie files get run direct from jruby, but you could use jruby-complete if you used the propane script (avoids need to give the absolute data path for the data folder, but would also be needed for a watch mode). NB: for linux64 and macOS opengl binaries use latest relaease. See guide to [building ruby-processing projects][building].
4
+ A slim layer to communicate with Processing from JRuby, features a polyglot maven build. We have created a configuration free version of ruby processing, for processing-3.2.3, where we include processing core (from a local maven repository and opengl etc from maven central). These jars are small enough to include in a gem distribution, and hence we do not require configuration. This has created a scriptable version, ie files get run direct from jruby, but you could use jruby-complete if you used the propane script (avoids need to give the absolute data path for the data folder, but would also be needed for a watch mode). NB: currently we only include linux64 and macOS opengl binaries, please fork this repository to include binaries for your OS if not included. See guide to [building ruby-processing projects][building].
5
5
 
6
6
  ## Requirements
7
7
 
8
- - jdk8+
9
- - jruby-9.1.7.0+
8
+ - jdk8+ since version 0.6.0
9
+ - jruby-9.1.5.0+
10
10
  - mvn-3.3.1+ (development only)
11
- - core.jar processing-3.2.4 (development only until processing.org is available at maven central)
11
+ - core.jar processing-3.2.3 (development only until processing.org is available at maven central)
12
12
 
13
13
  ## Building and testing
14
14
 
@@ -20,8 +20,8 @@ rake javadoc
20
20
 
21
21
  ## Installation
22
22
  ```bash
23
- jgem install propane # from rubygems
24
- jgem install propane-2.1.1-java.gem # for local install
23
+ jgem install propane-{version}-java.gem # local install
24
+ jgem install propane # from rubygems.org
25
25
  ```
26
26
 
27
27
  ## Usage
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Propane
3
- VERSION = '2.1.1'.freeze
3
+ VERSION = '2.2.0.pre'.freeze
4
4
  end
data/pom.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'fileutils'
2
2
  project 'rp5extras', 'https://github.com/monkstone/propane' do
3
3
  model_version '4.0.0'
4
- id 'propane:propane', '2.1.1'
4
+ id 'propane:propane', '2.2.0.pre'
5
5
  packaging 'jar'
6
6
  description 'rp5extras for propane'
7
7
  organization 'ruby-processing', 'https://ruby-processing.github.io'
@@ -32,8 +32,8 @@ project 'rp5extras', 'https://github.com/monkstone/propane' do
32
32
  'jogl.version' => '2.3.2'
33
33
  )
34
34
 
35
- pom 'org.jruby:jruby:9.1.7.0'
36
- jar 'org.processing:core:3.2.4'
35
+ pom 'org.jruby:jruby:9.1.5.0'
36
+ jar 'org.processing:core:3.2.3'
37
37
  jar 'org.processing:video:3.0.2'
38
38
  jar('org.jogamp.jogl:jogl-all:${jogl.version}')
39
39
  jar('org.jogamp.gluegen:gluegen-rt-main:${jogl.version}')
@@ -44,7 +44,7 @@ project 'rp5extras', 'https://github.com/monkstone/propane' do
44
44
  execute_goals( id: 'default-cli',
45
45
  artifactItems: [ { groupId: 'org.processing',
46
46
  artifactId: 'core',
47
- version: '3.2.4',
47
+ version: '3.2.3',
48
48
  type: 'jar',
49
49
  outputDirectory: '${propane.basedir}/lib'
50
50
  },
@@ -63,7 +63,7 @@ project 'rp5extras', 'https://github.com/monkstone/propane' do
63
63
  { groupId: 'org.jogamp.jogl',
64
64
  artifactId: 'jogl-all',
65
65
  version: '${jogl.version}',
66
- classifier: 'natives-linux-armv6hf',
66
+ classifier: 'natives-windows-amd64',
67
67
  type: 'jar',
68
68
  outputDirectory: '${propane.basedir}/lib'
69
69
  },
@@ -71,7 +71,7 @@ project 'rp5extras', 'https://github.com/monkstone/propane' do
71
71
  artifactId: 'gluegen-rt',
72
72
  version: '${jogl.version}',
73
73
  type: 'jar',
74
- classifier: 'natives-linux-armv6hf',
74
+ classifier: 'natives-windows-amd64',
75
75
  outputDirectory: '${propane.basedir}/lib'
76
76
  }
77
77
  ]
data/pom.xml CHANGED
@@ -11,7 +11,7 @@ DO NOT MODIFIY - GENERATED CODE
11
11
  <modelVersion>4.0.0</modelVersion>
12
12
  <groupId>propane</groupId>
13
13
  <artifactId>propane</artifactId>
14
- <version>2.1.1</version>
14
+ <version>2.2.0.pre</version>
15
15
  <name>rp5extras</name>
16
16
  <description>rp5extras for propane</description>
17
17
  <url>https://github.com/monkstone/propane</url>
@@ -58,13 +58,13 @@ DO NOT MODIFIY - GENERATED CODE
58
58
  <dependency>
59
59
  <groupId>org.jruby</groupId>
60
60
  <artifactId>jruby</artifactId>
61
- <version>9.1.7.0</version>
61
+ <version>9.1.5.0</version>
62
62
  <type>pom</type>
63
63
  </dependency>
64
64
  <dependency>
65
65
  <groupId>org.processing</groupId>
66
66
  <artifactId>core</artifactId>
67
- <version>3.2.4</version>
67
+ <version>3.2.3</version>
68
68
  </dependency>
69
69
  <dependency>
70
70
  <groupId>org.processing</groupId>
@@ -103,7 +103,7 @@ DO NOT MODIFIY - GENERATED CODE
103
103
  <artifactItem>
104
104
  <groupId>org.processing</groupId>
105
105
  <artifactId>core</artifactId>
106
- <version>3.2.4</version>
106
+ <version>3.2.3</version>
107
107
  <type>jar</type>
108
108
  <outputDirectory>${propane.basedir}/lib</outputDirectory>
109
109
  </artifactItem>
@@ -125,7 +125,7 @@ DO NOT MODIFIY - GENERATED CODE
125
125
  <groupId>org.jogamp.jogl</groupId>
126
126
  <artifactId>jogl-all</artifactId>
127
127
  <version>${jogl.version}</version>
128
- <classifier>natives-linux-armv6hf</classifier>
128
+ <classifier>natives-windows-amd64</classifier>
129
129
  <type>jar</type>
130
130
  <outputDirectory>${propane.basedir}/lib</outputDirectory>
131
131
  </artifactItem>
@@ -134,7 +134,7 @@ DO NOT MODIFIY - GENERATED CODE
134
134
  <artifactId>gluegen-rt</artifactId>
135
135
  <version>${jogl.version}</version>
136
136
  <type>jar</type>
137
- <classifier>natives-linux-armv6hf</classifier>
137
+ <classifier>natives-windows-amd64</classifier>
138
138
  <outputDirectory>${propane.basedir}/lib</outputDirectory>
139
139
  </artifactItem>
140
140
  </artifactItems>
data/propane.gemspec CHANGED
@@ -9,16 +9,16 @@ Gem::Specification.new do |gem|
9
9
  gem.authors = ['monkstone']
10
10
  gem.email = ['mamba2928@yahoo.co.uk']
11
11
  gem.licenses = %w(GPL-3.0 LGPL-2.0)
12
- gem.description = %q{A batteries included version of processing in ruby, MacOS and linux64}
13
- gem.summary = %q{ruby wrapper for processing-3.2.4 on MacOS and linux64 bit only for opengl}
12
+ gem.description = %q{A batteries included version of processing in ruby, Windows 64 bit version}
13
+ gem.summary = %q{A jruby wrapper for processing-3.2.3}
14
14
  gem.homepage = 'https://ruby-processing.github.io/propane/'
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.files << 'lib/propane.jar'
17
- gem.files << 'lib/core-3.2.4.jar'
17
+ gem.files << 'lib/core-3.2.3.jar'
18
18
  gem.files << 'lib/gluegen-rt-2.3.2.jar'
19
19
  gem.files << 'lib/jogl-all-2.3.2.jar'
20
- gem.files << 'lib/gluegen-rt-2.3.2-natives-linux-armv6hf.jar'
21
- gem.files << 'lib/jogl-all-2.3.2-natives-linux-armv6hf.jar'
20
+ gem.files << 'lib/gluegen-rt-2.3.2-natives-windows-amd64.jar'
21
+ gem.files << 'lib/jogl-all-2.3.2-natives-windows-amd64.jar'
22
22
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
23
23
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
24
24
  gem.add_runtime_dependency 'arcball', '~> 0.0.3'
data/vendors/Rakefile CHANGED
@@ -9,7 +9,7 @@ SOUND = 'sound.zip'.freeze
9
9
  SOUND_VERSION = 'v1.3.2' # version 1.3.2
10
10
  VIDEO = 'video-2.zip'
11
11
  VIDEO_VERSION = '2' # version 1.0.1
12
- EXAMPLES = '0.9'.freeze
12
+ EXAMPLES = '0.7'.freeze
13
13
  HOME_DIR = ENV['HOME']
14
14
  MAC_OR_LINUX = /linux|mac|darwin/ =~ RbConfig::CONFIG['host_os']
15
15
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: propane
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0.pre
5
5
  platform: java
6
6
  authors:
7
7
  - monkstone
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-31 00:00:00.000000000 Z
11
+ date: 2016-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arcball
@@ -24,7 +24,7 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.0.3
27
- description: A batteries included version of processing in ruby, MacOS and linux64
27
+ description: A batteries included version of processing in ruby, Windows 64 bit version
28
28
  email:
29
29
  - mamba2928@yahoo.co.uk
30
30
  executables:
@@ -45,11 +45,11 @@ files:
45
45
  - Rakefile
46
46
  - bin/propane
47
47
  - lib/PROCESSING_LICENSE.txt
48
- - lib/core-3.2.4.jar
48
+ - lib/core-3.2.3.jar
49
49
  - lib/export.txt
50
- - lib/gluegen-rt-2.3.2-natives-linux-armv6hf.jar
50
+ - lib/gluegen-rt-2.3.2-natives-windows-amd64.jar
51
51
  - lib/gluegen-rt-2.3.2.jar
52
- - lib/jogl-all-2.3.2-natives-linux-armv6hf.jar
52
+ - lib/jogl-all-2.3.2-natives-windows-amd64.jar
53
53
  - lib/jogl-all-2.3.2.jar
54
54
  - lib/propane.jar
55
55
  - lib/propane.rb
@@ -104,11 +104,6 @@ files:
104
104
  - test/deglut_spec_test.rb
105
105
  - test/math_tool_test.rb
106
106
  - test/respond_to_test.rb
107
- - test/test_create.rb
108
- - test/test_deglut_spec.rb
109
- - test/test_helper.rb
110
- - test/test_math_tool.rb
111
- - test/test_respond_to.rb
112
107
  - test/vecmath_spec_test.rb
113
108
  - vendors/Rakefile
114
109
  homepage: https://ruby-processing.github.io/propane/
@@ -127,23 +122,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
122
  version: '0'
128
123
  required_rubygems_version: !ruby/object:Gem::Requirement
129
124
  requirements:
130
- - - ">="
125
+ - - ">"
131
126
  - !ruby/object:Gem::Version
132
- version: '0'
127
+ version: 1.3.1
133
128
  requirements: []
134
129
  rubyforge_project:
135
- rubygems_version: 2.6.8
130
+ rubygems_version: 2.6.3
136
131
  signing_key:
137
132
  specification_version: 4
138
- summary: ruby wrapper for processing-3.2.4 on MacOS and linux64 bit only for opengl
133
+ summary: A jruby wrapper for processing-3.2.3
139
134
  test_files:
140
135
  - test/create_test.rb
141
136
  - test/deglut_spec_test.rb
142
137
  - test/math_tool_test.rb
143
138
  - test/respond_to_test.rb
144
- - test/test_create.rb
145
- - test/test_deglut_spec.rb
146
- - test/test_helper.rb
147
- - test/test_math_tool.rb
148
- - test/test_respond_to.rb
149
139
  - test/vecmath_spec_test.rb
data/test/test_create.rb DELETED
@@ -1,91 +0,0 @@
1
- # frozen_string_literal: true
2
- require_relative 'test_helper'
3
-
4
-
5
- require_relative '../lib/propane/creators/sketch_class'
6
-
7
- CLASS_SKETCH = <<~CODE
8
- # frozen_string_literal: false
9
- require 'propane'
10
-
11
- class FredSketch < Propane::App
12
- def settings
13
- size 200, 200
14
- end
15
-
16
- def setup
17
- sketch_title 'Fred Sketch'
18
- end
19
-
20
- def draw
21
-
22
- end
23
- end
24
-
25
- FredSketch.new
26
-
27
- CODE
28
-
29
- BARE_SKETCH = <<~CODE
30
- def settings
31
- size 200, 200, P2D
32
- end
33
-
34
- def setup
35
- sketch_title 'Fred Sketch'
36
- end
37
-
38
- def draw
39
-
40
- end
41
-
42
- CODE
43
-
44
- class SketchClassTest < Minitest::Test
45
-
46
- def setup
47
- @basic = SketchClass.new(name: 'fred_sketch', width: 200, height: 200)
48
- @sketch = SketchClass.new(name: 'fred_sketch', width: 200, height: 200, mode: 'p2d')
49
- end
50
-
51
- def test_class
52
- result = CLASS_SKETCH.split(/\n/, -1)
53
- class_lines = @sketch.lines
54
- class_lines.each_with_index do |line, i|
55
- assert_equal result[i], line
56
- end
57
- end
58
-
59
- def test_indent
60
- assert_equal ' indent', @sketch.indent('indent')
61
- end
62
-
63
- def test_size
64
- assert_equal ' size 200, 200, P2D', @sketch.size
65
- assert_equal ' size 200, 200', @basic.size
66
- end
67
-
68
- def test_sketch_title
69
- assert_equal " sketch_title 'Fred Sketch'", @sketch.sketch_title
70
- end
71
-
72
- def test_class
73
- assert_equal "FredSketch", @sketch.sketch_class
74
- end
75
-
76
- def test_class_new
77
- assert_equal "FredSketch.new", @sketch.sketch_new
78
- end
79
-
80
- def test_method_lines
81
- result = CLASS_SKETCH.split(/\n/, -1)
82
- @basic.method_lines('settings', @basic.size).each_with_index do |line, i|
83
- assert_equal result[i + 4], line
84
- end
85
- end
86
-
87
-
88
- def test_sketch_class
89
- assert_equal "class FredSketch < Propane::App", @basic.class_sketch
90
- end
91
- end
@@ -1,25 +0,0 @@
1
- # frozen_string_literal: true
2
- require_relative 'test_helper'
3
-
4
- Java::Monkstone::PropaneLibrary.load(JRuby.runtime)
5
-
6
- Dir.chdir(File.dirname(__FILE__))
7
-
8
- class DeglutTest < Minitest::Test
9
- attr_reader :to_radian
10
-
11
- def setup
12
- @to_radian = Math::PI / 180
13
- end
14
-
15
- def test_cos_sin
16
- (-720..720).step(1) do |deg|
17
- sine = DegLut.sin(deg)
18
- deg_sin = Math.sin(deg * to_radian)
19
- assert_in_delta(sine, deg_sin, delta = 0.000001)
20
- cosine = DegLut.cos(deg)
21
- deg_cos = Math.cos(deg * to_radian)
22
- assert_in_delta(cosine, deg_cos, delta = 0.000001)
23
- end
24
- end
25
- end
data/test/test_helper.rb DELETED
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
- gem 'minitest' # don't use bundled minitest
3
- require 'minitest/autorun'
4
- require 'minitest/pride'
5
- require_relative '../lib/propane'
@@ -1,71 +0,0 @@
1
- # frozen_string_literal: true
2
- require_relative 'test_helper'
3
-
4
- Java::Monkstone::PropaneLibrary.new.load(JRuby.runtime, false)
5
-
6
- Dir.chdir(File.dirname(__FILE__))
7
-
8
- class MathToolTest < Minitest::Test
9
- include MathTool
10
- def test_map1d
11
- x = [0, 5, 7.5, 10]
12
- range1 = (0..10)
13
- range2 = (100..1)
14
- range3 = (0..10)
15
- range4 = (5..105)
16
- assert_in_delta(map1d(x[0], range1, range2), 100, delta = 0.00001, msg = 'map to first')
17
- assert_in_delta(map1d(x[1], range1, range2), 50.5, delta = 0.00001, msg = 'map to reversed intermediate')
18
- assert_in_delta(map1d(x[2], range3, range4), 80.0, delta = 0.00001, msg = 'map to intermediate')
19
- assert_in_delta(map1d(x[3], range1, range2), 1, delta = 0.00001, msg = 'map to last')
20
- end
21
-
22
- def test_p5map # as map1d except not using range input
23
- x = [0, 5, 7.5, 10]
24
- range1 = (0..10)
25
- range2 = (100..1)
26
- range3 = (0..10)
27
- range4 = (5..105)
28
- assert_in_delta(p5map(x[0], range1.first, range1.last, range2.first, range2.last), 100, delta = 0.00001)
29
- assert_in_delta(p5map(x[1], range1.first, range1.last, range2.first, range2.last), 50.5, delta = 0.00001)
30
- assert_in_delta(p5map(x[2], range3.first, range3.last, range4.first, range4.last), 80.0, delta = 0.00001)
31
- assert_in_delta(p5map(x[3], range1.first, range1.last, range2.first, range2.last), 1, delta = 0.00001)
32
- end
33
-
34
- def test_norm
35
- x = [10, 140, 210]
36
- start0, last0 = 30, 200
37
- start_int, last_int = 0, 200
38
- assert_in_delta(norm(x[0], start0, last0), -0.11764705882352941, delta = 0.00001, msg = 'unclamped map')
39
- assert_in_delta(norm(x[1], start_int, last_int), 0.7, delta = 0.00001, msg = 'map to intermediate')
40
- assert_in_delta(norm(x[2], start_int, last_int), 1.05, delta = 0.00001, msg = 'unclamped map')
41
- end
42
-
43
- def test_norm_strict
44
- x = [10, 140, 210]
45
- assert_in_delta(norm_strict(x[2], x[0], x[1]), 1.0, delta = 0.00001, msg = 'clamped map to 0..1.0')
46
- assert_in_delta(norm_strict(x[2], x[1], x[0]), 0.0, delta = 0.00001, msg = 'clamped map to 0..1.0')
47
- assert_in_delta(norm_strict(x[1], x[0], x[2]), 0.65, delta = 0.00001, msg = 'clamped map to 0..1.0')
48
- end
49
-
50
- def test_lerp # behaviour is deliberately different to processing which is unclamped
51
- x = [0.5, 0.8, 2.0]
52
- start0, last0 = 300, 200
53
- start_int, last_int = 0, 200
54
- assert_in_delta(lerp(start0, last0, x[0]), 250, delta = 0.00001, msg = 'produces a intermediate value of a reversed range')
55
- assert_in_delta(lerp(start_int, last_int, x[1]), 160, delta = 0.00001, msg = 'lerps to an intermediate value')
56
- assert_in_delta(lerp(start_int, last_int, x[2]), 200, delta = 0.00001, msg = 'lerps to the last value of a range')
57
- end
58
-
59
- def test_constrain
60
- x_int = [15, 2_500, -2_500]
61
- start_int, last_int = 0, 200
62
- assert_in_delta(constrain(x_int[0], start_int, last_int), 15, delta = 0.00001)
63
- assert_in_delta(constrain(x_int[1], start_int, last_int), 200, delta = 0.00001)
64
- assert_in_delta(constrain(x_int[2], start_int, last_int), 0, delta = 0.00001)
65
- xf = [15.0, 2_500.0, -2_500.0]
66
- startf, lastf = 0, 200.0
67
- assert_in_delta(constrain(xf[0], startf, lastf), 15.0, delta = 0.00001, msg = 'constrain to 0..200')
68
- assert_in_delta(constrain(xf[1], startf, lastf), 200.0, delta = 0.00001, msg = 'constrain to 0..200')
69
- assert_in_delta(constrain(xf[2], startf, lastf), 0.0, delta = 0.00001, msg = 'constrain to 0..200')
70
- end
71
- end
@@ -1,213 +0,0 @@
1
- # frozen_string_literal: true
2
- require_relative 'test_helper'
3
-
4
- METHODS = %i(
5
- alpha
6
- ambient
7
- ambient_light
8
- apply_matrix
9
- arc
10
- background
11
- begin_camera
12
- begin_contour
13
- begin_raw
14
- begin_record
15
- begin_shape
16
- bezier
17
- bezier_detail
18
- bezier_point
19
- bezier_tangent
20
- bezier_vertex
21
- blend
22
- blend_mode
23
- blue
24
- box
25
- brightness
26
- camera
27
- color
28
- color_mode
29
- copy
30
- create_font
31
- create_graphics
32
- create_image
33
- create_input
34
- create_output
35
- create_reader
36
- create_shape
37
- create_writer
38
- cursor
39
- curve
40
- curve_detail
41
- curve_point
42
- curve_tangent
43
- curve_tightness
44
- curve_vertex
45
- directional_light
46
- ellipse
47
- ellipse_mode
48
- emissive
49
- end_camera
50
- end_contour
51
- end_raw
52
- end_record
53
- end_shape
54
- fill
55
- filter
56
- focused
57
- frame_count
58
- frame_rate
59
- frame_rate
60
- frustum
61
- get
62
- green
63
- height
64
- hue
65
- image
66
- image_mode
67
- key
68
- key_code
69
- key_pressed
70
- key_pressed?
71
- key_released
72
- key_typed
73
- lerp_color
74
- light_falloff
75
- light_specular
76
- lights
77
- line
78
- load_bytes
79
- load_font
80
- load_image
81
- load_pixels
82
- load_shader
83
- load_shape
84
- load_strings
85
- load_table
86
- load_xml
87
- model_x
88
- model_y
89
- model_z
90
- mouse_button
91
- mouse_clicked
92
- mouse_dragged
93
- mouse_moved
94
- mouse_pressed
95
- mouse_pressed?
96
- mouse_released
97
- mouse_x
98
- mouse_y
99
- no_cursor
100
- no_fill
101
- no_lights
102
- no_smooth
103
- no_stroke
104
- no_tint
105
- noise
106
- noise_detail
107
- noise_seed
108
- normal
109
- ortho
110
- perspective
111
- pixels
112
- pmouse_x
113
- pmouse_y
114
- point
115
- point_light
116
- pop_matrix
117
- print_camera
118
- print_matrix
119
- print_projection
120
- push_matrix
121
- quad
122
- quadratic_vertex
123
- random
124
- random_seed
125
- rect
126
- rect_mode
127
- red
128
- request_image
129
- reset_matrix
130
- reset_shader
131
- rotate
132
- rotate_x
133
- rotate_y
134
- rotate_z
135
- saturation
136
- save
137
- save_bytes
138
- save_frame
139
- save_stream
140
- save_strings
141
- scale
142
- screen_x
143
- screen_y
144
- screen_z
145
- select_folder
146
- select_input
147
- select_output
148
- set
149
- shader
150
- shape
151
- shape_mode
152
- shear_x
153
- shear_y
154
- shininess
155
- sketch_title
156
- size
157
- smooth
158
- specular
159
- sphere
160
- sphere_detail
161
- spot_light
162
- stroke
163
- stroke_cap
164
- stroke_join
165
- stroke_weight
166
- text_align
167
- text_ascent
168
- text_descent
169
- text_font
170
- text_leading
171
- text_mode
172
- text_size
173
- text_width
174
- texture
175
- texture_mode
176
- texture_wrap
177
- tint
178
- translate
179
- triangle
180
- update_pixels
181
- vertex
182
- width
183
- )
184
-
185
- class TestSketch < Propane::App
186
- def settings
187
- size 100, 100
188
- end
189
-
190
- def setup
191
- sketch_title 'Sketch Test'
192
- end
193
-
194
- def draw
195
- exit if frame_count > 30
196
- end
197
- end
198
-
199
- class SpecTest < Minitest::Test
200
- def setup
201
- @processing_sketch = TestSketch.new
202
- end
203
-
204
- def test_respond
205
- METHODS.each do |method_string|
206
- assert_respond_to @processing_sketch, method_string
207
- end
208
- end
209
-
210
- def tear_down
211
- @processing_sketch = nil?
212
- end
213
- end