This should be effectively identical to the eval call, except for the possibility of eval grabbing or writing to local variables (a trait that the original code actually relied on). This also feels marginally cleaner, though it's only fractionally more secure.
When using pixi-particles with Rollup.js, it will throw an error if you use eval() directly. See https://github.com/rollup/rollup/wiki/Troubleshooting#avoiding-eval
This should be effectively identical to the
eval
call, except for the possibility ofeval
grabbing or writing to local variables (a trait that the original code actually relied on). This also feels marginally cleaner, though it's only fractionally more secure.Tested to verify that it still works as expected.