» codelab : http://codelab.fr/accueil » Forum : Processing : http://codelab.fr/processing » Problème de background : http://codelab.fr/5888 Ceci est la version imprimable d'un sujet du forum, pour retourner à la version complète : Problème de background |
PHIFO — 2015-08-04 09:01:41 |
Bonjour, |
Olivier — 2015-08-04 10:58:50 |
Hello... |
Mushussu — 2015-08-04 11:20:00 |
Bonjour, // variable FR float a = 0; float b = -55; float ax = 4.18; float ca1 = 255; // variable ANG float aa = 300; float ba = -55; float aax = 6; float caa1 =255; void setup() { size(1260, 720, P2D); textSize(80); frameRate(24); } void draw() { background(255); ANG(); FRH(); FRHl(); } void FRH() { pushMatrix(); pushStyle(); translate(a, b); noStroke(); fill(#FF0000, ca1); rect(0, 0, 800, 110); a += ax; b += 1; if (a >191) { ax = ax*-1; } if (a < 0) { ax = ax*-1; } if (b > 143) { ca1 -=4; } if (b> height/5) { a = 65; b =144; } popStyle(); popMatrix(); } void FRHl() { pushMatrix(); if (frameCount >200) { translate(80, 230); fill(#FF0000); text( "HUMANITE EN PAIX", 0, 0); } popMatrix(); } void ANG() { pushMatrix(); if ( frameCount > 100) { translate(aa, ba); noStroke(); fill(#1203FF, caa1); rect(0, 0, 1000, 110); aa += aax; ba += 1; if (aa >300) { aax = aax*-1; } if (aa < 0) { aax = aax*-1; } if (ba > 250) { caa1 -=1.5; } if (ba> 250) { aa = 200; ba =250; } } popMatrix(); } |
PHIFO — 2015-08-04 13:41:38 |
Merci Mushssu, ok mon idée en travaillant en univers 3D était de mettre les rectangles plus ou moins en avant les uns des autres. Donc je comprends que pour travailler en univers 3D il faut des volumes. |