From 8b98c11837fd763df49d3056f2fe90ac03da5091 Mon Sep 17 00:00:00 2001 From: manish Date: Fri, 27 Apr 2018 20:54:15 +0530 Subject: [PATCH] Change for #62:Code optimization --- js/render.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/render.js b/js/render.js index b38af65..45768f8 100644 --- a/js/render.js +++ b/js/render.js @@ -1788,9 +1788,9 @@ var THREE = require("three"), in_n = (in_n === null)? p.intensity : Math.min(in_n, p.intensity); in_x = (in_x === null)? p.intensity : Math.max(in_x, p.intensity); - positions[ 3*i ] = p.position[0] * lasBuffer.scale[0] + (lasBuffer.offset[0] - this.corrective.x); - positions[ 3*i + 1 ] = p.position[1] * lasBuffer.scale[1] + (lasBuffer.offset[1] - this.corrective.y); - positions[ 3*i + 2 ] = p.position[2] * lasBuffer.scale[2] + (lasBuffer.offset[2] - this.corrective.z); + positions[ 3*i ] = x - this.corrective.x; + positions[ 3*i + 1 ] = y - this.corrective.y; + positions[ 3*i + 2 ] = z - this.corrective.z; colors[ 3*i ] = r; colors[ 3*i + 1 ] = g;