rename directories and add adittional dir

This commit is contained in:
Yannick7777 2025-04-02 11:01:01 +02:00
commit 905ab331f4
18 changed files with 88 additions and 0 deletions

18
2/index.html Normal file
View file

@ -0,0 +1,18 @@
<!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>
<script src="libraries/p5.sound.min.js"></script>
</head>
<body>
<script src="sketch.js"></script>
</body>
</html>

10
2/jsconfig.json Normal file
View file

@ -0,0 +1,10 @@
{
"compilerOptions": {
"target": "es6"
},
"include": [
"*.js",
"**/*.js",
"/home/melody/.vscode-oss/extensions/samplavigne.p5-vscode-1.2.16/p5types/global.d.ts"
]
}

2
2/libraries/p5.min.js vendored Normal file

File diff suppressed because one or more lines are too long

3
2/libraries/p5.sound.min.js vendored Normal file

File diff suppressed because one or more lines are too long

28
2/sketch.js Normal file
View file

@ -0,0 +1,28 @@
let randomnessSeed
function setup() {
randomnessSeed = random(100)
}
function draw() {
const size = 50
randomSeed(randomnessSeed)
createCanvas(windowWidth, windowHeight);
background(255)
noStroke()
for(let i = 0; i <= innerWidth; i += size){
for(let j = 0; j <= innerWidth; j += size){
colorMode(HSL)
fill(random(180) + mouseX / windowWidth * random(90) + mouseY / windowHeight * random(90),
keyIsPressed ? 0 : 100,
random(50) + mouseX / windowWidth * 25 + mouseY / windowHeight * 25
)
let randomsize = 0
do {
randomsize = randomGaussian(size / 20) * 20
}
while (randomsize >= size + size / 10 || randomsize < size / 10)
circle(i, j, randomsize / 2 + mouseY / windowHeight * 50)
}
}
}

8
2/style.css Normal file
View file

@ -0,0 +1,8 @@
html, body {
margin: 0;
padding: 0;
}
canvas {
display: block;
}