From b0e5c80effecf643754c054272969e003e49a554 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 12 Feb 2018 10:26:03 +0100 Subject: [PATCH] Update: CC - Demo New - Key Up (194yv3pctj.js) 140 bytes modified --- 194yv3pctj.js | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/194yv3pctj.js b/194yv3pctj.js index ca1c12c..fdb69d6 100644 --- a/194yv3pctj.js +++ b/194yv3pctj.js @@ -1,14 +1,19 @@ -if (this.parentEntity === data.entity) { - console.log('key up loaded'); -} else { - console.log(data); - return null; +if (!this.entityLoaded) { + return; } -if (data.code === 'keyL') { - console.log('loading image'); +if (!this.initialized) { + this.imageSpoon = this.entityLoaded.imageSpoon; + this.imageEarth = this.entityLoaded.imageEarth; + this.initialized = true; + console.log('key up initialized'); } -console.log(data); +if (data.code === 'KeyL') { + + var heightData = this.imageSpoon.getHeightData(); + + console.log('got data'); +} //@ sourceURL=ccKeyUp.js \ No newline at end of file