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>
@pjs font// 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 ="imagesnew float[nodes]; /Fabada/ soft-regular.ttf"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] = random(5, 12); } noStroke(); smooth(); frameRate(30); } void draw() { //fade background fill(0, 100); rect(0,0,width,200height); drawShape(); noLoopmoveShape(); } void drawShape() { // calculate node starting locations for (int i=0; i<nodes; i++){ nodeStartX[i] = centerX+cos(radians(rotAngle))*radius; nodeStartY[i] = centerY+sin(radians(rotAngle))*radius; rotAngle += 360.0/nodes; } // textFontdraw polygon curveTightness(createFontorganicConstant); fill(255); beginShape("Fabada); for (int i=0; i<nodes; i++){ curveVertex(nodeX[i], nodeY[i]); } for (int i=0; i<nodes-regular"1; i++){ curveVertex(nodeX[i],32nodeY[i]); } endShape(CLOSE);
}
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]]