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
0
votes
1 answer

How to draw a Gaussian Curve in Processing

I am trying to draw a Gaussian curve with mean = 0 and standard deviation = 1 using processing, but when my code runs, nothing is drawn to the screen (not even the background). Here is my code: float x, y, mu, sigma; void setup() { size(900,…
mpjan
  • 1,790
  • 5
  • 18
  • 21
0
votes
2 answers

I can't get this structure in javaScript: var some = (function(){...lots of code})();

I'm a noob in js, some background with processing.org, wich is a framework for java. I'm trying to understand the code below, from an example that came with processing. Now I did a little dig in javaScript. But this.. var someName =…
v.k.
  • 2,826
  • 2
  • 20
  • 29
0
votes
1 answer

Use Collections java object in Processing.js

I'm in need of the Collections object but Processing.js keeps spitting back an error saying Collections is not defined as though it doesn't recognize it as an object. I'm trying to find the minimum value of an ArrayList by using the Collections.min…
ZekeDroid
  • 7,089
  • 5
  • 33
  • 59
0
votes
1 answer

Using custom fonts for processing.js in web2py

How do I use custom fonts in processing.js inside a web2py server? More specifically, what's the path and why do I have to use directives?
ZekeDroid
  • 7,089
  • 5
  • 33
  • 59
0
votes
1 answer

TypeError: $it0.hasNext is not a function

Running a few canvases which work fine in chrome but fail in the latest version of Mozilla. I know this was an issue a while back and I thought the new processing-1.4.1.js was fixed to accommodate for the for loop failure seen here. Does anyone know…
ZekeDroid
  • 7,089
  • 5
  • 33
  • 59
0
votes
2 answers

How to tell when an @font-face rule is applied

Is there any way to tell when an @font-face rule is applied? I'm creating @font-face rules that use data: URIs from a font file requested with an synchronous XMLHttpRequest in JavaScript and then write text to a canvas element using the font right…
Eli Grey
  • 35,104
  • 14
  • 75
  • 93
0
votes
1 answer

Set scope for accessing javascript objects from processing.js sketch

You can use variables and functions that are directly or indirectly accessible from the global scope, from within a processing.js sketch. Is there a way to give it a different object as the global scope to look stuff up in?
bigblind
  • 12,539
  • 14
  • 68
  • 123
0
votes
0 answers

Filepicker.io in Processing.js integration

I'm trying to integrate the file-uploader-service Filepicker.io into a processing.js sketch I already made. It is fully functional locally, where you could choose a audio source from your computer and it does magic things with this audio. Now I'd…
dh762
  • 2,259
  • 4
  • 25
  • 44
0
votes
2 answers

Bouncing ball stops bouncing?

I could not find how to ask so there is a demo at the link. I am pretty sure this is a simple question but I can not seem to find why. My question is: Why the ball stops bouncing? Is it about something like rounding in multiplications or divisions…
Mehmet Ataş
  • 11,081
  • 6
  • 51
  • 78
0
votes
1 answer

Pulling variables/data out of a processing sketch in a canvas to javascript so I can trigger page functions with those variables

I am making an simple app where the user logs in and is then sent to a screen where they must tap a button as fast as they can for 30 seconds. I am using Processing to create the sketch with the button in it on a regular HTML page using the canvas…
0
votes
1 answer

Processing.js - Is there a destructor?

This might be a naive question, but is there a destructor in Processing.js? I know that regular Processing is Java-based so there isn't a destructor, but I'm not sure if Processing.js runs the same way. Just so it's here, here's the class I want to…
nsax91
  • 437
  • 2
  • 10
  • 18
0
votes
2 answers

I can't get this Processing.js sketch to work?

I can't figure out why this processing sketch isn't working in some browsers. It works fine with Firefox, but it won't run in Safari and Chrome. I am placing the code inside a script tag on my website and targeting the "canvas" as suggested on the…
0
votes
1 answer

Processing.js canvas with some divs over it not working on iPad

I am building a webpage with a fullscreen background built with Processing that is being executed on a fixed positioned fullscreen html5 canvas. On top of this canvas I'm positioning some divs which are being displayed as expected. As my Processing…
McEnroe
  • 61
  • 1
  • 7
0
votes
1 answer

Rendering without WebGL

Can we do this with Processing.js? We've built a system rendering in P3D that sketches simple boxes and text with some camera movements. We need to get this to work in browsers without WebGL. It's simple enough not to require high frame rates,…
Gaucho
  • 3
  • 2
0
votes
1 answer

PDE for Processing.js not displaying and not showing an error

I'm trying to embed a pde made with processing into a vanilla html page: Here is my code: