From 83040f23e6318763db97d1c59997328cde796ccd Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 12 Feb 2018 12:06:24 +0100 Subject: [PATCH] Update: CC - Demo New - Key Up (194yv3pctj.js) 280 bytes modified --- 194yv3pctj.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/194yv3pctj.js b/194yv3pctj.js index fdb69d6..2d00cfa 100644 --- a/194yv3pctj.js +++ b/194yv3pctj.js @@ -2,10 +2,20 @@ if (!this.entityLoaded) { return; } +this.initialized = false; + if (!this.initialized) { + this.imageSpoon = this.entityLoaded.imageSpoon; this.imageEarth = this.entityLoaded.imageEarth; + + this.meshBox = this.entityLoaded.meshBox; + this.instancedGeometry = this.entityLoaded.instancedGeometry; + + this.instancedGeometry.instance.attributes.position = this.boxGeometry.instance.attributes.position; + this.initialized = true; + console.log('key up initialized'); } @@ -13,6 +23,8 @@ if (data.code === 'KeyL') { var heightData = this.imageSpoon.getHeightData(); + var instances = 128 * 128; + console.log('got data'); }