Update: CC - Demo New - Key Up (194yv3pctj.js) 94 bytes modified
parent
bb5d49e151
commit
a07c3cd4b7
|
@ -40,11 +40,17 @@ if (data.code === 'KeyL') {
|
||||||
var quaternions = [];
|
var quaternions = [];
|
||||||
var scales = [];
|
var scales = [];
|
||||||
|
|
||||||
|
var height = 0;
|
||||||
|
|
||||||
for (x = 0; x < 128; x++) {
|
for (x = 0; x < 128; x++) {
|
||||||
for (y = 0; y < 128; y++) {
|
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);
|
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.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;
|
//this.meshImageGrid.geometry.instance = this.instancedGeometry.instance;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue