Questions tagged [processing.js]

A discontinued (Dec. 2018) JavaScript port of the Processing language API v2. Use this tag for existing Processing.js codebases. For new projects, the Processing.js team recommends using P5js instead.

Processing.js was a sister project to the popular Processing visual programming language designed for the web from 2011 to December 2018, when it was archived.

It made data visualizations, digital art, interactive animations, educational graphs, video games, etc. work using web standards and without any plug-ins.

Processing started as an open source programming language based on Java to help the electronic arts and visual design communities learn the basics of computer programming in a visual context.

This specific port was retired in December 2018, with people who wish to write Processing for the web being encouraged to use the much newer p5.js project instead: .

482 questions
6
votes
1 answer

Making Magic Fairy Dust With JQuery

I have the following task: Add falling fairy dust (kind of like Tinker Bell) to a website logo. The falling fairy dust should be continuously animated/falling and fading out. The website logo is a png. I would like to absolutely position a div over…
edt
  • 22,010
  • 30
  • 83
  • 118
6
votes
4 answers

Is it possible to create transparent canvas

I am developing a paint brush application in javascript using processing.js It is using a canvas object. I want to keep an image at the background of the canvas. Draw something in the foreground. And while saving i need to get only foreground…
Soft
  • 1,796
  • 5
  • 19
  • 30
6
votes
3 answers

Run canvas on background tab

I have recently created a HTML5 canvas animation (also using Processing.js). The problem is that when I switch the browser to a different tab the animation stops playing. How can I allow the animation to keep playing while the user is on a different…
XCS
  • 27,244
  • 26
  • 101
  • 151
6
votes
3 answers

Processing.js timer

I am developing an application using Processing.js. At each step in the drawing loop I increment the number of frames by one frame++ . I want to know how much time has passed. Currently to get the time passed (knowing that my application is set to…
XCS
  • 27,244
  • 26
  • 101
  • 151
5
votes
1 answer

Using processing libraries in processing.js

For those that don't know, Processing is a great Java library =for rendering nice visualizations of data and serves as a wrapper for JOGL. Processing.js is the Javascript port of this library. In order to create a processing applet inside HTML, you…
OVERTONE
  • 11,797
  • 20
  • 71
  • 87
5
votes
4 answers

Processing.js - Sleep, Wait, TimeOut, Pause, Delay?

Is there a sleep() function for Processing.js? If not what would be a suitable alternative to add a delay in the draw() loop? I am using JQuery with Processing - can I use a JQuery or Javascript function to cause a sleep type delay in the…
logic-unit
  • 4,195
  • 12
  • 47
  • 72
5
votes
2 answers

Loading external data in processingjs

We want to create a web-based interactive visualization tool to make sense of data that we work with (for those interested: it's about next-generation DNA sequencing data). One of the issues we bump into at the moment is how to get the data to the…
jandot
  • 4,164
  • 1
  • 16
  • 10
5
votes
1 answer

My processing.js sketch doesn't load. This shouldn't be too hard to answer

I wanted to run a test of a sketch I just made ported to processing.js. When I load the webpage, I get the following errors from the javascript console in Chrome: XMLHttpRequest cannot load…
Mike
  • 963
  • 4
  • 16
  • 38
5
votes
2 answers

How to have multiple processing.js sketches running at the same time

I'm trying to run multiple sketches on the same page. The init script specifies that: /* * This code searches for all the
Achaius
  • 5,904
  • 21
  • 65
  • 122
4
votes
2 answers

Rotate a cube to be isometric

I'm following this rotating cube tutorial and I'm trying to rotate the cube to an isometric perspective (45 degrees, 30 degrees). The problem is, I think, is that the rotateY and rotateX functions alter the original values such that the two red dots…
Ashbury
  • 2,160
  • 3
  • 27
  • 52
4
votes
3 answers

multiple expressions in one switch statement

It is my first time using the switch statement in Javascript. Is there a way to evaluate multiple conditions one switch statement, like so: var i = 1; switch(i && random(1)<0.3) { case (1): //code block break; case (2): …
Roman
  • 173
  • 2
  • 2
  • 12
1
2
3
32 33