Нужно написать комментарием что означает каждая из этих строчек:
float x;
float easing = 0.01;
float diameter = 12;
void setup() {
size(220, 120);
smooth();
}
void draw() {
float targetX = mouseX;
x += (targetX - x) * easing;
ellipse(x, 40, 12, 12);
println(targetX + " : " + x);
}
И ещё
float x;
float y;
float px;
float py;
float easing = 0.05;
void setup() {
size(480, 120);
smooth();
stroke(0, 102);
}
void draw() {
float targetX = mouseX;
x += (targetX - x) * easing;
float targetY = mouseY;
y += (targetY - y) * easing;
float weight = dist(x, y, px, py);
strokeWeight(weight);
line(x, y, px, py);
py = y;
px = x;
}
167
332
Ответы на вопрос:
Популярно: Информатика
-
кирилл243403.06.2023 23:19
-
Princesska8828.06.2022 05:21
-
Лидуня27051630.04.2023 18:17
-
ГАЛЯ200626101144406.08.2022 17:04
-
vitek000027.02.2021 21:34
-
chertan9805.09.2020 00:30
-
svetika081315.06.2021 20:06
-
Lubimka0108.06.2021 16:25
-
perrybazinga03.12.2021 04:45
-
hshgahahah07.12.2022 06:39