p5js/sketch-template.js
2022-12-11 23:34:40 +08:00

28 lines
604 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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);
}