diff --git a/194yv3pctj.js b/194yv3pctj.js index 2fd38cc..8251f2e 100644 --- a/194yv3pctj.js +++ b/194yv3pctj.js @@ -10,6 +10,7 @@ if (!this.initialized) { this.imageEarth = this.entityLoaded.imageEarth; this.meshBox = this.entityLoaded.meshBox; + this.meshImageGrid = this.entityLoaded.meshImageGrid; this.boxGeometry = this.entityLoaded.boxGeometry; this.instancedGeometry = this.entityLoaded.instancedGeometry; @@ -49,6 +50,10 @@ if (data.code === 'KeyL') { this.instancedGeometry.instance.addAttribute('instancePosition', new THREE.InstancedBufferAttribute( new Float32Array(positions), 3)); + this.meshImageGrid.geometry.instance = this.instancedGeometry.instance; + + this.meshImageGrid.materials[0].instance.needsUpdate = true; + console.log('got data'); }