You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let y = 100;
function setup() {
createCanvas(512, 512);
fill(255, 0, 0);
}
function draw() {
if (keyIsDown(LEFT_ARROW)) {
x -= 5;
}
if (keyIsDown(RIGHT_ARROW)) {
x += 5;
}
if (keyIsDown(UP_ARROW)) {
y -= 5;
}
if (keyIsDown(DOWN_ARROW)) {
y += 5;
}
clear();
ellipse(x, y, 50, 50);
describe(`50-by-50 red ellipse moves left, right, up, and
down with arrow presses.`);
}
截图:(可选)gif/png/jpg
后续更新计划:
The text was updated successfully, but these errors were encountered:
推荐项目
亮点:可以通过p5独创的方法描绘图形并进行交互。
示例代码:(可选)
截图:(可选)gif/png/jpg
后续更新计划:
The text was updated successfully, but these errors were encountered: