Update: CC - Demo New - Key Up (ip0443a52d.js) 188 bytes modified

beta.r3js.org
-=yb4f310 2018-02-15 13:59:15 +01:00
parent c514743c8e
commit 0e23e48114
1 changed files with 7 additions and 3 deletions

View File

@ -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;