Open RuimingShen opened 1 month ago
亮点:可以通过p5独创的方法描绘图形并进行交互。
示例代码:(可选)
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.); }
50-by-50 red ellipse moves left, right, up, and down with arrow presses.
- 截图:(可选)gif/png/jpg - 后续更新计划:
推荐项目
亮点:可以通过p5独创的方法描绘图形并进行交互。
示例代码:(可选)
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.
); }