Update: CC - Demo New - Key Up (194yv3pctj.js) 94 bytes modified

beta.r3js.org
-=yb4f310 2018-02-12 14:20:46 +01:00
parent bb5d49e151
commit a07c3cd4b7
1 changed files with 9 additions and 3 deletions

View File

@ -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;