update
This commit is contained in:
parent
5c8e3ae20c
commit
91d471ea15
@ -21,7 +21,7 @@
|
||||
function draw() {
|
||||
background(0);
|
||||
|
||||
drawGrid(32);
|
||||
drawGrid(255, 32);
|
||||
textInfo("作品模板", "2022-12-12");
|
||||
}
|
||||
</script>
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
function draw() {
|
||||
background(0);
|
||||
drawGrid(32);
|
||||
drawGrid(255, 32);
|
||||
单摆.draw();
|
||||
单摆.update();
|
||||
textInfo("单摆", "2022-12-14");
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
function draw() {
|
||||
background(255);
|
||||
drawGrid(32, 0);
|
||||
drawGrid(0);
|
||||
|
||||
let hx = width / 2;
|
||||
let hy = 100;
|
||||
|
@ -30,7 +30,7 @@
|
||||
function draw() {
|
||||
clear();
|
||||
background(0);
|
||||
drawGrid(32);
|
||||
drawGrid(255);
|
||||
|
||||
if (
|
||||
mouseIsPressed &&
|
||||
|
@ -33,7 +33,7 @@
|
||||
|
||||
function draw() {
|
||||
background(0);
|
||||
drawGrid(32);
|
||||
drawGrid(255);
|
||||
|
||||
for (let i = 0; i < plantsNumber; i++) {
|
||||
planets[i].update();
|
||||
|
@ -36,7 +36,7 @@
|
||||
|
||||
function draw() {
|
||||
clear();
|
||||
background(64);
|
||||
background(0);
|
||||
drawGrid();
|
||||
转盘.update();
|
||||
转盘.draw();
|
||||
@ -67,8 +67,8 @@
|
||||
draw() {
|
||||
push();
|
||||
// 绘制盘面
|
||||
fill(0);
|
||||
stroke(200);
|
||||
fill(200);
|
||||
stroke(128);
|
||||
strokeWeight(2);
|
||||
translate(this.x, this.y);
|
||||
circle(0, 0, 500);
|
||||
@ -85,7 +85,7 @@
|
||||
// 绘制文字
|
||||
push();
|
||||
noStroke();
|
||||
fill(200);
|
||||
fill(0);
|
||||
if (i == Math.floor(this.hand.heading / 每一格的角度)) {
|
||||
fill("red");
|
||||
stroke("yellow");
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
function draw() {
|
||||
background(0);
|
||||
drawGrid(32);
|
||||
drawGrid(255);
|
||||
playdemos([追逐鼠标, 小车追逐, 小车巡游, 小车巡线], 10);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
function draw() {
|
||||
background(0);
|
||||
drawGrid(32);
|
||||
drawGrid(255);
|
||||
noFill();
|
||||
strokeWeight(2);
|
||||
stroke("lightgreen");
|
||||
|
@ -5,11 +5,14 @@ function loadJavaScript(path) {
|
||||
}
|
||||
|
||||
function playdemos(list, delay = 10) {
|
||||
let n = Math.floor((frameCount / (delay * 60)) % list.length);
|
||||
list[n]();
|
||||
let fps = frameRate();
|
||||
fps = 60;
|
||||
let n = floor((frameCount / (delay * fps)) % list.length);
|
||||
let func = list[n];
|
||||
func();
|
||||
}
|
||||
|
||||
function drawGrid(fade = 64, color = 255) {
|
||||
function drawGrid(color = 255, fade = 32) {
|
||||
push();
|
||||
colorMode(RGB);
|
||||
stroke(color, fade);
|
||||
|
Loading…
Reference in New Issue
Block a user