You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resources like Accessors may be considered 'in use' by prune() if they're referenced by unused primitives or primitive targets. Because no references exist to the primitives or primitive targets, we won't find those and dispose them when iterating over meshes, and the empty accessors are written to disk despite no real use.
The other non-root entity types in the core spec are TextureInfo, AnimationSampler, and AnimationChannel. TextureInfo won't have this issue, but the other two might. Conceivably this could also happen with extensions, but prune() doesn't currently attempt to identify unused extension resources, so that's out of scope for now.
Perhaps it would be better to do a formal tree-shake, iterating all nodes in the graph, and pruning those we can't trace to the Root? This might simplify the current implementation of prune() as well.
The text was updated successfully, but these errors were encountered:
I think doing a full prune of everything could potentially be problematic if there are other unused resources purposefully in the file (e.g. some extra materials).
Resources like Accessors may be considered 'in use' by prune() if they're referenced by unused primitives or primitive targets. Because no references exist to the primitives or primitive targets, we won't find those and dispose them when iterating over meshes, and the empty accessors are written to disk despite no real use.
The other non-root entity types in the core spec are TextureInfo, AnimationSampler, and AnimationChannel. TextureInfo won't have this issue, but the other two might. Conceivably this could also happen with extensions, but prune() doesn't currently attempt to identify unused extension resources, so that's out of scope for now.
Perhaps it would be better to do a formal tree-shake, iterating all nodes in the graph, and pruning those we can't trace to the Root? This might simplify the current implementation of prune() as well.
The text was updated successfully, but these errors were encountered: