From 5b13fd264a63c2211783a93b2178aee1ebdccf0c Mon Sep 17 00:00:00 2001 From: -=yb4f310 Date: Mon, 19 Mar 2018 14:40:12 +0100 Subject: [PATCH] Update: CC - Demo New - Entity Loaded (tuby5lj4di.js) 57 bytes modified --- tuby5lj4di.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tuby5lj4di.js b/tuby5lj4di.js index 5ff0133..6b100c8 100644 --- a/tuby5lj4di.js +++ b/tuby5lj4di.js @@ -76,8 +76,11 @@ this.scaleAttribute = null; /** * Generates new Attribute Data based on the image index according to 'width' and 'height' */ -GameLib.CustomCode.prototype.generateAttributeData = function(index, width, height) { +GameLib.CustomCode.prototype.generateAttributeData = function(index) { + var width = this.images[index].width; + var height = this.images[index].height; + var heightData = this.images[index].getHeightData(); var offsets = []; @@ -112,7 +115,7 @@ GameLib.CustomCode.prototype.generateAttributeData = function(index, width, heig */ GameLib.CustomCode.prototype.buildInstancedGeometry = function(index) { - this.attributeData = this.generateAttributeData(index, 128, 128); + this.attributeData = this.generateAttributeData(index); var uniforms = Object.assign( THREE.UniformsLib['lights'],