After updating to r99, I've encountered an issue with my instanceof checks no longer working properly.
For example, when I traverse through an object and check if its children are instances of Mesh, it's returning false. However, if I inspect child.constructor.name
, it shows as Mesh.
object.traverse(child => {
console.log(child);
if (child instanceof THREE.Mesh) {
console.log('THREE.Mesh');
} else {
console.log('NOT THREE.Mesh');
}
console.log(child.constructor.name);
console.log('----');
}
https://i.sstatic.net/gBxZf.png
What could have possibly gone wrong or changed when simply updating the library?