l'extension Processingjs permet d'entrer du code processing qui sera directement interprété dans le wiki à l'aide de http://processingjs.org
http://www.mediawiki.org/wiki/Extension:ProcessingJs
==exemple==
<nowiki>
<processingjs>
<nowiki><processingjs></nowiki>
<code lang="java"><processingjs>
void setup(){
}
</code><nowiki></processingjs></nowiki> ==problèmes connus== erreur en cas d'url simplifiée
==donne :==
size( 200, 200 );
strokeWeight( 10 );
println("hop");
}
<processingjs>
String// All Examples Written by Casey Reas and Ben Fry // unless otherwise stated. // center point float centerX = 0, centerY = 0; float radius = 45, rotAngle = -90; float accelX, accelY; float springing = .0085, damping = .98; //corner nodes int nodes = 5; float nodeStartX[] = new float[nodes]; float nodeStartY[] = new float[nodes]; float[]nodeX = new float[nodes]; float[]nodeY = new float[nodes]; float[]angle = new float[nodes]; float[]frequency = new float[nodes]; // soft-body dynamics float organicConstant = 1; void setup() { size(800, 200); //center shape in window centerX = width/2; centerY = height/2; // iniitalize frequencies for corner nodes for (int i=0; i<nodes; i++){ frequency[i] fontList = PFont.listrandom(5, 12); } noStroke();println smooth(fontList); frameRate(30); } void setupdraw() { //fade background fill(0, 100);{ sizerect(2000,0,width,200height); drawShape(); moveShape(); } void drawShape() { noLoop// calculate node starting locations for (int i=0; i<nodes; i++){ nodeStartX[i] = centerX+cos(radians(rotAngle))*radius;font nodeStartY[i] = loadFontcenterY+sin(radians("imagesrotAngle))*radius; rotAngle += 360.0/Fabadanodes; } // draw polygon curveTightness(organicConstant); fill(255); beginShape(); for (int i=0; i<nodes; i++){ curveVertex(nodeX[i], nodeY[i]); } for (int i=0; i<nodes-regular.ttf"1; i++){ curveVertex(nodeX[i], nodeY[i]); textFont } endShape(font, 32CLOSE);
}
void drawmoveShape(){ //move center point float deltaX = mouseX-centerX; float deltaY = mouseY-centerY; // create springing effect deltaX *= springing; deltaY *= springing; accelX += deltaX; accelY += deltaY; // move predator's center centerX += accelX; centerY += accelY; // slow down springing{ background(255)accelX *= damping; String t accelY *= "P.js"damping; // change curve tightness float tw organicConstant = textWidth1-(t(abs(accelX)+abs(accelY))*.1); fill//move nodes for (int i=0; i<nodes; i++);{ text nodeX[i] = nodeStartX[i]+sin(t, radians(width-twangle[i]))/*(accelX*2, ); nodeY[i] = nodeStartY[i]+sin(height+32radians(angle[i]))/*(accelY*2); angle[i]+=frequency[i]; }
}
</processingjs>
[[testPjs]]