Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
patavinas
patavinas's Profile
1
Posts
3
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
use processing.js variables values in a processing/java applet?
[6 Replies]
13-Oct-2011 07:11 AM
Forum:
Integration and Hardware
Hello,
I would like to create a webpage using *both* processing.js and processing.
The processing.js would create the visuals with some parameters (ints, floats, etc).
I need to access those values from the processing applet, which will use them to generate sounds.
By now, I'm lost with the correct way to do that...
.. should I use netscape.javascript library? JSObjects?
Maybe a small example, with an applet miming a processingjs sketch would be interesting...
...for example, how could I create a mirror of this processing.js code, by accessing the ints "a" and "b" from an applet?
// processing.js code
int a =50;
int b=50;
int w=200;
int h=200;
void setup(){
size(w,h);
}
void draw(){
background(255);
a=a+(random(-1,1))%w;
b=b+(random(-1,1))%h;
fill(0);
rect(a,b,2,2);
}
«Prev
Next »
Moderate user : patavinas
Forum