Open prisonerjohn opened 10 years ago
Comment by aengelke Sunday May 19, 2013 at 14:10 GMT
Processing.js doesn't support clear. (I think its not a bug, perhaps it might go to the js-repo or the forum)
Comment by fjenett Sunday May 19, 2013 at 14:49 GMT
I added a bug report to the ProcessingJS bug tracker: https://processing-js.lighthouseapp.com/projects/41284-processingjs/tickets/2023-clear-is-missing
Comment by REAS Sunday May 19, 2013 at 16:29 GMT
@fedekrum In the future, please report JavaScript Mode bugs to the JavaScript Mode repo owned by @fjenett or directly to the Processing.js project is the issue is there.
Issue by fedekrum Sunday May 19, 2013 at 12:47 GMT Originally opened as https://github.com/processing/processing-web/issues/147
This is the basic continoues line example modified to clear screen if "C" key is pressed. It works on Java Mode and as an application to, but in Javascript Mode it hangs after pressing the "C" key.
/**
void setup() { size(640, 360); background(255, 128, 128); }
void draw() { if (keyPressed) { if ((key == 'c') || (key == 'C')) { clear(); background(255, 128, 128); text("erased",30,30); } } stroke(0); if (mousePressed == true) { line(mouseX, mouseY, pmouseX, pmouseY); } }