28 lines
604 B
JavaScript
28 lines
604 B
JavaScript
function setup() {
|
||
createCanvas(600, 600);
|
||
angleMode(DEGREES);
|
||
cursor(CROSS);
|
||
frameRate(60);
|
||
}
|
||
|
||
function draw() {
|
||
background(64);
|
||
}
|
||
|
||
function drawGrid() {
|
||
push();
|
||
stroke(0, 64);
|
||
strokeWeight(1);
|
||
for (let x = 0; x < width; x += 10) line(x, 0, x, height);
|
||
for (let y = 0; y < height; y += 10) line(0, y, width, y);
|
||
pop();
|
||
}
|
||
|
||
function textInfo() {
|
||
noStroke();
|
||
fill(0);
|
||
text("作品:太阳公公", 30, height - 70);
|
||
text("作者:赵海洋爸爸", 30, height - 50);
|
||
text("日期:2022/12/11", 30, height - 30);
|
||
}
|