Remove unnecessary console.log and add logging for spirit loading process in app.js

This commit is contained in:
2025-05-28 02:54:25 +02:00
parent eae86f06bf
commit 83c007b9d0

View File

@@ -271,7 +271,6 @@ ws.addEventListener('message', async (event) => {
const msg = JSON.parse(event.data);
if (msg.type === 'spirit') {
await showSpirit(msg.data);
console.log(msg.data);
}
});
@@ -282,6 +281,7 @@ async function showSpirit(spirit) {
// Optional: Materialien etc. dispose() aufrufen
currentSpiritGroup = null;
}
console.log("Lade Spirit", spirit.modelUrl);
// Modell laden
const { scene: spiritObj } = await gltfLoader.loadAsync(spirit.modelUrl);
spiritObj.traverse(mesh => {
@@ -291,6 +291,7 @@ async function showSpirit(spirit) {
// weitere Material-Anpassungen...
}
});
console.log("Spirit wurde der Szene hinzugefügt!", spiritObj);
// Positionierung, z.B. am Boden leicht nach hinten
spiritObj.position.set(0, 0, 0);
scene.add(spiritObj);