toxiclibs 0.9.3 → 1.0.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 +5 -5
- data/.mvn/extensions.xml +1 -1
- data/CHANGELOG.md +3 -1
- data/README.md +2 -2
- data/lib/toxiclibs/version.rb +1 -1
- data/pom.rb +5 -5
- data/pom.xml +5 -5
- data/src/com/toxi/net/UDPSyncServer.java +33 -33
- data/src/toxi/processing/ToxiclibsSupport.java +3 -3
- data/toxiclibs.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bb631f45b5fb8df9acc6abbb1c03ddd8427c71d541601955b098934b6c9bff72
|
4
|
+
data.tar.gz: 23a64c5c0038efed7f914485f36277feedcbbc3871d6ea965afcee046228fedc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21c40b1481a4f4265f63d3d06a04c62230f1cb78d909f8a296d5c8b21cc47cbc82b4db3b8c73789eb861b63854ccacb83704fada053702ae7b83c9f17f278ab6
|
7
|
+
data.tar.gz: 8eb685db0276ca3b84b76c05e887ca65e50011057e35de55b2a65ae7061146535586ebfdebd185a4cfc51767fa93ee6a1a6afb5fc01645840b186f8f64717298
|
data/.mvn/extensions.xml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
|
2
|
+
**v1.0.0** About time we got to 1.0.0 bump processing to 3.3.4
|
3
|
+
|
2
4
|
**v0.9.3** Bump processing version to processing-3.3.2.
|
3
5
|
|
4
|
-
**v0.9.2** Bump processing version, add `to_ruby_string` method to `ColorList` see examples, allow use of `TColor` without `Toxi` prefix. Removed audio.
|
6
|
+
**v0.9.2** Bump processing version, add `to_ruby_string` method to `ColorList` see examples, allow use of `TColor` without `Toxi` prefix. Removed audio.
|
5
7
|
|
6
8
|
**v0.9.1** Make it easier to load PerlinNoise and SimplexNoise
|
7
9
|
|
data/README.md
CHANGED
@@ -8,10 +8,10 @@
|
|
8
8
|
gem install toxiclibs
|
9
9
|
```
|
10
10
|
|
11
|
-
### NB: Use version 0.4 for ruby-processing, and 0.
|
11
|
+
### NB: Use version 0.4 for ruby-processing, and 1.0.0 for propane and JRubyArt
|
12
12
|
|
13
13
|
NB: Build is only failing because current version of processing is not available at maven central.
|
14
|
-
This gem provides Karsten Schmidts (aka toxi, @postspectacular) toxiclibs jars for JRubyArt. To compile the gem follow the instructions for [JRubyArt][]. Most parts of toxiclibs API is exposed in the latest version, (but only a few examples are included) in principle it should be possible to make all available!!! For this demonstration I have used up to date source code for version 21, since [toxis final release][] has not yet been released (although [Dan Shiffman][] has released a version for processing-3.0+). There are reported to be number of outstanding bugs with toxiclibs, if they affect you report it [here][] (or better fix them yourself and submit a pull request).
|
14
|
+
This gem provides Karsten Schmidts (aka toxi, @postspectacular) toxiclibs jars for JRubyArt. To compile the gem follow the instructions for [JRubyArt][]. Most parts of toxiclibs API is exposed in the latest version, (but only a few examples are included) in principle it should be possible to make all available!!! For this demonstration I have used up to date source code for version 21, since [toxis final release][] has not yet been released (although [Dan Shiffman][] has released a version for processing-3.0+). There are reported to be number of outstanding bugs with toxiclibs, if they affect you report it [here][] (or better fix them yourself and submit a pull request).
|
15
15
|
|
16
16
|

|
17
17
|
|
data/lib/toxiclibs/version.rb
CHANGED
data/pom.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
project 'toxiclibs' do
|
2
2
|
|
3
3
|
model_version '4.0.0'
|
4
|
-
id 'ruby-processing:toxiclibs:0.
|
4
|
+
id 'ruby-processing:toxiclibs:1.0.0'
|
5
5
|
packaging 'jar'
|
6
6
|
|
7
7
|
description 'toxiclibs-library for JRubyArt'
|
@@ -29,17 +29,17 @@ project 'toxiclibs' do
|
|
29
29
|
)
|
30
30
|
|
31
31
|
jar 'args4j:args4j:2.0.31'
|
32
|
-
jar 'org.processing:core:3.3.
|
32
|
+
jar 'org.processing:core:3.3.6'
|
33
33
|
|
34
|
-
plugin( :compiler, '3.
|
34
|
+
plugin( :compiler, '3.7.0',
|
35
35
|
'source' => '1.8',
|
36
36
|
'target' => '1.8' )
|
37
37
|
plugin( :jar, '3.0.2',
|
38
38
|
'archive' => {
|
39
39
|
'manifestFile' => 'MANIFEST.MF'
|
40
40
|
} )
|
41
|
-
plugin :resources, '2
|
42
|
-
plugin :dependency, '2
|
41
|
+
plugin :resources, '3.0.2'
|
42
|
+
plugin :dependency, '3.0.2' do
|
43
43
|
execute_goals( :id => 'default-cli',
|
44
44
|
'artifactItems' => [ { 'groupId' => 'args4j',
|
45
45
|
'artifactId' => 'args4j',
|
data/pom.xml
CHANGED
@@ -11,7 +11,7 @@ DO NOT MODIFIY - GENERATED CODE
|
|
11
11
|
<modelVersion>4.0.0</modelVersion>
|
12
12
|
<groupId>ruby-processing</groupId>
|
13
13
|
<artifactId>toxiclibs</artifactId>
|
14
|
-
<version>0.
|
14
|
+
<version>1.0.0</version>
|
15
15
|
<name>toxiclibs</name>
|
16
16
|
<description>toxiclibs-library for JRubyArt</description>
|
17
17
|
<organization>
|
@@ -58,7 +58,7 @@ DO NOT MODIFIY - GENERATED CODE
|
|
58
58
|
<dependency>
|
59
59
|
<groupId>org.processing</groupId>
|
60
60
|
<artifactId>core</artifactId>
|
61
|
-
<version>3.3.
|
61
|
+
<version>3.3.6</version>
|
62
62
|
</dependency>
|
63
63
|
</dependencies>
|
64
64
|
<build>
|
@@ -68,7 +68,7 @@ DO NOT MODIFIY - GENERATED CODE
|
|
68
68
|
<plugins>
|
69
69
|
<plugin>
|
70
70
|
<artifactId>maven-compiler-plugin</artifactId>
|
71
|
-
<version>3.
|
71
|
+
<version>3.7.0</version>
|
72
72
|
<configuration>
|
73
73
|
<source>1.8</source>
|
74
74
|
<target>1.8</target>
|
@@ -85,11 +85,11 @@ DO NOT MODIFIY - GENERATED CODE
|
|
85
85
|
</plugin>
|
86
86
|
<plugin>
|
87
87
|
<artifactId>maven-resources-plugin</artifactId>
|
88
|
-
<version>2
|
88
|
+
<version>3.0.2</version>
|
89
89
|
</plugin>
|
90
90
|
<plugin>
|
91
91
|
<artifactId>maven-dependency-plugin</artifactId>
|
92
|
-
<version>2
|
92
|
+
<version>3.0.2</version>
|
93
93
|
<executions>
|
94
94
|
<execution>
|
95
95
|
<id>default-cli</id>
|
@@ -102,7 +102,7 @@ public class UDPSyncServer {
|
|
102
102
|
*/
|
103
103
|
protected int frameCount;
|
104
104
|
|
105
|
-
private static Logger
|
105
|
+
private static Logger LOGGER;
|
106
106
|
|
107
107
|
/**
|
108
108
|
* Optional server event listener
|
@@ -147,9 +147,9 @@ public class UDPSyncServer {
|
|
147
147
|
try {
|
148
148
|
if (configFile != null)
|
149
149
|
config.load(new FileInputStream(configFile));
|
150
|
-
|
151
|
-
|
152
|
-
|
150
|
+
LOGGER = Logger.getLogger("com.postspectacular");
|
151
|
+
LOGGER.addHandler(new ConsoleHandler());
|
152
|
+
LOGGER.setLevel(Level.CONFIG);
|
153
153
|
configure(config);
|
154
154
|
run();
|
155
155
|
} catch (FileNotFoundException e) {
|
@@ -175,8 +175,8 @@ public class UDPSyncServer {
|
|
175
175
|
connectionTimeOut = config.getInt("udp.ttl", connectionTimeOut);
|
176
176
|
UDPConnection.setTTL(connectionTimeOut);
|
177
177
|
receiveTimeOut = config.getInt("udp.receivetimeout", receiveTimeOut);
|
178
|
-
if (
|
179
|
-
|
178
|
+
if (LOGGER != null) {
|
179
|
+
LOGGER.log(Level.INFO, "configured server... port:{0} clients:{1} fps:{2} ttl:{3} rto:{4}", new Object[]{port, numClients, frameRate, connectionTimeOut, receiveTimeOut});
|
180
180
|
}
|
181
181
|
setState(ServerState.WAITING_FOR_CLIENTS);
|
182
182
|
}
|
@@ -188,8 +188,8 @@ public class UDPSyncServer {
|
|
188
188
|
public void run() {
|
189
189
|
try {
|
190
190
|
socket = new DatagramSocket(port);
|
191
|
-
if (
|
192
|
-
|
191
|
+
if (LOGGER != null)
|
192
|
+
LOGGER.log(Level.INFO, "creating socket @ port {0}", port);
|
193
193
|
if (listener != null) {
|
194
194
|
listener.serverStarted();
|
195
195
|
}
|
@@ -197,8 +197,8 @@ public class UDPSyncServer {
|
|
197
197
|
switch (state) {
|
198
198
|
|
199
199
|
case WAITING_FOR_CLIENTS:
|
200
|
-
if (
|
201
|
-
|
200
|
+
if (LOGGER != null)
|
201
|
+
LOGGER.info("Server running, waiting for connections...");
|
202
202
|
// disable timeout, i.e socket will block indefinitely
|
203
203
|
// until
|
204
204
|
// a packet is received
|
@@ -224,8 +224,8 @@ public class UDPSyncServer {
|
|
224
224
|
UDPConnection conn = iter.next();
|
225
225
|
if (!conn.isAlive()) {
|
226
226
|
iter.remove();
|
227
|
-
if (
|
228
|
-
|
227
|
+
if (LOGGER != null)
|
228
|
+
LOGGER.log(Level.WARNING, "{0} disconnected", conn);
|
229
229
|
if (listener != null)
|
230
230
|
listener.clientDisconnected(conn);
|
231
231
|
}
|
@@ -252,8 +252,8 @@ public class UDPSyncServer {
|
|
252
252
|
conn = new UDPConnection(ip, portDP);
|
253
253
|
conn.send(socket, getSyncPayload());
|
254
254
|
connections.put(connID, conn);
|
255
|
-
if (
|
256
|
-
|
255
|
+
if (LOGGER != null)
|
256
|
+
LOGGER.log(Level.FINE, "re-adding connection: {0}", conn);
|
257
257
|
}
|
258
258
|
if (listener != null)
|
259
259
|
listener.clientUpdated(conn,
|
@@ -267,13 +267,13 @@ public class UDPSyncServer {
|
|
267
267
|
long delta = (endSynch - beginSynch) / 1000000;
|
268
268
|
if (delta < frameDuration) {
|
269
269
|
int sleep = frameDuration - (int) delta;
|
270
|
-
if (
|
271
|
-
|
270
|
+
if (LOGGER != null)
|
271
|
+
LOGGER.log(Level.FINEST, "sleeping: {0}", sleep);
|
272
272
|
Thread.sleep(sleep);
|
273
273
|
}
|
274
274
|
} else {
|
275
|
-
if (
|
276
|
-
|
275
|
+
if (LOGGER != null)
|
276
|
+
LOGGER.info("all clients disconnected");
|
277
277
|
setState(ServerState.WAITING_FOR_CLIENTS);
|
278
278
|
}
|
279
279
|
}
|
@@ -281,8 +281,8 @@ public class UDPSyncServer {
|
|
281
281
|
} catch (IOException | InterruptedException e) {
|
282
282
|
handleException(e);
|
283
283
|
} finally {
|
284
|
-
if (
|
285
|
-
|
284
|
+
if (LOGGER != null)
|
285
|
+
LOGGER.info("server shutting down...");
|
286
286
|
if (socket != null)
|
287
287
|
socket.close();
|
288
288
|
}
|
@@ -302,8 +302,8 @@ public class UDPSyncServer {
|
|
302
302
|
try {
|
303
303
|
DatagramPacket receivePacket = new DatagramPacket(receiveData,
|
304
304
|
receiveData.length);
|
305
|
-
if (
|
306
|
-
|
305
|
+
if (LOGGER != null)
|
306
|
+
LOGGER.log(Level.INFO, "waiting for {0} more clients to reconnect...", (numClients - connections.size()));
|
307
307
|
socket.receive(receivePacket);
|
308
308
|
InetAddress ip = receivePacket.getAddress();
|
309
309
|
int portDP = receivePacket.getPort();
|
@@ -311,14 +311,14 @@ public class UDPSyncServer {
|
|
311
311
|
if (connections.get(connID) == null) {
|
312
312
|
if (connections.isEmpty()) {
|
313
313
|
frameCount = 0;
|
314
|
-
if (
|
315
|
-
|
314
|
+
if (LOGGER != null)
|
315
|
+
LOGGER.info("resetting frame count");
|
316
316
|
}
|
317
317
|
UDPConnection conn = new UDPConnection(ip, portDP);
|
318
318
|
connections.put(connID, conn);
|
319
319
|
conn.send(socket, getSyncPayload());
|
320
|
-
if (
|
321
|
-
|
320
|
+
if (LOGGER != null)
|
321
|
+
LOGGER.log(Level.FINE, "added new connection: {0}", conn);
|
322
322
|
if (listener != null) {
|
323
323
|
listener.clientConnected(conn);
|
324
324
|
}
|
@@ -332,8 +332,8 @@ public class UDPSyncServer {
|
|
332
332
|
private void handleException(Exception e) {
|
333
333
|
if (listener != null)
|
334
334
|
listener.serverError(e);
|
335
|
-
if (
|
336
|
-
|
335
|
+
if (LOGGER != null)
|
336
|
+
LOGGER.log(Level.SEVERE, "Server error", e);
|
337
337
|
else
|
338
338
|
e.printStackTrace();
|
339
339
|
}
|
@@ -381,8 +381,8 @@ public class UDPSyncServer {
|
|
381
381
|
*/
|
382
382
|
private void setState(ServerState s) {
|
383
383
|
state = s;
|
384
|
-
if (
|
385
|
-
|
384
|
+
if (LOGGER != null)
|
385
|
+
LOGGER.log(Level.CONFIG, "new server state: {0}", state);
|
386
386
|
if (listener != null)
|
387
387
|
listener.serverStateChanged(s);
|
388
388
|
}
|
@@ -434,7 +434,7 @@ public class UDPSyncServer {
|
|
434
434
|
* @param logger
|
435
435
|
*/
|
436
436
|
public void setLogger(Logger logger) {
|
437
|
-
UDPSyncServer.
|
437
|
+
UDPSyncServer.LOGGER = logger;
|
438
438
|
}
|
439
439
|
|
440
440
|
/**
|
@@ -444,7 +444,7 @@ public class UDPSyncServer {
|
|
444
444
|
*/
|
445
445
|
public void setListener(ServerListener listener) {
|
446
446
|
this.listener = listener;
|
447
|
-
if (
|
448
|
-
|
447
|
+
if (LOGGER != null)
|
448
|
+
LOGGER.log(Level.INFO, "new server listener: {0}", listener);
|
449
449
|
}
|
450
450
|
}
|
@@ -73,7 +73,7 @@ public class ToxiclibsSupport {
|
|
73
73
|
/**
|
74
74
|
*
|
75
75
|
*/
|
76
|
-
protected static final Logger
|
76
|
+
protected static final Logger LOGGER = Logger
|
77
77
|
.getLogger(ToxiclibsSupport.class.getName());
|
78
78
|
|
79
79
|
/**
|
@@ -237,7 +237,7 @@ public class ToxiclibsSupport {
|
|
237
237
|
gfx.ellipse(e.x - r.x, e.y - r.y, r.x * 2, r.y * 2);
|
238
238
|
break;
|
239
239
|
default:
|
240
|
-
|
240
|
+
LOGGER.log(Level.WARNING, "invalid ellipse mode: {0}", gfx.ellipseMode);
|
241
241
|
}
|
242
242
|
}
|
243
243
|
|
@@ -968,7 +968,7 @@ public class ToxiclibsSupport {
|
|
968
968
|
gfx.rect(r.x + rw, r.y + rh, rw, rh);
|
969
969
|
break;
|
970
970
|
default:
|
971
|
-
|
971
|
+
LOGGER.log(Level.WARNING, "invalid rect mode: {0}", gfx.rectMode);
|
972
972
|
}
|
973
973
|
}
|
974
974
|
|
data/toxiclibs.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.extra_rdoc_files = %w(README.md LICENSE.md)
|
11
11
|
spec.summary = %q(Updated and extended toxiclibs libraries for JRubyArt and propane)
|
12
12
|
spec.description =<<-EOS
|
13
|
-
Toxiclibs java libraries wrapped in a rubygem. Compiled and tested with JRubyArt-1.
|
13
|
+
Toxiclibs java libraries wrapped in a rubygem. Compiled and tested with JRubyArt-1.4.4 and processing-3.3.6
|
14
14
|
EOS
|
15
15
|
spec.licenses = %w(MIT LGPL-3.0)
|
16
16
|
spec.authors = %w(Karsten\ Schmidt Martin\ Prout)
|
@@ -20,5 +20,5 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.files << 'lib/toxiclibs.jar'
|
21
21
|
spec.files << 'lib/args4j-2.0.31.jar'
|
22
22
|
spec.require_paths = ['lib']
|
23
|
-
spec.add_development_dependency 'rake', '~> 12.
|
23
|
+
spec.add_development_dependency 'rake', '~> 12.3', '>= 12.3.0'
|
24
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toxiclibs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Karsten Schmidt
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-12-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -17,22 +17,22 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '12.
|
20
|
+
version: '12.3'
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 12.
|
23
|
+
version: 12.3.0
|
24
24
|
type: :development
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: '12.
|
30
|
+
version: '12.3'
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 12.
|
33
|
+
version: 12.3.0
|
34
34
|
description: " Toxiclibs java libraries wrapped in a rubygem. Compiled and tested
|
35
|
-
with JRubyArt-1.
|
35
|
+
with JRubyArt-1.4.4 and processing-3.3.6\n"
|
36
36
|
email: mamba2928@yahoo.co.uk
|
37
37
|
executables: []
|
38
38
|
extensions: []
|
@@ -459,7 +459,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
459
459
|
version: '0'
|
460
460
|
requirements: []
|
461
461
|
rubyforge_project:
|
462
|
-
rubygems_version: 2.
|
462
|
+
rubygems_version: 2.7.3
|
463
463
|
signing_key:
|
464
464
|
specification_version: 4
|
465
465
|
summary: Updated and extended toxiclibs libraries for JRubyArt and propane
|