diff --git a/194yv3pctj.js b/194yv3pctj.js index 5db11b0..cbaedfa 100644 --- a/194yv3pctj.js +++ b/194yv3pctj.js @@ -40,11 +40,17 @@ if (data.code === 'KeyL') { var quaternions = []; var scales = []; + var height = 0; + for (x = 0; x < 128; x++) { for (y = 0; y < 128; y++) { - positions.push(x, y, heightData[(x * y) + x + y]); + + height = heightData[(y * 128) + x] * 10; + scale = height * 0.1; + + positions.push(x, 128 - y, height); quaternions.push(0, 0, 0, 1); - scales.push(1,1,1); + scales.push(scale, scale, scale); } } @@ -64,7 +70,7 @@ if (data.code === 'KeyL') { this.instancedGeometry.instance.addAttribute('color', new THREE.Float32BufferAttribute(colors, 3)); - this.instancedGeometry.instance.addGroup(0, 1000, 0); + this.instancedGeometry.instance.addGroup(0, 5, 0); //this.meshImageGrid.geometry.instance = this.instancedGeometry.instance;