rename directories and add adittional dir

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

18
99/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
99/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
99/libraries/p5.min.js vendored Normal file

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

47
99/sketch.js Normal file
View file

@ -0,0 +1,47 @@
const frameRateNumber = 60
const cycleLenght = 600
let pointArray1
let pointArray2
function setup() {
createCanvas(windowWidth, windowHeight);
frameRate(frameRateNumber)
}
function draw() {
const currentCyclePos = frameCount % cycleLenght
switch (true) {
case (currentCyclePos === 1):
pointArray1 = []
//pointArrStart = [{x:1, y: 1},{}];
background(255)
strokeWeight(10)
x1 = windowWidth / 2
y1 = windowHeight
x2 = windowWidth / 2
y2 = windowHeight * 3 / 4
pointArray1.push({x: x1, y: y1})
pointArray1.push({x: x2, y: y2})
console.log(pointArray1)
line(x1, y1, x2, y2)
break
case (currentCyclePos < cycleLenght * 3 / 4):
const lastPoint = pointArray1[pointArray1.length-1]
console.log(lastPoint)
x1 = lastPoint.x
y1 = lastPoint.y
x2 =
y1 =
console.log(x1 + " " + y1)
break
default:
background(255)
break
}
}

8
99/style.css Normal file
View file

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