We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello. Try to create first sketch via JavaScriptMode:
void setup() {
size(500, 500, P2D);
}
void draw() {
clear(); // Commented: text becomes pixelate (due to superposition). Uncommented: no text
textSize(30);
fill(#FF0000);
textAlign(LEFT, TOP);
text ("Hello", 50, 50);
}
In JavaMode it ok: i see "Hello" word. In JavaScriptMode have nothing. If comment out "clear();" row, than word becomes visible, but, as you no, we have pixels superposition what looks bad and not applicable for animation.
How to fix this problem?
Answers
JS Mode is @ version 1.4.1 as long as I know Processing. >:P It's very close to old Processing v1.5.1 though! 3:-O
However, function clear() (and a bunch more) is new to Processing 2+. It's merely
background(0, 0);
underneath BtW! #-oThanks a lot!
btw noLoop(); will make sure the draw() loop only executes once - no overdrawing, no wasting of cpu cycles...
And where i can know what functions have same problem? And what functions a must use for JS 1.4.1? For example, next problem in following rows:
If I add this rows in setup - nothing render again.
Sorry for my English. )
Processing 2 launched w/ lotsa a new cool data structures like:
So, if you happen to use any of those, they won't work on JS Mode, sorry.
Perhaps if you grab a recent beta Processing.JS version, you might be luck to find some of them implemented already? :-/
P.S.: You can use loadStrings() + split() as a simple substitute for ".csv" files!
Thanks, GoToLoop. Try to use this constructions
You can gather from http://processingjs.org/reference/ which functions are implemented in ProcessingJS.