eye animation
This commit is contained in:
parent
e4c9793d9a
commit
f3a917bb3a
11 changed files with 2240 additions and 5 deletions
27
solar.js
Normal file
27
solar.js
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
function setup() {
|
||||
createCanvas(400, 400);
|
||||
}
|
||||
|
||||
function draw() {
|
||||
background(0);
|
||||
|
||||
let time = millis() / 1000;
|
||||
|
||||
translate(200, 200)
|
||||
noFill();
|
||||
stroke(255)
|
||||
circle(0, 0, 240)
|
||||
fill(255, 255, 30)
|
||||
circle(0, 0, 50)
|
||||
|
||||
|
||||
|
||||
translate(cos(time) * 120, sin(time) * 120);
|
||||
fill(24, 22, 234);
|
||||
circle(0, 0, 20);
|
||||
|
||||
translate(cos(time * 3) * 60, sin(time * 3) * 60);
|
||||
fill(222);
|
||||
circle(0, 0, 10);
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue