Coder Social home page Coder Social logo

monkstone / cf3ruby Goto Github PK

View Code? Open in Web Editor NEW
10.0 3.0 1.0 202 KB

A ruby context free art DSL for use with ruby-processing

Home Page: http://monkstone.github.io/cf3ruby/

License: GNU General Public License v3.0

Ruby 100.00%
contextfreeart jruby art ruby-processing

cf3ruby's Introduction

cf3ruby

Now updated to be compatible with ruby 2.5, JRubyArt 2.5+ (newer version of ruby-processing), and Processing 3+.*

context-free DSL for ruby-2.5 and CF3 syntax

Very much derived from context-free.rb by Jeremy Ashkenas this version is updated to be more in line with CF3 and ruby 2.5 syntax. NB this version will not work with original ruby-processing.

Installation

To use this library you need install jruby (preferably jruby-9.2+), you will also need ruby-processing/JRubyArt to be installed. There are three ways you can install this library:-

rake test and gem install

Clone this repository,

cd cf3ruby
jruby -S rake test # builds and tests gem (mouse click on frame for test image to show)
jruby -S gem install cf3-1.2.0.gem # may need sudo access

local bundle install

Clone this repository,

cd cf3ruby
# bundle install          # using regular installed bundler may need to set GEM_PATH
jruby -S bundle install # if you installed bundler with jruby

gem install from rubygems

# When rubygems is updatd for this release.

# gem install cf3            # regular install may need to set GEM_PATH env variable
# jruby -S gem install cf3   # jruby install

it couldn't be easier could it?

Usage

Extract the included samples to your home directory (HOME/cf3work/samples)

cf3samples           # should work
jruby -S cf3samples  # else if installed with jruby this should also work

As for running ruby-processing,

k9 --run city.rb # providing you installed both ruby-processing (JRubyArt) and cf3ruby using jruby

You should read the JRubyArt documentation on using rubygems.

Contributing

See CONTRIBUTING.md

Y

cf3ruby's People

Contributors

monkstone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

funatsufumiya

cf3ruby's Issues

Can't seem to use colorMode(HSB, 360, 1, 1, 1)

The easiest way to keep parity with regular context free method of setting hue (0 - 360), would seem to be to use:-

colorMode(HSB, 360, 1, 1, 1)

However that doesn't seem to work (yet works fine for ruby-processing)
recommended workaround until it gets fixed

colorMode(HSB, 1)

Then in rule

hue: 60 / 360.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.