Skip to content

Commit 159509f

Browse files
committed
Added label for sliders
1 parent 0113f5f commit 159509f

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

gravity/js/canvas.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ function setup() {
3030
setInterval(refreshFPS, 1000);
3131
setInterval(refreshJson, 30000);
3232

33-
gravity = createSlider(0, 2, 0.3, 0.01);
34-
gravity.position(50, height - 50);
35-
gravity.style("width", "150px");
36-
3733
length = createSlider(5, 200, 35, 1);
38-
length.position(50, height - 75);
34+
length.position(50, height - 50);
3935
length.style("width", "150px");
4036

37+
gravity = createSlider(0, 2, 0.3, 0.01);
38+
gravity.position(50, height - 100);
39+
gravity.style("width", "150px");
40+
4141
showNames = createCheckbox("Afficher les noms", false);
42-
showNames.position(45, height - 100);
42+
showNames.position(45, height - 150);
4343
showNames.style("font-family","Arial");
4444
showNames.style("color","white");
4545
}
@@ -53,6 +53,11 @@ function draw() {
5353
}
5454

5555
showDate();
56+
57+
fill(255);
58+
textSize(16);
59+
text("Taille des trainées", 50, height - 55);
60+
text("Force d'attraction", 50, height - 105);
5661
}
5762

5863
function windowResized(){

0 commit comments

Comments
 (0)