Split up cubes rendering into separate function