Implement _setupPicking method for mesh traversal and user data storage

This commit is contained in:
2025-05-28 04:55:05 +02:00
parent 2c1313e344
commit 47b99084b2

View File

@@ -358,6 +358,15 @@ class Spirit {
}
});
}
_setupPicking() {
// Hier ein einfacher Ansatz: Mesh mit Info-Objekt merken!
this.gltf.traverse(mesh => {
if (mesh.isMesh) {
mesh.userData._spiritInfo = this.info;
}
});
}
}
// ---- Szene initialisieren ----