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

Saving PNG from Processingjs sketch?

I'm running my processingjs sketch locally and I'm trying to save a PNG of my canvas but I can't get the regular commands saveCanvas("image", 'jpg'); and save("diagonal.tif"); to work. Does anyone have a tip on how to get this done? Cheers, Thales
Thales Ribeiro
  • 49
  • 1
  • 10
-1
votes
1 answer

How to i make rectangle move across the screen processing js

I want to make the white rectangles move across the screen like traffic and stop when the light is red. I have started this on the move method, totally new to processing js. Currently the cars are the correct distance apart but i am unsure how to…
-1
votes
1 answer

Why the nextButton/startButton does not work?

I am working on a project on Khan Academy in which I have to create a game with at least 3 levels. I have developed most of the game but when I tried to proceed from one level to next the game somehow stops. Here is the full project: Project…
Ratcat
  • 1
  • 1
-1
votes
1 answer

How to import libraries in processing.js?

I'm trying to import the library processing.video.*, but it looks like it doesn't recoginize it
-1
votes
2 answers

javascript Centipede, key press not working

I built centipede in javascript from a Khan Academy tutorial. Then I figured out how to put it into a web browser. however, the key presses are not working. I have tried to change the keyCode values, and change some of the function definitions to…
bamabacho
  • 191
  • 2
  • 16
-1
votes
1 answer

I want to use a code like the one I made in processing

I'm new to coding and I have a question. I've made this simple code in processing and I was wondering if I could use it and how to do the same with an image inside a div. This is the code: int x, y; PImage img; void setup () { size(800,…
-1
votes
1 answer

mixing processing.js code and javascript code

I downloaded processing.js in my pc, but im not sure if it is possible to write pure javascript code in it. basicly my question is, can i write processing.js code and javascript code in the same file?.
-1
votes
2 answers

Nested for loop not working

I have this code var draw = function() { var bx = 0; var by = 0; //height for (var i = 0; i < 11; i++) { //width for (var s = 0; s < 10; s++) { block(bx,by,air); bx = bx + 50; } by = by + 50; } What is happening is…
master
  • 81
  • 12
-1
votes
1 answer

Using fill() on objects with for loop

I'm creating a game in Processing (JavaScript) which allows you to color a grid of rectangles as they become highlighted one by one. I'm trying to color an array of objects using a for loop and the fill() function, but when I use it, it colors not…
lgouvin
  • 1
  • 1
-1
votes
1 answer

Are basic HTML Canvas drawing/animation frameworks (or at least large portions of a framework), such as processing.js still necessary?

Allow me to explain, so that this doesn't just get marked as an "opinion-based" question. I'm learning processing.js right now, and I can't help but notice many of the similarities in functionality with what already exists in the Canvas API of…
-1
votes
1 answer

Adding processing code to a webpage using processing.js

I have created a Processing code (.pde file) to make a time series (coffee production v/s time) which takes its data from an excel file(.tsv table). Can anyone tell me how to include this to my webpage? I have tried with processing.js but it does…
user1560155
  • 1
  • 1
  • 2
-2
votes
1 answer

processingjs red() green() blue()

I want to send a sting from processing js to javascript with the color to use in css. so formatted like: "rgb(255, 0, 0)" (or whatever color values). no matter what i try i get this error: Uncaught TypeError: number is not a function I did several…
clankill3r
  • 9,146
  • 20
  • 70
  • 126
-2
votes
1 answer

JavaScript Animation will not perform as intended

I'm trying to start making a game and while coding the animation for the stickman's legs the animation the legs seem to glitch out and just go from point a to point b when I start the program. Ind I can't figure out what is wrong. Here is my…
-2
votes
1 answer

How to upload Processing sketches to the web

I have Processing, version 3.0, and I am interested to export any sketch to HTML but I have no clue of how to do it. Thanks.
-2
votes
2 answers

What is the processing libraries processing.js can execute?

I want to create socket connection with processing.js. But processing.js can't use java library. Can I use processing.net.* ? And What is the processing libraries processing.js can execute? I can't find the list of libraries. Help me!!
tom__bo
  • 11
  • 6
1 2 3
32
33