optimize particles rendering by using interface instead of closure for randomization