Compare commits

..

2 Commits

Author SHA1 Message Date
SimonezYT 508534f905 . 2026-04-10 12:01:20 +02:00
SimonezYT bd6f2b2907 aggiornamento modello 3d 2026-04-10 11:59:55 +02:00
3 changed files with 10 additions and 1 deletions
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+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) => {