Try changing the observable.addOnce to .add. Change back to addOnce if it doesnt do anything, just seems like low hanging fruit to rule out first.
Try installing the v.37 loaders with v.61 core and visa versa to confirm results, then report back if broken for each. That way we can know which module the affecting change is in and where to start looking.
Start at v.37 and incrementally bump the version until it breaks and report back, we can look for changes between those versions only and find the cause much quicker. You can use codesandbox for this btw, incase your net is prohibitively slow.
it is working with add This was a real PRO tip, thank you! Seems that the observable is called more than once in v.61. Was it an intention or is it a bug? Do someone know? Should we bother or not?
The big meshes in the front on the screenshot are the meshes used as prefabs and they used to hide after adding thin instances to them. Still investigating…
I have a solution finally. The problem is not with the thin instances. I had to add mesh.computeWorldMatrix(true) before I read the original rotation/position/scaling of the mesh which is going to be replaced by a thin instance. Without this line I got not initialized crazy values. But this was working in v.37 without forcing the computation so somewhere between v.37 and v.61 the matrix computation was removed. Not a big deal
@Deltakosh Do you know what could have happened? Is it possible there are some incompatibilities with those changes and .babylon files created before this commit?
On my phone right now but that commit is supposed to be transparent as if it is used with files created before it they will not have the uniqueId info and thus we should call the same code
Even though the changes in babylonFileloader.ts could have manifest the issue, the root cause could be related to something else, possibly at or above SceneLoader in the dependency tree. We know that the SceneLoader is being called multiple times, as evidence by the requirement to use .add instead of .addOnce when instantiating the GLTF loader. The substantial changes in babylonFileloader.ts seem to be the addition of the findParent callback, which now takes a scene argument for traversing meshes, transform nodes, lights and cameras. This is only my intuition , but I feel like this could be a symptom of a change elsewhere causing multiple calls to something that should be memoized.