first commit
parent
cc77e77c24
commit
ebde3ee9c2
|
@ -0,0 +1,17 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>Sketch</title>
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="style.css">
|
||||
|
||||
<script src="libraries/p5.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="sketch.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"include": [
|
||||
"*.js",
|
||||
"libraries/*.js",
|
||||
"/home/luna/.vscode-oss/extensions/samplavigne.p5-vscode-1.2.7/p5types/global.d.ts"
|
||||
]
|
||||
}
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,34 @@
|
|||
let ma;
|
||||
|
||||
function setup() {
|
||||
createCanvas(windowWidth, windowHeight, WEBGL);
|
||||
ma = atan(cos(QUARTER_PI));
|
||||
}
|
||||
|
||||
function draw() {
|
||||
background(100);
|
||||
rotateX(-ma);
|
||||
rotateY(-QUARTER_PI);
|
||||
let gap = 5 + sin(millis() / 500) * 15
|
||||
let colorMap = map(gap, -10, 20, 20, 40)
|
||||
translate(-(gap + 40) * 4.5, -(gap + 50) * 4.5, -(gap + 40) * 4.5);
|
||||
|
||||
for (let x = 0; x < 10; x++) {
|
||||
push()
|
||||
for (let y = 0; y < 10; y++) {
|
||||
push()
|
||||
for (let z = 0; z < 10; z++) {
|
||||
noStroke()
|
||||
fill(x * colorMap, y * colorMap, z * colorMap)
|
||||
box(20)
|
||||
translate(0, 0, 35 + gap)
|
||||
}
|
||||
pop()
|
||||
translate(0, 35 + gap, 0)
|
||||
}
|
||||
pop()
|
||||
translate(35 + gap, 0, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue