From 0e23e48114c75cb614925fcd4625e4bedd8af303 Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Thu, 15 Feb 2018 13:59:15 +0100 Subject: [PATCH] Update: CC - Demo New - Key Up (ip0443a52d.js) 188 bytes modified --- ip0443a52d.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ip0443a52d.js b/ip0443a52d.js index 5833b4a..dec31c4 100644 --- a/ip0443a52d.js +++ b/ip0443a52d.js @@ -15,6 +15,9 @@ if (!this.initialized) { this.boxGeometry = this.entityLoaded.boxGeometry; this.instancedGeometry = this.entityLoaded.instancedGeometry; + this.textureWhite = this.entityLoaded.textureWhite; + this.materialRawPhong = this.entityLoaded.materialRawPhong; + this.initialized = true; console.log('key up initialized'); @@ -49,10 +52,11 @@ if (data.code === 'KeyL') { var uniforms = Object.assign( THREE.UniformsLib['lights'], { - map: { value: texture } + map: { value: this.textureWhite.instance } } - ); - + ); + + this.materialRawPhong.instance.uniforms = uniforms; this.instancedGeometry.instance.index = this.boxGeometry.instance.index; this.instancedGeometry.instance.groups = this.boxGeometry.instance.groups;