Good morning!
I have another one of those “works in a playground” but not in a project thing going on. So I’ve been trying to work with multiple lights. I have 7 and want some spheres I’m generating to be ignored by all but 1 light.
I saw this playground and played with it, finding it to my liking.
But when trying it on a local project I got this error:
Uncaught TypeError: a[s]._resyncLighSource is not a function
at Array.e.push (babylon.js:7019)
Thrown at my code in this area:
let dls = Discrepancies.filter(function (disc) {
// returns sphere mesh from an array of objects
return disc.sphere;
});
dls.forEach(function (disc) {
light.excludedMeshes.push(disc); // <== Errors out here
light2.excludedMeshes.push(disc);
light3.excludedMeshes.push(disc);
light4.excludedMeshes.push(disc);
light5.excludedMeshes.push(disc);
light6.excludedMeshes.push(disc);
});
Any thoughts of why this might be?