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
19
votes
10 answers

Mercator longitude and latitude calculations to x and y on a cropped map (of the UK)

I have this image. It's a map of the UK (not including Southern Ireland): I have successfully managed to get a latitude and longitude and plot it onto this map by taking the leftmost longitude and rightmost longitude of the UK and using them to…
betamax
  • 13,431
  • 9
  • 38
  • 55
13
votes
4 answers

How can Khan Academy computer programs be run offline or on my own website?

I have developed programs in Khan Academy's Computer Programming lessons that I would like to run outside of Khan Academy. How can that be done?
Robert Tupelo-Schneck
  • 10,047
  • 4
  • 47
  • 58
12
votes
2 answers

Javascript client-data compression

I am trying to develop a paint brush application thru processingjs. This API has function loadPixels() that will load the RGB values in to the array. Now i want to store the array in the server db. The problem is the size of the array, when i…
Soft
  • 1,796
  • 5
  • 19
  • 30
10
votes
4 answers

Find Inverse Tangent?

I'm new to Javascript and I'm trying to use inverse tangent to find the angle in degrees between a line and the x axis on an elevated y. I don't see any command for it so I really need some help.
PLP123
  • 307
  • 2
  • 3
  • 11
9
votes
5 answers

IDE for Processing.js

I'm just getting started with processing.js and neither of the IDEs I use (Aptana, NetBeans) are able to understand the JavaScript syntax processing uses. What is a good editor to use when coding processing.js? At minimum I would like code folding…
Rigil
  • 539
  • 4
  • 9
  • 13
9
votes
2 answers

Is Processing.js worth it?

I am holding back on seriously pursuing ProcessingJS pieces mostly due to the bloat of the library. I have found that pieces like Ball Droppings do not use the library's Processing syntax parser, which is good, since I imagine it would slow down the…
hlfcoding
  • 2,532
  • 1
  • 21
  • 25
9
votes
3 answers

Using p5.sound.js in instance mode: 'p5.Amplitude() not a constructor'

I am using an npm, webpack, babel environment to write an application with p5.js. To be able to have the sketch as a module, I have the sketch in instance mode and import the library and add-ons as modules: import p5 from 'p5'; import…
8
votes
9 answers

Knowing two points of a rectangle, how can I figure out the other two?

Hey there guys, I'm learning processing.js, and I've come across a mathematical problem, which I can't seem to solve with my limited geometry and trigonometry knowledge or by help of Wikipedia. I need to draw a rectangle. To draw this rectangle, I…
icco
  • 3,064
  • 4
  • 35
  • 49
8
votes
2 answers

how can processing.js detect browser's size?

As mentioned, how can processing.js respond to a browser's size? (responsive design) i've tried screen.width and screen.height but it didn't work well. It seems only detect the size of the computer's screen size. What's more, i want to keep pace…
kikkpunk
  • 1,287
  • 5
  • 22
  • 34
8
votes
3 answers

Dynamically "unload" a Processing JS sketch from canvas

I'm using some javascript to allow users to dynamically load a sketch on click to a canvas element using: Processing.loadSketchFromSources('canvas_id', ['sketch.pde']); If I call Processing.loadSketchFromSources(...) a second (or third...) time,…
Andrew Marconi
  • 313
  • 1
  • 9
7
votes
3 answers

Has anyone got processing.js working in IE?

I'm looking for examples of processing.js working in Internet Explorer via ExplorerCanvas or similar.
meleyal
  • 32,252
  • 24
  • 73
  • 79
7
votes
5 answers

Combining the power of Processing.js and Web Workers

I've been doing some reading about two (relatively) new concepts in the Javascript language - Web Workers and John Resig's awesome Processing.js (well, not really a new 'Javascript concept', but you get my idea). Some great examples of both wander…
JorenB
  • 1,831
  • 2
  • 16
  • 27
6
votes
3 answers

How to pass dynamic parameters to .pde file

class Shape contains two methods drawCircle() and drawTriangle(). Each function takes different set of arguments. At present, I invoke this by calling the pde file directly. How to pass these arguments from a HTML file directly if I have to…
Achaius
  • 5,904
  • 21
  • 65
  • 122
6
votes
1 answer

Processing.js vs. CAKE vs. Raphael.js

I think all of these are basically really cool, and am familiar with their obvious differences (SVG vs. canvas), but i'm unsure of their underlying differences, advantages or limitations in terms of development time, performance, and support.
expiredninja
  • 1,397
  • 4
  • 25
  • 45
6
votes
2 answers

How do you setup processingJS on html?

How do you run a processingJS script on an html page? Could someone send me a test .html and any auxiliary code files for me to get an idea? Let's say I wanted to run this rectangle: rect(50,50,50,50);
dizad87
  • 448
  • 4
  • 15
1
2 3
32 33