Processing JS WordPress Plugin

Include Processing JS sketches into your WordPress blog posts.

Download — Latest Version

Installation

The easiest way to install the plugin is to install with plugin installer (enter your WordPress address).

If you want to do it manually:

  1. Upload the processingjs directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress

Once activated, you’ll notice a ‘processing’ button when you’re writing or editing a post in HTML mode. Clicking it will insert a very simple Processing sketch into your post. You can use it as a template or write your own from scratch. You’ll find examples (with code) of what can be done here: Processing JS Demos.

Changelog

Questions?

If you find this piece of code useful, please consider donating. I work on these projects in my spare time. My site carries no advertising and I release most of the code I work on under a free software license so anyone can benefit from it. I don’t receive any payment for this work so I have to rely on donations if I want to put off becoming a wage slave. Your contribution (whatever the amount) would be greatly appreciated.

26 Comments

  1. Simon
    Posted 7 November 2009 at 3:54 pm | Permalink

    Hello thanks for this awesome plugin, it definetly beats the java/html manual solution. I have a question though, if my processing file uses external files (such as a font or a picture) where do I need to keep them in wordpress in order for them to be called up on correctly?

  2. Posted 8 November 2009 at 12:47 pm | Permalink

    Hi Simon, glad you like the plugin. As for external files, I don’t think Processing JS looks into a specific folder by default. So you should be able to place external files anywhere you like but refer to them with an absolute path. E.g. /wp-content/uploads/

  3. Sped
    Posted 25 January 2010 at 8:47 am | Permalink

    Simon, thanks for writing the program.

    I am wondering if the Minim audio library can function within the plugin environment?

    Because I am extremely new to Processing, I may be dreaming a bit. But I wanted to ask you. Please reply when you have a moment. Thanks.

  4. Sped
    Posted 25 January 2010 at 5:50 pm | Permalink

    Apologies, my last question is directed towards Keyvan.

  5. Posted 26 January 2010 at 2:46 pm | Permalink

    Sped: I think you’ll find many of the libraries you’re used to in Processing missing from the JS version. I know audio is one area where there is some work being done at the moment. You might find some information in this thread: http://groups.google.com/group/processingjs/browse_thread/thread/b89ca0e7f14558a2

  6. Posted 11 March 2010 at 1:16 am | Permalink

    hello
    scuse my bad english (i’m french)
    First, congratulation for this plug. it’s verry interesting and easy tu put the native processing code in the html version of a wordpress post. and sketchs looks very clean.
    But nevertheless, I Have one inexplicable problem about the cursor :
    for exemple, in a classic configuration with basic void setup, and void draw (x,y,mouseX,mouseY); when the mouse cursor is upon the sketch area ,the line would come on the exact point where the user’s mouse is positioned in time ….what should be. because in my case, I have a big interval between my cursor and my effective drawing point (about 100px!! it’s to much), and I’m 200% sure about the problem doesn’t come from my processing code. I hope i’m clear, it’n not very easy to spell out. Imagine, it’s like if you are drawing with à paint, and the draw doesn’t exist under your paint, but 1 mile further…
    So I’m sorry, but except of this, this program is very good! but THIS!!!
    …theire is somethig to fix in my case : HELP will be more appreciated .
    tanks a lot!

  7. Posted 11 March 2010 at 1:19 am | Permalink

    And Sorry for the English
    (i would like to say “help will be MUCH appreciated”)

    Quentin.

  8. Posted 11 March 2010 at 2:35 am | Permalink

    Hi Quentin, thanks for reporting this. I’m a little busy at the moment but I’ll look into this as soon as I get a little time. Perhaps a newer version of processing.js will fix it. No idea what else to suggest at this time, sorry. :(

  9. Posted 25 October 2010 at 10:40 am | Permalink

    Hey! Thanks for the great plugin. Everything is working out but I’m having trouble getting my fonts to show up. I using loadFont:
    font = loadFont(“Georgia-Bold-20.vlw”);
    But no matter where I put the .vlw file and no matter how I try to address it never seems to load. I’ve tried point to it as explicitly as I can. Any thoughts?

    Thanks in advance?

  10. Posted 25 October 2010 at 11:49 am | Permalink

    Alan: Font are handled differently in Processing.js. You might want to have a look at this page: http://processingjs.org/reference/loadFont%28%29

    Also, the version of Processing.js in this plugin hasn’t been updated in a while – I’ll hopefully have an update out soon.

  11. Posted 6 December 2010 at 10:14 pm | Permalink

    Hi!
    Thanks for the great plugin. I also seem to have same problem concerning fonts in the sketch. I’ve looked all the reference in processingjs site but became no wiser…
    Also tried dfferent places to upload the fonts.
    Would greatly appreciate if you could give some example on how to use fonts with the plugin!

  12. Posted 8 December 2010 at 4:48 am | Permalink

    Tomi: from what I’m reading on the Processing.JS site, it appears fonts are still not well supported – and it appears there’s only experimental support for using your own fonts. This page http://processingjs.org/reference/loadFont_ says “Font support for the Canvas element varies across browsers. FireFox currently has the best support, but still uses a pre-defined set of fonts.”

    Processing.js v1.0 was released recently – I still haven’t had time to update this plugin so if you are going to experiment I would suggest downloading the latest version from their site and trying out the examples given there. Download page here: http://processingjs.org/download

  13. Mari
    Posted 15 January 2011 at 10:13 pm | Permalink

    THANK YOU SO MUCH FOR YOUR GREAT WORK! It’s a very basic plug-in, for what I can tell no arrays, bummer, but it’s FINE! I’ve been struggling for the last 3 hours how to post a Processing sketch to WP 5. This made my day. I can take a break now…

  14. Posted 7 February 2011 at 11:46 pm | Permalink

    Thanks so much for the processing.js 1.0 plugin!

    I’ve made an app for my website, that includes three images. It works perfectly, except for the fact that there is a large black rectangle right next to my app, and a box appears saying:

    “There appears to be a problem with the processing code…

    Syntax error

    syntax error”

    And idea as to why this might be? the code works perfectly in processing, and with your Processing.js plugin it works perfectly except for the black rectangle…

  15. Posted 9 February 2011 at 5:17 am | Permalink

    Mari: Glad you like it.

    Jón: If you email me the code I can try it here and see if I can reproduce your results. It may be a problem with the plugin or with the way the JS port interprets your code.

  16. Posted 16 February 2011 at 11:15 pm | Permalink

    Well, actually I figured it out somehow, there was an extra piece of string in there somewhere. But thanks anyway :)

    I have a more pressing issue I need to get sorted out, though, which I believe would be helpful to others too. I’ve posted an application on my website, but the thing is it doesn’t work with internet explorer. I use firefox, and it works perfectly on my browser, but people using explorer simply don’t see anything appear at all.

    Do you know the solution to this? I’ve found some answers on the web, but none of them is wordpress specific. It would be helpful with a step-by-step guide for getting the processing.js plugin working on internet explorer.

  17. Mari
    Posted 17 February 2011 at 9:26 am | Permalink

    Yes, I agree with Jon.
    you cannot see the sketch on IE. It’s a shame for PC users, which most corporate offices have. I wish I knew programming enough to figure it out how to make it work…
    Thanks again for such great solution to adding an interactive sketch to wordpress.

  18. Posted 17 February 2011 at 2:04 pm | Permalink

    I think the IE issue has to do with lack of support for HTML5′s canvas. My understanding is that it will be supported in IE9, see http://weblog.bocoup.com/canvas-in-ie9-too-good-to-be-true

    There are workarounds for older IE browsers, but I don’t know how effective they are (so not sure if it would be helpful to use them in the plugin). If anyone has any suggestions, please let me know.

  19. Posted 17 March 2011 at 3:48 pm | Permalink

    I haven’t tried this plugin yet, but thanks so much for putting it together. Looks amazing.

    One question, though: are current IE versions (IE8 and below) supported at all? Or are only some functionalities not available in IE?

    I personally don’t use IE except for compatibility testing, but it would be nice to have my audience using IE be able to see my work! Thanks much.

  20. Posted 18 May 2011 at 3:54 pm | Permalink

    hi Keyvan,

    i was wondering if there’s any chance to trigger processing in a live ajax load call, basically updating the dom three with an ajax call.

    Thanks for the great plugin,

    best regards!

  21. steffen
    Posted 18 May 2011 at 7:12 pm | Permalink

    first of all: thanks you for makin this plugin. its really great!

    what’s bugging me, is the question: now that, according to the processing.js references, it is possible to import libraries (correct me if i’m wrong, its just not red anymore – havnt tried it yet), at what location do i put the library files/folder, when using the wp-plugin?

  22. Posted 19 May 2011 at 7:49 pm | Permalink

    @Aaron (apologies for the late reply): As far as I know they are not because they lack HTML5′s canvas support.

    @Tipografo: I haven’t tried it myself, but I’m pretty sure you can. The reference page says: “Regular Javascript commands will work in Processing.js script.” So you should be able to refer to a DOM element in the document to see if it’s been updated, and then act on that. Again, not something I’ve tried myself.

    @steffen: if the import command is supported now, it’s most certainly for importing Javascript libraries made for Processing JS (the libraries most Processing users are familiar with are written in Java, and won’t work with Processing JS).

  23. steffen
    Posted 19 May 2011 at 10:11 pm | Permalink

    how could i oversee that! thanks for the answer!

  24. skrasms
    Posted 18 June 2011 at 7:25 pm | Permalink

    There is something strange for me when trying to view blogs that use this plugin in Chrome on Win7 64. I have tried the newest Chrome (12.0.742.100) on two different Win7 64 computers with the same results. Often the pages do not load at all. They just show up as a blank white page.

    It gets weirder. If I google “processingjs blog” and click the first link, it does not work (blank page). BUT, if I copy the link path and paste it into a new tab, it does work. That process is 100% repeatable on the machine I am using right now.

    I do not have any problems when using Internet Explorer, but I generally avoid IE.

    Is there any obvious reason for the problem?

  25. Posted 29 June 2011 at 12:47 am | Permalink

    skrasms: I just tried to access the Processing JS site via Google search results, using Chrome, and I had the same problem. Strange. I don’t think it’s a problem with this plugin – as far as I know the plugin is not even used on the Processing JS site. I had no issues in Firefox, and, like you, could access the if I pasted the URL directly into Chrome.

    Do you have examples of other sites which use Processing JS and exhibit this problem?

  26. Posted 31 December 2011 at 5:44 pm | Permalink

    Hi Keyvan,
    I’m having trouble running this plugin in my website and i’m wondering if can give me some advice.
    I’m running wordpress 3.0.4 and i’ve installed the plugin with no problems and, of course, I activated it.
    Problem is that the sketches won’t show up when I try to “Preview” them! Even the example it appears when I press “processing” tab in the posts area doesn’t show up. It is like a blank post…

    Any ideas? Do I have to install anything in my server directory?

    Thanks for your help and time developing this plugin.

    Filipe

11 Trackbacks

  1. By Processing project no. 1: Lines | Ian Hill on 13 March 2010 at 5:18 pm

    [...] be posting more projects as I complete them. Thanks to Keyvan Minoukadeh for creating a nifty WordPress plugin that allows a user to draw a Processing sketch in [...]

  2. By Webで簡単にprocessing! « tande lab. on 9 January 2011 at 9:44 am

    [...] WordPress tweetmeme_url = 'http://tande.jp/lab/2011/01/805';tweetmeme_source = '_tande_';Processing JS [...]

  3. By Processing.js | No more cubes. on 5 February 2011 at 9:35 pm

    [...] processing.js kann man Processing Code in Webseiten einbinden. Für WordPress existiert sogar ein Plugin, mit dem das Javascript notwendige in der Version 1.0 automatisch eingebunden werden kann. Das [...]

  4. [...] just installed this rad plugin from Keyvan Minoukadeh. It allows you to run Processing sketches right in your WP posts. Which is [...]

  5. [...] Processing.js work with WordPress? You bet it can my friends! Download a nice plugin like this one (http://www.keyvan.net/code/processing-js) and you’re ready to [...]

  6. [...] Processing.js本家も推してる、PostsやPagesの中でまんまProcessingのコードを書けるPlug-inもあります http://www.keyvan.net/code/processing-js/ [...]

  7. By Interactive 404 Error Page : f#kx on 24 September 2011 at 4:50 am

    [...] Processing JS WordPress Plugin by Keyvan Minoukadeh is a great tool for embedding sketches easily into blog posts. [...]

  8. By Processing.js | Jason Smith on 22 November 2011 at 9:03 pm

    [...] website. It’s actually pretty strait forward. In fact someone was nice enough put together a wordpress implementation of processing.js, so all I had to do to include sketches in my posts was install a plugin. [...]

  9. [...] get it working, I first installed the Processing JS pluginfrom Keyvan Minoukadeh (you can do it directly from your WordPress admin control panel, just go to [...]

  10. [...] Processing JS WordPress Plugin http://www.keyvan.net/code/processing-js/ [...]

  11. [...] processingで書いたコードをWordPressに埋め込むプラグインprocessing JSを利用する。 [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting