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

Processing to Processing.js, PVector array

I just wrote a code in Processing(with some help, because I'm a beginner!!) and it doesn't work in Processing.js any idea how I can fix this code. the code is a diagram showing intersection between one moving line and four other fixed lines. I…
0
votes
1 answer

time between mouse clicks processing.js

I want to get the time between successive mouse clicks in ms. This is what I have tried: void setup(){ size(512,512); background(100,100,0); } void draw(){ } void mousePressed(){ println(new Date() - oldtime); var oldtime=new Date(); …
0
votes
1 answer

Reduce space between objects in processing.js collision detection

I have been working on a basic Pong clone using processing.js. Currently I have a ball which can be bounced back and forth between two player controlled paddles. My issue is that my algorithm for detecting collision between the balls and the paddles…
Christian
  • 1,685
  • 9
  • 28
  • 48
0
votes
1 answer

How to listen for keyboard input in update() in Processing.js

I have been working on a processing.js demo in which bodies orbit a central point. I am attempting to add a listener for input that checks if the s key is pressed each update and if so calls a method to reduce the size of each bodies' orbit by a…
Christian
  • 1,685
  • 9
  • 28
  • 48
0
votes
1 answer

Issue updating second orbiting body in a processing.js example

I was given a processing.js example of how to orbit an object around another object by a user on gamedev.stackexchange here. Essentially, in the example, an origin or center is established along with the cooridinates of the orbiting point: // Logic…
Christian
  • 1,685
  • 9
  • 28
  • 48
0
votes
1 answer

Processing.js - Drawing onto an Image

Using the HTML5 Canvas element and Processing.js, I want to draw circle outlines onto an image. However, when I run my code, the area inside the circle outlines simply turns white, instead of retaining the image information in that region. I suspect…
nsax91
  • 437
  • 2
  • 10
  • 18
0
votes
1 answer

Using Processing.js: Can I have multiple canvases with only one data-processing-source sketch.pde?

using Processing.js, I would like to know if what I'm trying to do is even possible. I've looked on Pomax's tutorials, Processing.js the quick start of JS developers page, PJS the Google group, here, and I can't seem to find an answer to the…
0
votes
1 answer

how can i style processing.js element?

i know quite quell processing.org, in java. and i like it. from a little bit i have done some work with html, javascript, css, jquery, d3.js. i wan surprised how nicly and easily i can style my stuffs: with css. and i incredibly love it. do the…
nkint
  • 11,513
  • 31
  • 103
  • 174
0
votes
1 answer

Performance Warning Processing.js

When I write Processing.js in the JavaScript-flavor I get a performance warning that I didn't get when I used Processing.js to parse Processing-Code. I've create a fairly simple sketch with 3d support to get into it and the console is flooded with…
nocksock
  • 5,369
  • 6
  • 38
  • 63
0
votes
1 answer

Skip drawing canvas behind divs

I have a HTML5 canvas in a document. Over that canvas some divs may be, hiding the canvas behind them (but still part of canvas is visible). Knowing the position of canvas how can I check which divs actually cover the canvas so that I no longer draw…
XCS
  • 27,244
  • 26
  • 101
  • 151
0
votes
1 answer

ios processing.js barebones template

i want to try processing.js on an iOS application, i have checked the projects on http://procoding.audiocommander.de/ and http://luckybite.com/iprocessing/ but none of them have an actual working example, so i went to create one... SO... I have…
manuelBetancurt
  • 15,428
  • 33
  • 118
  • 216
0
votes
1 answer

Processing.js improve draw performance

I use processing.js to draw some shapes on a canvas. If I draw more than 100-200 circles which are constantly moving on the canvas the FPS drops significantly. If I remove the drawing the FPS goes back to 60 so the other tasks do not affect the…
XCS
  • 27,244
  • 26
  • 101
  • 151
0
votes
2 answers

Passing image from Processing to Javascript and then saving said image back to server using AJAX / PHP?

I'm working on a project where I want to load a processing sketch into a canvas, have some things happen to the image when a user mouses over (got that part), and then when they leave the canvas save the image back to the server. I've looked at…
0
votes
1 answer

Processing.js - Listing files from sketch directory

I'm new here, so hello everyone! I wrote a few things in Processing language and now I need to switch to Processing.js. I need to write an app that first scans the sketch folder to prepare a list of provided files. And what was straightforward in…
Paweł Tokarz
  • 326
  • 2
  • 15
0
votes
1 answer

Change canvas size in processing.js

I have the code in my html file:

but changing the width and height doesn't affect the canvas size at all. Why is this?
user2009020
  • 287
  • 1
  • 3
  • 10