{"id":13463222,"url":"https://github.com/jashkenas/ruby-processing","last_synced_at":"2025-05-16T08:06:25.548Z","repository":{"id":391669,"uuid":"9370","full_name":"jashkenas/ruby-processing","owner":"jashkenas","description":"Code as Art, Art as Code. Processing and Ruby are meant for each other.","archived":false,"fork":false,"pushed_at":"2020-08-31T18:22:59.000Z","size":80587,"stargazers_count":1280,"open_issues_count":0,"forks_count":89,"subscribers_count":33,"default_branch":"master","last_synced_at":"2025-04-08T20:18:05.001Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.com/jashkenas/ruby-processing/wikis","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jashkenas.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-04-13T14:39:59.000Z","updated_at":"2025-03-04T12:03:07.000Z","dependencies_parsed_at":"2022-07-07T12:54:58.119Z","dependency_job_id":null,"html_url":"https://github.com/jashkenas/ruby-processing","commit_stats":null,"previous_names":[],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashkenas%2Fruby-processing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashkenas%2Fruby-processing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashkenas%2Fruby-processing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jashkenas%2Fruby-processing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jashkenas","download_url":"https://codeload.github.com/jashkenas/ruby-processing/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T13:00:48.414Z","updated_at":"2025-05-16T08:06:20.539Z","avatar_url":"https://github.com/jashkenas.png","language":"Ruby","readme":"### __IMPORTANT: Ruby-processing is deprecated and unsupported__ ###\n\nUse the updated version\u003c/b\u003e [JRubyArt][jruby_art] \u003cb\u003eor the standalone alternative\u003c/b\u003e [propane][], which target processing-3.5.3 and processing-4.0 (like jdk11+) respectively, and support ruby-2.5+ syntax. Works on same platforms as vanilla processing (windows, mac, linux) for Android see Yuki Morohoshi [ruboto-processing2][].\n\n[Processing][] provides a tidy API, with a bunch of handy methods you can call \n  from Ruby-Processing. Here's a smattering:\n  \n  `alpha`, `arc`, `background`, `blend`, `blue`, `ellipse`, `frame_rate`, `hue`, `lerp`,  `load_image`, `load_pixels`, `mouse_pressed`, `noise`, `rect`, `saturation`, `shape`, `smooth`, `text_align`, `translate`, `triangle`, `vertex`...\n  \n\n## Installation\nWe assume you have some version of ruby installed if not, there is a [guide to installing][] ruby on various platforms including windows. Or here is an [alternative install][] guide.\n\nMacOSX users please try out this new  [method](https://github.com/jashkenas/ruby-processing/wiki/Installing-ruby-processing-on-the-mac) or see this [japanese][] guide.\n\nIdeally you should install [jruby](http://jruby.org/download), at the very least you will have at least ruby-1.9.3 installed.  You should [download][] and install vanilla [processing-2.2.1](https://processing.org/download/) prior to installing this version of ruby-processing. You must also set the `PROCESSING_ROOT` in the .rp5rc yaml configuration file, the easiest way to do this is by running the [SetProcessingRoot.pde](https://gist.github.com/monkstone/7438749) sketch in the processing ide. \n\nThen install ruby-processing (from rubygems-org) in the usual way\n\n`gem install ruby-processing` some systems eg Ubuntu may require `sudo` access\n\nTo install jruby-complete use our built in tool (relies on `wget` to download [jruby-complete-1.7.26](http://jruby.org/download))\n\nsince ruby-processing-2.5.0 `rp5 setup install` (was `install_jruby_complete`)\n\nIf you haven't got `wget` just download jruby-complete-1.7.26 (for ruby-processing-2.7.1) to the vendors folder (then run above tool)\n\nThe vendored jruby-complete is only required for application export, and running certain sketches (eg shader sketches see [wiki][]).\n\n## Documentation\n\nSee [Wiki][]\n\nSee also [FAQs][], [Contributing][] and [Samples][]\n\n# Usage Example\n\n```bash\nrp5 run my_sketch.rb \n```\n\nor if not using system jruby (and not `JRUBY: 'false'` in `~/.rp5rc`)\n\n```bash\nrp5 --nojruby run my_sketch.rb\n```\n\nwhere a simple ``my_sketch.rb`` could look like this\n\n```ruby\ndef setup\n  size 400, 400  \n  fill 255\nend\n\ndef draw\n  background 0\n  ellipse mouse_x, mouse_y, 100, 100\nend\n```\n\nor a simple 3D sketch ``cube.rb`` features ArcBall from vecmath library\n\n```ruby\nload_library :vecmath\n\n############################\n# Use mouse drag to rotate\n# the arcball. Use mousewheel\n# to zoom. Hold down x, y, z\n# to constrain rotation axis.\n############################\n\ndef setup\n  size(600, 600, P3D)\n  smooth(8)\n  ArcBall.init(self, 300, 300)\n  fill 180\nend\n\ndef draw\n  background(50)\n  box(300, 300, 300)\nend       \n\n```\nSee [samples][] for many more examples\n___\n\n### Supported java version\n\nNB: you can't use jdk/jre installed by processing\n* Open jdk8 (latest version preferred, is the default linux install)\n* jdk8 from Oracle (latest version preferred, or required by Mac)\n* jdk7 should also work (typically ubuntu linux or some other linux distro)\n\n### Supported ruby version\n\nThis gem has been tested with the following ruby implementations\n\n* Ruby 1.9.3\n* Ruby 2.0.0\n* Ruby 2.1.2\n* Ruby 2.2.1\n* Ruby 2.3.0\n* [JRuby][] preferred use jruby-1.7.XX but also works with jruby-9.1.2.0 release \n\n### Supported processing version\n\n* processing-2.2.1 (required)\n* for processing-3.0+ see [JRubyArt][jruby_art] or [propane][propane]\n\n____\n\n### Ruby alternatives for processing convenience methods\n\nMany processing (convenience) methods make little sense in ruby (and many are no-longer implemented). See ruby alternatives for [details][].\n____\n\n[License][]\n\n[license]:LICENSE.md\n[contributing]:CONTRIBUTING.md\n[jruby]:http://www.jruby.org/\n[processing]: http://www.processing.org/\n[download]:https://processing.org/download/\n[samples]:https://github.com/ruby-processing/Example-Sketches\n[wiki]:http://github.com/jashkenas/ruby-processing/wikis/\n[details]:https://github.com/jashkenas/ruby-processing/wiki/Replacing-processing-convenience-methods\n[FAQs]:http://github.com/jashkenas/ruby-processing/wikis/FAQs/\n[release]:https://github.com/jashkenas/ruby-processing/releases/\n[guide to installing]:https://www.ruby-lang.org/en/installation/\n[alternative install]:http://tutorials.jumpstartlab.com/topics/environment/environment.html\n[fix]:https://github.com/jruby/jruby/issues/1917\n[japanese]:http://qiita.com/yohm13/items/f3f82f423b507cec1dcc\n[jruby_art]:https://ruby-processing.github.io/JRubyArt/\n[ruboto-processing2]:https://github.com/hoshi-sano/ruboto-processing2\n[propane]:https://ruby-processing.github.io/propane/\n","funding_links":[],"categories":["Graphics"],"sub_categories":["Visualizing Data"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjashkenas%2Fruby-processing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjashkenas%2Fruby-processing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjashkenas%2Fruby-processing/lists"}