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 sketch not rendering in chrome..?

I'm using canvas for integrating processing sketch into webpage, it's working perfectly fine in firefox but not in chrome. Any idea what could have gone wrong.I'm simply using processing.js and canvas with processing.pde sketch. sorry if this…
bluedroid
  • 305
  • 3
  • 15
0
votes
2 answers

Is there code sample of using processing.js to visualize microphone input?

i want to use p5.js to visualize microphone input within a browser(better be chrome). However, the web audio api https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html drives me crazy cuz it's quite complicated. i just want to use the…
kikkpunk
  • 1,287
  • 5
  • 22
  • 34
0
votes
1 answer

How can i use chrome webcam API and the processing.js to manipulate the video?

As topic, I want to play with the webcam and chrome webcam API comes in handy, no plugin is needed. However, I am not familiar with javascript syntax, so I still want to use processing.js to manipulate the video. So how should the code be…
kikkpunk
  • 1,287
  • 5
  • 22
  • 34
0
votes
1 answer

Javascript delete method

I am trying to create a canvas game using the proccessing.js library. I use an array to hold all my objects. class blah{ ... void delete(){ // this.remove ??? } } blah myArray = []; myArray.push(new blah()); Is there a way I can…
XCS
  • 27,244
  • 26
  • 101
  • 151
0
votes
3 answers

How to fix: the default size is shown before jQuery detects the width and height, and it won't resize until i refresh it manually

i use processing.js and jQuery and the code below to detect the window size of the browser void setup() { size( $(window).width(),$(window).height() ); However, the default size is shown before the jQuery successfully detects the width and…
kikkpunk
  • 1,287
  • 5
  • 22
  • 34
0
votes
1 answer

processing code shows nothing on the browser. don't know why

Does anybody know what's wrong with this code? It shows nothing in the browser. My intention is to draw two eyes based on the mouse location. So I define an Eye class and then call its draw method with variable mouseX and mouseY. However, it shows…
kikkpunk
  • 1,287
  • 5
  • 22
  • 34
0
votes
1 answer

android : pointerIndex out of range

I wrote an android app using processing.js ! I have problem with multitouch zoom in galaxy tab ! in mobile there's no problem but in galaxy tab whenever I try to zoom recieve this error : FATAL EXCEPTION:…
Aida E
  • 1,108
  • 2
  • 22
  • 40
0
votes
1 answer

Changing javascript var in processingjs & load different txt file int html depends on the var

This two question is happend in the same html. I have a .pde file will detect user mouse click, and there are few object in it, if the user click on the first one, I will get '1' as output and so on. And I have create a var in javascript to store…
OOLONG
  • 1
  • 1
0
votes
1 answer

jQuery plugin for Processing.js not works in chrome when uploaded content in webpage

i'm new on jquery, and i have a doubt about use of jquery use with Processing.js I have some of links on sidebar; each of them is a lesson, and in one of these lessons i have a

blablablablabla

() Then, when user…
gcrav
  • 89
  • 1
  • 3
  • 10
0
votes
1 answer

Using Processing.js across multiple pages

I have a problem using processing.js across multiple pages. I have a master page (test.html) which loads, via jquery, all pages into a div named "contentarea". This is just an exerpt of "test.html", just so you get the idea:
J_B
  • 23
  • 6
0
votes
1 answer

How to precompile processingjs sketch to speed load times?

The loading times of my processingjs webpage are getting pretty hairy. How can I precache the compilation of processing to javascript? It would be acceptable for my application to compile on first entering the webpage (maybe keeping the result in…
tenpn
  • 4,556
  • 5
  • 43
  • 63
0
votes
2 answers

How to run processing.js using jQuery's getScript

I have made a processing sketch which I want to include on my blog. The recommended way like so works fine: I only want to load processingjs if there is an sketch on the page, I wanted to achieve this…
askmike
  • 1,900
  • 4
  • 21
  • 27
-1
votes
1 answer

(ProcessingJS) Pixelating noise

As the title states, I want to know how to pixelate noise. I am using the code below to optimize performance: var totalXoff = 0.0; var draw = function() { background(0, 255, 255); if (!this.loadPixels){ return; } …
Voxel
  • 64
  • 9
-1
votes
1 answer

Change the shape of an object while moving using Javascript processing.js library

I am doing an online Javascript course in khan academy. I am doing a project on that course. I want my object to change shape from eclipse to a rectangle and repeat it while moving. I wrote a code. But I cannot see the eclipse. The way it is moving…
-1
votes
1 answer

sqrt(-1) is broken. What happened?

I'm trying to let i be the square root of -1 (sqrt(-1)). It is a defined value: i = sqrt(-1) var i = sqrt(-1); fill(0, 0, 0); text(i, 25, 25); It gives me an error. What happened?
user11542006