Skip to content

Commit

Permalink
Merge branch 'main' into dev-thomas
Browse files Browse the repository at this point in the history
  • Loading branch information
Thumuss authored Dec 8, 2023
2 parents 11b5a81 + 35f1ad7 commit a3bc4ab
Show file tree
Hide file tree
Showing 29 changed files with 329 additions and 602 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ archives/

# local env files
.env*.local

.idea
.idea/
1 change: 1 addition & 0 deletions ndi2023
Submodule ndi2023 added at 69993a
512 changes: 16 additions & 496 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"lint": "next lint"
},
"dependencies": {
"@pixi/react": "^7.1.1",
"autoprefixer": "^10.0.1",
"next": "14.0.3",
"pixi.js": "^7.3.2",
"postcss": "^8",
"react": "^18",
"react-dom": "^18",
Expand Down
File renamed without changes.
File renamed without changes
Binary file added public/img/Capture d'écran 2023-12-08 023632.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/bin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added public/img/pixel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/waste1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/waste2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/waste3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/waste4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/waste5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/waste6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/waste7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/waste8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/waste9.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
150 changes: 150 additions & 0 deletions public/jeuRythme/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,155 @@ export default {
{ touche: "l", delais: 4200, durée: 1200 },
{ touche: "t", delais: 4800 },
{ touche: "t", delais: 5000 },
{ touche: "l", delais: 6400 },
{ touche: "l", delais: 6700 },
{ touche: "l", delais: 7000 },
{ touche: "l", delais: 7300 },
{ touche: "b", delais: 7600 },
{ touche: "b", delais: 7800 },
{ touche: "t", delais: 8100 },
{ touche: "t", delais: 8200 },
{ touche: "t", delais: 8300 },
{ touche: "b", delais: 8600 },
{ touche: "b", delais: 8700 },
{ touche: "r", delais: 8900 },
{ touche: "r", delais: 9300 },
{ touche: "r", delais: 9700 },
{ touche: "l", delais: 9800 },
{ touche: "l", delais: 10000 },
{ touche: "l", delais: 10200 },
{ touche: "t", delais: 10500 },
{ touche: "t", delais: 10600 },
{ touche: "t", delais: 10700 },
{ touche: "b", delais: 11000 },
{ touche: "b", delais: 11100 },
{ touche: "r", delais: 11300 },
{ touche: "r", delais: 11700 },
{ touche: "r", delais: 12100 },
{ touche: "l", delais: 12200 },
{ touche: "l", delais: 12400 },
{ touche: "l", delais: 12600 },
{ touche: "t", delais: 12900 },
{ touche: "t", delais: 13000 },
{ touche: "t", delais: 13100 },
{ touche: "b", delais: 13400 },
{ touche: "b", delais: 13500 },
{ touche: "r", delais: 13700 },
{ touche: "r", delais: 14100 },
{ touche: "r", delais: 14500 },
{ touche: "l", delais: 14600 },
{ touche: "l", delais: 14800 },
{ touche: "l", delais: 15000 },
{ touche: "t", delais: 15300 },
{ touche: "t", delais: 15400 },
{ touche: "t", delais: 15500 },
{ touche: "b", delais: 15800 },
{ touche: "b", delais: 15900 },
{ touche: "r", delais: 16100 },
{ touche: "r", delais: 16400 },
{ touche: "r", delais: 16450 },
{ touche: "r", delais: 16500 },
{ touche: "r", delais: 16550 },
{ touche: "r", delais: 16700 },
{ touche: "r", delais: 16750 },
{ touche: "r", delais: 16800 },
{ touche: "l", delais: 16900 },
{ touche: "l", delais: 17100 },
{ touche: "l", delais: 17300 },
{ touche: "t", delais: 17600 },
{ touche: "t", delais: 17700 },
{ touche: "t", delais: 17800 },
{ touche: "b", delais: 18100 },
{ touche: "b", delais: 18200 },
{ touche: "r", delais: 18400 },
{ touche: "r", delais: 18800 },
{ touche: "r", delais: 19200 },
{ touche: "l", delais: 19300 },
{ touche: "l", delais: 19500 },
{ touche: "l", delais: 19700 },
{ touche: "t", delais: 20000 },
{ touche: "t", delais: 20100 },
{ touche: "t", delais: 20200 },
{ touche: "b", delais: 20500 },
{ touche: "b", delais: 20600 },
{ touche: "r", delais: 20800 },
{ touche: "r", delais: 21200 },
{ touche: "r", delais: 21600 },
{ touche: "l", delais: 21700 },
{ touche: "l", delais: 21900 },
{ touche: "l", delais: 22100 },
{ touche: "t", delais: 22400 },
{ touche: "t", delais: 22500 },
{ touche: "t", delais: 22600 },
{ touche: "b", delais: 22900 },
{ touche: "b", delais: 23000 },
{ touche: "r", delais: 23200 },
{ touche: "r", delais: 23600 },
{ touche: "r", delais: 24000 },
{ touche: "l", delais: 24100 },
{ touche: "l", delais: 24300 },
{ touche: "l", delais: 24500 },
{ touche: "t", delais: 24800 },
{ touche: "t", delais: 24900 },
{ touche: "t", delais: 25000 },
{ touche: "b", delais: 25300 },
{ touche: "b", delais: 25400 },
{ touche: "r", delais: 25600 },
{ touche: "r", delais: 25900 },
{ touche: "r", delais: 25950 },
{ touche: "r", delais: 26000 },
{ touche: "r", delais: 26050 },
{ touche: "r", delais: 26200 },
{ touche: "r", delais: 26250 },
{ touche: "r", delais: 26300 },
{ touche: "l", delais: 26400 },
{ touche: "l", delais: 26500 },
{ touche: "l", delais: 26700 },
{ touche: "t", delais: 27000 },
{ touche: "t", delais: 27100 },
{ touche: "t", delais: 27200 },
{ touche: "b", delais: 27500 },
{ touche: "b", delais: 27600 },
{ touche: "r", delais: 27800 },
{ touche: "r", delais: 28200 },
{ touche: "r", delais: 28600 },
{ touche: "l", delais: 28700 },
{ touche: "l", delais: 28900 },
{ touche: "l", delais: 29100 },
{ touche: "t", delais: 29400 },
{ touche: "t", delais: 29500 },
{ touche: "t", delais: 29600 },
{ touche: "b", delais: 29900 },
{ touche: "b", delais: 30000 },
{ touche: "r", delais: 30200 },
{ touche: "r", delais: 30600 },
{ touche: "r", delais: 30000 },
{ touche: "l", delais: 30100 },
{ touche: "l", delais: 30300 },
{ touche: "l", delais: 30500 },
{ touche: "t", delais: 30800 },
{ touche: "t", delais: 30900 },
{ touche: "t", delais: 31000 },
{ touche: "b", delais: 31300 },
{ touche: "b", delais: 31400 },
{ touche: "r", delais: 31600 },
{ touche: "r", delais: 32000 },
{ touche: "r", delais: 32400 },
{ touche: "l", delais: 32500 },
{ touche: "l", delais: 32700 },
{ touche: "l", delais: 32900 },
{ touche: "t", delais: 33200 },
{ touche: "t", delais: 33300 },
{ touche: "t", delais: 33400 },
{ touche: "b", delais: 33700 },
{ touche: "b", delais: 33800 },
{ touche: "r", delais: 34000 },
{ touche: "r", delais: 34300 },
{ touche: "r", delais: 34350 },
{ touche: "r", delais: 34400 },
{ touche: "r", delais: 34450 },
{ touche: "r", delais: 34600 },
{ touche: "r", delais: 34650 },
{ touche: "r", delais: 34700 },
],
};
117 changes: 15 additions & 102 deletions public/jeuRythme/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,105 +3,18 @@
<head>
<script src="https://pixijs.download/release/pixi.min.js"></script>
</head>
<body>
<script type="module">
import obj from "./chart.js";
// Create the application helper and add its render target to the page
let app = new PIXI.Application({
width: 640,
height: 460,
background: "green",
});
document.body.appendChild(app.view);

