Compare commits

..

4 Commits

Author SHA1 Message Date
SimonezYT 6afbd2529f db sistemato 2026-04-18 08:13:20 +02:00
SimonezYT d9fc5e8798 . 2026-04-10 18:33:57 +02:00
SimonezYT 508534f905 . 2026-04-10 12:01:20 +02:00
SimonezYT bd6f2b2907 aggiornamento modello 3d 2026-04-10 11:59:55 +02:00
5 changed files with 20 additions and 3 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+9 -1
View File
@@ -6,6 +6,14 @@ CREATE TABLE punteggi (
scoreT INT NOT NULL, -- punteggio finale normalizzato 0-10000
nome VARCHAR(100) NOT NULL
);
CREATE TABLE punteggi_test (
id INT AUTO_INCREMENT PRIMARY KEY,
data_partita DATE NOT NULL,
score1 INT NOT NULL, -- rifiuti raccolti (fase 1)
score2 INT NOT NULL, -- rifiuti separati correttamente (fase 2)
scoreT INT NOT NULL, -- punteggio finale normalizzato 0-10000
nome VARCHAR(100) NOT NULL
);
-- score1: 0-180 (rifiuti raccolti in 1 minuto)
-- score2: 0-score1 (rifiuti separati correttamente)
@@ -18,7 +26,7 @@ CREATE TABLE punteggi (
-- DATI DI TEST
INSERT INTO punteggi (data_partita, score1, score2, scoreT, nome) VALUES
INSERT INTO punteggi_test (data_partita, score1, score2, scoreT, nome) VALUES
('2024-06-01', 150, 120, 7500, 'Simone'),
('2024-06-02', 180, 160, 9444, 'Luca'),
('2024-06-03', 120, 100, 6111, 'Giulia'),
+10 -1
View File
@@ -226,7 +226,7 @@ const trashArray = [];
let score = 0;
const loader = new GLTFLoader(manager);
loader.load('assets/models/rifiuto.glb', (gltf) => {
/*loader.load('assets/models/rifiuto.glb', (gltf) => {
const mesh = gltf.scene.getObjectByName("Trash_Pile_03_GEO");
mesh.geometry.center(); // Centra l'oggetto per collisioni precise
for (let i = 0; i < 20; i++) {
@@ -235,6 +235,15 @@ loader.load('assets/models/rifiuto.glb', (gltf) => {
trashArray.push(clone);
spawn(clone, 0.2);
}
});*/
loader.load('assets/models/trashpile-v1.glb', (gltf) => {
const mesh = gltf.scene;
for (let i = 0; i < 20; i++) {
const clone = mesh.clone();
scene.add(clone);
trashArray.push(clone);
spawn(clone, 0.2);
}
});
loader.load('assets/models/tree.glb', (gltf) => {
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
$servername = "localhost";
$username = "root";
$password = "root";
$password = "";
$dbname = "save-the-island";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {