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
4
votes
2 answers

how to see mouseReleased() event outside canvas using processing.js

I have an object I want to drag around the screen with the mouse in Processing. I set acquired to true on mouse down over the object, and to false on mouse up, thus: void mousePressed() { if (overThing()) { acquired = true; } } void…
4
votes
1 answer

How can I optimize a HTML5 + processing.js app?

I'm working in a HTML5 copy of a NES game (link for reference). It runs very well on my Macbook, but friends are reporting it is slow on their computers. I've done the optimizations that came to my mind, such as using a quadtree to select which…
MaiaVictor
  • 51,090
  • 44
  • 144
  • 286
3
votes
1 answer

What is it that stops processings libraries from being used to processing.js

For those that don't know, processing is a language/ Java library primarily used for displaying data nice and pretty. Processing.js is its javascript port made by John Resiq. Everything that guy makes is a treasure. As per a previous question I…
OVERTONE
  • 11,797
  • 20
  • 71
  • 87
3
votes
1 answer

Weird visual bug when using my pixel art program

As the title states, a strange visual bug keeps happening with my pixel art program. When I scale down using pushMatrix(), scale() and popMatrix(). I can't really describe the bug, so I got a screenshot of it (the bug is the strange white lines in…
Voxel
  • 64
  • 9
3
votes
1 answer

Processing.js and JavaScript syntax

Is it possible to use Processing.js with JavaScript syntax? If yes, may you show some examples? Would it be much faster? I don't know how much time takes precompilation of Java code. Is it possible to precompile Processing into JS script on the…
ciembor
  • 7,189
  • 13
  • 59
  • 100
3
votes
2 answers

For loop does not run how I expect it to run

The for loop does not run like I would expect it to. I would expect the for loop to run only once, but when I run it, it shows an animation. The programming environment I am using:…
Bob Smith
  • 75
  • 9
3
votes
2 answers

Different Processing rendering between native and online sketch

I get different results when running this sample with Processing directly, and with Processing.js in a browser. Why? I was happy about my result and wanted to share it on open Processing, but the rendering was totally different and I don't see why.…
Alchemille
  • 51
  • 4
3
votes
2 answers

Using Processing Sketches With Tabs In Processing JS

I've got a Processing sketch that I'd like to display on my site with Processing.js rather than as a Java applet, however I'm not sure it supports tabs - or classes. Does it need to be written as procedural script, or is there an I can use…
logic-unit
  • 4,195
  • 12
  • 47
  • 72
3
votes
2 answers

Hit detection algorithm not working, unsure why not. (Javascript/Processing.js)

I'm new to programming games (and programming in general). I have previously made a "Flappy Bird" clone and a few others and I used the hit detection algorithm as provided by the Mozilla Developer Network here. I am now trying to recreate "Pong"…
swhizzle
  • 141
  • 10
3
votes
1 answer

ProcessingJS performance with large data

My goal is to create an interactive web visualization of data from motion tracking experiments. The trajectories of the moving objects are rendered as points connected by lines. The visualization allows the user to pan and zoom the data. My current…
3
votes
1 answer

Better event-based redraw() of Processing.js when using noLoop()

I am using Processing.js, with jQuery 1.3.2 at my disposal, and targeting Firefox 3.5, Safari 4 and IE 8 (through ExplorerCanvas). The Processing.js website says "Using Explorer Canvas with Processing.js typically results in unusable frame-rates for…
3
votes
3 answers

fill with an image in processing.js

I'm working with some canvas and processing.js but i cant figure out how to fill an arc/ellipse etc with an image. Using JavaScript usually i do something like this: ctx.save(); ctx.beginPath(); ctx.arc(x, y, size, 0, Math.PI * 2,…
Dtnand
  • 449
  • 3
  • 14
3
votes
1 answer

processing js sketch not loading

This is my markup: This is…
dopatraman
  • 13,416
  • 29
  • 90
  • 154
3
votes
1 answer

Canvas, iframe and Access-Control-Allow-Origin

I am getting crazy with this problem, and hope there is a solution or workaround. I have a canvas inside an iframe, in a different domain (for security reasons). This canvas shows a Processing.js animation/drawing. I need to allow the canvas to load…
taseenb
  • 1,378
  • 1
  • 16
  • 31
3
votes
2 answers

How do you flip a image horizontally using Processing.js?

Not much to add to the question. How do you flip a image horizontally using Processing.js?
MaiaVictor
  • 51,090
  • 44
  • 144
  • 286
1 2
3
32 33