// Create the sprite and add it to the stage
let center = PIXI.Sprite.from("pixel.png");
let left = PIXI.Sprite.from("pixel.png");
let right = PIXI.Sprite.from("pixel.png");
let up = PIXI.Sprite.from("pixel.png");
let down = PIXI.Sprite.from("pixel.png");

app.stage.addChild(center);
app.stage.addChild(left);
app.stage.addChild(right);
app.stage.addChild(up);
app.stage.addChild(down);

center.x = app.screen.width / 2;
center.y = app.screen.height / 2;

left.y = app.screen.height / 2;

right.y = app.screen.height / 2;
right.x = app.screen.width - 30;

up.x = app.screen.width / 2;

down.y = app.screen.height - 30;
down.x = app.screen.width / 2;

let goRight = false;

let time = 0;
let basicText = new PIXI.Text(time);

basicText.x = 50;
basicText.y = 100;

app.stage.addChild(basicText);

basicText.text = time;

document.addEventListener(
"keydown",
(event) => {
if (event.key == "ArrowRight") {
alert("ok");
}
if (event.key == "ArrowLeft") {
alert("ok");
}
if (event.key == "ArrowUp") {
alert("ok");
}
if (event.key == "ArrowDown") {
alert("ok");
}
},
false,
);

let tableLeft = [];

function slideRight(index, delta) {
if (tableLeft[index].x < center.x) {
tableLeft[index].x += 2 * delta;
}
}

function createCube() {
let cube = PIXI.Sprite.from("pixel.png");
app.stage.addChild(cube);
cube.y = app.screen.height / 2;
tableLeft.push(cube);
}

function addCube(t, index, delta) {
if (ms > t && ms <= t + 50) {
createCube();
}
if (ms > t) {
slideRight(index, delta);
}
}

app.ticker.maxFPS = 60;
app.ticker.add((delta) => {
ms = Math.round(ms + 1000 / 60);
basicText.text = ms;

addCube(1000, delta);
});
</script>
</body>
</html>
<body>
<script type="module" src="./index.js"></script>
<div id="start">Le but est d'appuyez sur les flèches pour ramassez les ordures, appuyez sur <b>StartGame</b> pour commencer !</div>
<input type="button" id="bouton" value="Start game"/>
<script>

</script>
<style>
body {
padding: 0;
margin: 0;
}
</style>
</body>
</html>
Loading

0 comments on commit a3bc4ab

Please sign in to comment.