Sha256: 073a6660d9da3cc0672f9026f235efaa29753a27da398e5e684c37ef538bfb6c

Contents?: true

Size: 1.45 KB

Versions: 1

Compression:

Stored size: 1.45 KB

Contents

---
layout: page
title: About
permalink: /about/
categories: jruby_art update
---

[JRubyArt][jruby_art] is a ruby wrapper for [processing-3.2.1][processing]. Create processing sketches in ruby using regular ruby-2.3 syntax, and use the magic [JRuby][jruby] to run them. You can use both rubygems and and regular processing libraries in your sketches. Features run, watch and live modes (uses pry).

In general where there is a choice of using a java (processing) method or a regular ruby method you should choose the ruby method (eg use `rand` in place of `random`). Further you should prefer to use `JRuby` classes `Vec2D` and `Vec3D` instead of processings `PVector` class. Processing has a number of convenience methods which are not needed in ruby (eg 'pow' use `**` in JRubyArt) and some static methods have not been implemented in JRubyArt. For the processing `map` method prefer `map1d` ([see example][map1d]) or use `p5map` if you must. Another thing to watch is `color` which is implemented differently in JRubyArt ([see example][color]).

See also my [blog][blog] for more code ideas.

[jruby]: https://jruby.org
[processing]: https://processing.org

[jruby_art]: https://ruby-processing.github.io/index.html
[color]: https://github.com/ruby-processing/JRubyArt-examples/blob/master/processing_app/basics/color/creating.rb
[map1d]: https://github.com/ruby-processing/JRubyArt-examples/blob/master/processing_app/basics/arrays/array.rb
[blog]:https://monkstone.github.io/

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pbox2d-1.0.0-java docs/about.md