Wondering what the best practice/technique is for using AssetsManager with clones. In short: setting up a bunch of GLB load tasks… but for any load where the filepath is identical, cloning instead of loading a-fresh.
Is it an either/or thing?
- If file not already loaded: use the AssetsManager OR
- If file already loaded: run a separate cloning function (don’t use AssetsManager)
I’ve tried some cloning logic within my addMeshTask function, but it’s getting spaghetti… and doesn’t work with more than 1 file being loaded at a time, since the mesh is only available to be cloned after the batch of load tasks have been run.
What I’m looking for is a setting on AssetsManager that’s like “useClones = true.” Or am I just over-doing this? If the file is saved in browser cache, is there any performance benefit to cloning in the first place? (noting that I can’t use a Mesh Instance or SPS since materials are different per clone).
Thanks for any tips!