Extension:processingjs
l'extension Processingjs permet d'entrer du code processing qui sera directement interprété dans le wiki à l'aide de http://processingjs.org
exemple
<processingjs> void setup(){ size( 200, 200 ); strokeWeight( 10 ); } void draw(){ background(0); ellipse( mouseX, mouseY, 100, 100 ); } </processingjs>
donne :
<processingjs> void setup(){
size( 200, 200 ); strokeWeight( 10 );
}
void draw(){
background(0); ellipse( mouseX, mouseY, 100, 100 );
}
</processingjs>
<processingjs>
void setup(){
size( 600, 100 ); strokeWeight( 10 );
}
void draw(){
background(200,20,10); ellipse( mouseX, mouseY, 100, 100 );
}
</processingjs>
<processingjs> /* @pjs font="images/Fabada-regular.ttf"; */
void setup() {
size(200,200); noLoop(); textFont(createFont("Fabada-regular",32));
}
void draw() {
background(255); String t = "P.js"; float tw = textWidth(t); fill(0); text(t, (width-tw)/2, (height+32)/2);
} </processingjs>