From 514542e8ad01a979a1475e27579e57977350b4b1 Mon Sep 17 00:00:00 2001 From: vulvulune Date: Wed, 18 Jan 2017 10:28:21 +0100 Subject: [PATCH] better syntax to declare var indexB --- v3/src/renderer/webgl/renderers/ParticleRenderer.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/v3/src/renderer/webgl/renderers/ParticleRenderer.js b/v3/src/renderer/webgl/renderers/ParticleRenderer.js index 522504a6d..a9f90ae32 100644 --- a/v3/src/renderer/webgl/renderers/ParticleRenderer.js +++ b/v3/src/renderer/webgl/renderers/ParticleRenderer.js @@ -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) {