too tired for this shit object3d is not instance of mesh wtf

This commit is contained in:
CJSatnarine
2025-02-28 21:17:04 -05:00
parent 466115060a
commit 04b036dbc9
3 changed files with 182 additions and 170 deletions

12
main.js
View File

@@ -23,6 +23,18 @@ const objectLoader = new OBJLoader();
objectLoader.load(
headURL,
function(object) {
console.log(object);
scene.traverse((object) => {
if (object instanceof THREE.Mesh) {
console.log('is instance of mesh');
object.material = new THREE.MeshStandardMaterial({color: 0x962FFE});
object.material.wireframe = true;
} else {
console.log('not instance of mesh');
}
});
scene.add(object);
},
function(xhr) {