Skip to content

Commit eff5fa5

Browse files
committed
about time we updated to 1.0
1 parent 5c196dd commit eff5fa5

File tree

7 files changed

+40
-37
lines changed

7 files changed

+40
-37
lines changed

arcball.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Gem::Specification.new do |s|
1010
s.extra_rdoc_files = ['README.md', 'LICENSE.md']
1111
s.authors = ['Martin Prout']
1212
s.date = %q{2016-03-13}
13-
s.description = %q{A ArcBall in java for processing on ruby}
13+
s.description = %q{A ArcBall in java for propane}
1414
s.summary = %q{Provides arcball functionality to processing, from a ruby environment}
1515
s.email = %q{[email protected]}
1616
s.files = ['Rakefile', 'lib/arcball.rb', 'lib/arcball.jar', 'lib/arcball/version.rb']
1717
s.homepage = %q{http://rubygems.org/gems/arcball}
1818
s.require_paths = ['lib']
19-
s.add_development_dependency 'rake', '~> 10.0'
19+
s.add_development_dependency 'rake', '~> 12'
2020
s.platform='java'
2121
s.rubygems_version = %q{2.5.2}
2222
end

lib/arcball.jar

371 Bytes
Binary file not shown.

lib/arcball/version.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# encoding: utf-8
21
# frozen_string_literal: true
32
module ArcBall
4-
VERSION = '0.0.2'.freeze
3+
VERSION = '1.0'.freeze
54
end

pom.rb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'fileutils'
22
project 'arcball', 'https://github.com/ruby-processing/ArcBall' do
33
model_version '4.0.0'
4-
id 'arcball:arcball', '0.0.2'
4+
id 'arcball:arcball', '1.0.0'
55
packaging 'jar'
66
description 'arcball for arcball'
77
organization 'ruby-processing', 'https://ruby-processing.github.io'
@@ -11,42 +11,42 @@
1111
roles 'developer'
1212
end
1313
end
14-
14+
1515
issue_management 'https://github.com/monkstone/arcball/issues', 'Github'
16-
16+
1717
source_control(
1818
url: 'https://github.com/ruby-processing/ArcBall',
1919
connection: 'scm:git:git://github.com/ruby-processing/ArcBall',
2020
developer_connection: 'scm:git:[email protected]/ruby-processing/ArcBall.git'
2121
)
22-
22+
2323
properties('source.directory' => 'src',
2424
'arcball.basedir' => '${project.basedir}',
2525
'polyglot.dump.pom' => 'pom.xml',
26-
'maven.compiler.source' => '1.7',
26+
'maven.compiler.source' => '1.8',
2727
'project.build.sourceEncoding' => 'utf-8',
28-
'maven.compiler.target' => '1.7',
28+
'maven.compiler.target' => '1.8',
2929
'jruby.api' => 'http://jruby.org/apidocs/',
3030
'processing.api' => 'http://processing.github.io/processing-javadocs/core/',
3131
'jruby.api' => 'http://jruby.org/apidocs/',
3232
)
33-
34-
pom('org.jruby:jruby:9.0.5.0')
35-
jar('org.processing:core:2.2.1')
36-
33+
34+
pom('org.jruby:jruby:9.1.8.0')
35+
jar('org.processing:core:3.2.3')
36+
3737
plugin_management do
3838
plugin :resources, '2.6'
3939
plugin :dependency, '2.10'
40-
41-
plugin( :compiler, '3.3',
40+
41+
plugin( :compiler, '3.5.1',
4242
source: '${maven.compiler.source}',
4343
target: '${maven.compiler.target}'
4444
)
45-
plugin( :javadoc, '2.10.3',
45+
plugin( :javadoc, '2.10.4',
4646
detect_offline_links: 'false',
4747
links: ['${jruby.api}', '${processing.api}']
4848
)
49-
plugin( :jar, '2.6',
49+
plugin( :jar, '3.0.2',
5050
archive: { manifestFile: 'MANIFEST.MF' }
5151
)
5252
end

pom.xml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ DO NOT MODIFIY - GENERATED CODE
1111
<modelVersion>4.0.0</modelVersion>
1212
<groupId>arcball</groupId>
1313
<artifactId>arcball</artifactId>
14-
<version>0.0.2</version>
14+
<version>1.0.0</version>
1515
<name>arcball</name>
1616
<description>arcball for arcball</description>
1717
<url>https://github.com/ruby-processing/ArcBall</url>
@@ -43,21 +43,21 @@ DO NOT MODIFIY - GENERATED CODE
4343
<polyglot.dump.pom>pom.xml</polyglot.dump.pom>
4444
<arcball.basedir>${project.basedir}</arcball.basedir>
4545
<project.build.sourceEncoding>utf-8</project.build.sourceEncoding>
46-
<maven.compiler.source>1.7</maven.compiler.source>
46+
<maven.compiler.source>1.8</maven.compiler.source>
4747
<jruby.api>http://jruby.org/apidocs/</jruby.api>
48-
<maven.compiler.target>1.7</maven.compiler.target>
48+
<maven.compiler.target>1.8</maven.compiler.target>
4949
</properties>
5050
<dependencies>
5151
<dependency>
5252
<groupId>org.jruby</groupId>
5353
<artifactId>jruby</artifactId>
54-
<version>9.0.5.0</version>
54+
<version>9.1.8.0</version>
5555
<type>pom</type>
5656
</dependency>
5757
<dependency>
5858
<groupId>org.processing</groupId>
5959
<artifactId>core</artifactId>
60-
<version>2.2.1</version>
60+
<version>3.2.3</version>
6161
</dependency>
6262
</dependencies>
6363
<build>
@@ -76,17 +76,17 @@ DO NOT MODIFIY - GENERATED CODE
7676
</plugin>
7777
<plugin>
7878
<artifactId>maven-compiler-plugin</artifactId>
79-
<version>3.3</version>
79+
<version>3.5.1</version>
8080
<configuration>
8181
<source>${maven.compiler.source}</source>
8282
<target>${maven.compiler.target}</target>
8383
</configuration>
8484
</plugin>
8585
<plugin>
8686
<artifactId>maven-javadoc-plugin</artifactId>
87-
<version>2.10.3</version>
87+
<version>2.10.4</version>
8888
<configuration>
89-
<detect_offline_links>false</detect_offline_links>
89+
<detectOfflineLinks>false</detectOfflineLinks>
9090
<links>
9191
<link>${jruby.api}</link>
9292
<link>${processing.api}</link>
@@ -95,7 +95,7 @@ DO NOT MODIFIY - GENERATED CODE
9595
</plugin>
9696
<plugin>
9797
<artifactId>maven-jar-plugin</artifactId>
98-
<version>2.6</version>
98+
<version>3.0.2</version>
9999
<configuration>
100100
<archive>
101101
<manifestFile>MANIFEST.MF</manifestFile>

src/monkstone/arcball/Arcball.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,8 @@ public class Arcball {
6868
* @param radius double radius of arcball
6969
*/
7070
public Arcball(PApplet parent, double center_x, double center_y, double radius) {
71-
this.zoomWheelHandler = new WheelHandler() {
72-
@Override
73-
public void handleWheel(int delta) {
74-
zoom += delta * 0.05;
75-
}
71+
this.zoomWheelHandler = (int delta) -> {
72+
zoom += delta * 0.05;
7673
};
7774
this.parent = parent;
7875
this.center_x = center_x;

src/monkstone/arcball/Rarcball.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
import org.jruby.Ruby;
2121
import org.jruby.RubyClass;
22+
import org.jruby.RubyFloat;
23+
import org.jruby.RubyFixnum;
2224
import org.jruby.RubyModule;
2325
import org.jruby.RubyObject;
2426
import org.jruby.RubySymbol;
@@ -69,15 +71,20 @@ public static void init(ThreadContext context, IRubyObject self, IRubyObject arg
6971
int count = Arity.checkArgumentCount(context.getRuntime(), args, 1, 4);
7072
if (count == 4) {
7173
PApplet parent = (PApplet) args[0].toJava(PApplet.class);
72-
double cx = (double) args[1].toJava(Double.class);
73-
double cy = (double) args[2].toJava(Double.class);
74-
double radius = (double) args[3].toJava(Double.class);
74+
double cx = (args[1] instanceof RubyFloat)
75+
? ((RubyFloat) args[1]).getValue() : ((RubyFixnum) args[1]).getDoubleValue();
76+
double cy = (args[2] instanceof RubyFloat)
77+
? ((RubyFloat) args[2]).getValue() : ((RubyFixnum) args[2]).getDoubleValue();
78+
double radius = (args[3] instanceof RubyFloat)
79+
? ((RubyFloat) args[3]).getValue() : ((RubyFixnum) args[3]).getDoubleValue();
7580
new Arcball(parent, cx, cy, radius).setActive(true);
7681
}
7782
if (count == 3) {
7883
PApplet parent = (PApplet) args[0].toJava(PApplet.class);
79-
double cx = (double) args[1].toJava(Double.class);
80-
double cy = (double) args[2].toJava(Double.class);
84+
double cx = (args[1] instanceof RubyFloat)
85+
? ((RubyFloat) args[1]).getValue() : ((RubyFixnum) args[1]).getDoubleValue();
86+
double cy = (args[2] instanceof RubyFloat)
87+
? ((RubyFloat) args[2]).getValue() : ((RubyFixnum) args[2]).getDoubleValue();
8188
new Arcball(parent, cx, cy, parent.width * 0.8f).setActive(true);
8289
}
8390
if (count == 1) {

0 commit comments

Comments
 (0)