Update: CC - Demo New - Key Up (194yv3pctj.js) 304 bytes modified
parent
3b20ee86f7
commit
adcc3b1a86
|
@ -23,9 +23,19 @@ if (data.code === 'KeyL') {
|
|||
|
||||
var heightData = this.imageSpoon.getHeightData();
|
||||
|
||||
var instances = 128 * 128;
|
||||
var instances = 16384; //128 x 128
|
||||
|
||||
var x, y = 0;
|
||||
|
||||
var positions = [];
|
||||
|
||||
for (x = 0; x < 128; x++) {
|
||||
for (y = 0; y < 128; y++) {
|
||||
positions.push(x, y, heightData[(x * y) + x + y]);
|
||||
}
|
||||
}
|
||||
|
||||
this.instancedGeometry.instance.addAttribute('instancePosition', new THREE.InstancedBufferAttribute( new Float32Array(positions), 3));
|
||||
|
||||
console.log('got data');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue