Skip to content

Sorting nodes and meshes #66

@panreyes

Description

@panreyes

It would be nice to have the nodes and meshes sorted in the "Advanced run" tab

I probably made it the wrong way, but this is what I added in user.handlebars.
Before parent.nodes.forEach(function(i) {:
Added parent.nodes.sort((a,b) => (a.name > b.name) ? 1 : -1);

and

Before for (const i in parent.meshes) { // parent.meshes.forEach(function(i) {
Added

const sortedEntries = Object.entries(parent.meshes).sort(([, v1], [, v2]) => {
  const a = v1 && v1.name ? v1.name : "";
  const b = v2 && v2.name ? v2.name : "";
  return a > b ? 1 : a < b ? -1 : 0;
});
parent.meshes = Object.fromEntries(sortedEntries);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions