better syntax to declare var indexB

This commit is contained in:
vulvulune 2017-01-18 10:28:21 +01:00
parent 6220b30517
commit 514542e8ad

View file

@ -112,10 +112,8 @@ ParticleRenderer.prototype.init = function ()
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBufferObject);
var indexBuffer = indexDataBuffer.wordView;
var indexB;
// Populate the index buffer only once
for (var indexA = indexB = 0;
for (var indexA = 0, indexB = 0;
indexA < ParticleRenderer.MAX_PARTICLES * ParticleRenderer.PARTICLE_INDEX_COUNT;
indexA += ParticleRenderer.PARTICLE_INDEX_COUNT, indexB += ParticleRenderer.PARTICLE_VERTEX_COUNT)
{