diff --git a/dywmtohrda.js b/dywmtohrda.js index cd882cc..1568980 100644 --- a/dywmtohrda.js +++ b/dywmtohrda.js @@ -140,9 +140,10 @@ if (this.spawnTime > this.nextSpawnTime) { } this.flames.map( - function(flame) { + function(flame, index) { flame.mesh.position.add(flame.direction); flame.mesh.updateInstancePosition(); + flame.mesh.instance.renderOrder = index; } );