To avoid eval()ing the sort function, I moved it into the worker altogether. This simplifies the code but prevents using the sort method from outside the worker, which I don't think is a big problem since it's called every frame (or at least often) anyways.
This PR is based on #4 but should also work on its own.
To avoid eval()ing the sort function, I moved it into the worker altogether. This simplifies the code but prevents using the sort method from outside the worker, which I don't think is a big problem since it's called every frame (or at least often) anyways.
This PR is based on #4 but should also work on its own.