GithubHelp home page GithubHelp logo

clj-processing's Introduction

Processing for Clojure

This lib is a wrapper for the Processing project. Mixture of Clojure and Processing enables you to do live-coding and experiment easily.

Most of the function are covered; some have a slightly different name than in Java (partly because Clojure is confused by methods of the same arity but different argument types). Most of the constants are accessible.

How To Use It?

If you're using Leiningen, just add the following line to your dependencies list:

[org.clojars.automata/rosado.processing "1.1.0"]

Otherwise, add your core.jar file from the Processing installation to your CLASSPATH.

To use the OpenGL features, you also have to add gluegen-rt.jar, jogl.jar and opengl.jar from the $PROCESSING_DIR/libraries/opengl/library. You also need to pass the argument:

     -Djava.library.path=`$PROCESSING_DIR/libraries/opengl/library

to the JVM.

Then, create a JAR by running ant and also add the resulting file to your CLASSPATH.

Examples

The examples directory contains a simple script to get you going.

COMMON ISSUES

clj-procesing may not work if you're using add-classpath to put the Processing jars into your CLASSPATH. Please, use a "proper" way to set up your CLASSPATH (eg. with a special script like the clj on Clojure Wiki)

If your're using Clojure's proxy macro, you'll have to define the mouse handling methods to take one argument (which is just an instance of java.awt.event.MouseEvent class) and get all needed information (like mouse position etc) from that object. Also, accessing instance fields of the PApplet class from within proxy doesn't work.

TODO

  • docstrings
  • include remaining constants

clj-processing's People

Contributors

automata avatar rosado avatar technomancy avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.