diff --git a/tuby5lj4di.js b/tuby5lj4di.js index f9eff56..c312d5e 100644 --- a/tuby5lj4di.js +++ b/tuby5lj4di.js @@ -1,33 +1,54 @@ if (this.parentEntity === data.entity) { - console.log('Entity FSDemo Loaded'); - - this.imageSpoon = GameLib.EntityManager.Instance.findComponentById('g6oggbsg5k'); - this.imageEarth = GameLib.EntityManager.Instance.findComponentById('fo1einfper'); - - this.meshBox = GameLib.EntityManager.Instance.findComponentById('2ehdod2g2a'); - this.meshImageGrid = GameLib.EntityManager.Instance.findComponentById('9qkka13nor'); - - this.instancedGeometry = GameLib.EntityManager.Instance.findComponentById('s5dfh75zza'); - this.boxGeometry = GameLib.EntityManager.Instance.findComponentById('pwzyukkviy'); - - /** - * Textures - */ - this.textureWhite = GameLib.EntityManager.Instance.findComponentById('642tyh30uo'); - - /** - * Materials - */ - this.materialRawPhong = GameLib.EntityManager.Instance.findComponentById('r153c4450d'); - - this.ccBeforeRender = GameLib.EntityManager.Instance.findComponentById('wlw063ovw9'); - this.ccKeyUp = GameLib.EntityManager.Instance.findComponentById('ip0443a52d'); - - this.ccBeforeRender.entityLoaded = this; - this.ccKeyUp.entityLoaded = this; +} else { + return; } +/** + * Images + */ +this.imageSpoon = GameLib.EntityManager.Instance.findComponentById('g6oggbsg5k'); +this.imageEarth = GameLib.EntityManager.Instance.findComponentById('fo1einfper'); + +this.images = [ + this.imageSpoon, + this.imageEarth +]; + +/** + * Meshes + */ +this.meshBox = GameLib.EntityManager.Instance.findComponentById('2ehdod2g2a'); +this.meshImageGrid = GameLib.EntityManager.Instance.findComponentById('9qkka13nor'); + +/** + * Geometry + */ +this.instancedGeometry = GameLib.EntityManager.Instance.findComponentById('s5dfh75zza'); +this.boxGeometry = GameLib.EntityManager.Instance.findComponentById('pwzyukkviy'); + +/** + * Textures + */ +this.textureWhite = GameLib.EntityManager.Instance.findComponentById('642tyh30uo'); + +/** + * Materials + */ +this.materialRawPhong = GameLib.EntityManager.Instance.findComponentById('r153c4450d'); + +/** + * Custom Code Components + */ +this.ccBeforeRender = GameLib.EntityManager.Instance.findComponentById('wlw063ovw9'); +this.ccKeyUp = GameLib.EntityManager.Instance.findComponentById('ip0443a52d'); + +this.ccBeforeRender.entityLoaded = this; +this.ccKeyUp.entityLoaded = this; + +/** + * Generates new Attribute Data based on the image index according to 'width' and 'height' + */ GameLib.CustomCode.prototype.generateAttributeData = function(index, width, height) { var heightData = this.images[this.currentImageIndex].getHeightData(); @@ -56,6 +77,9 @@ GameLib.CustomCode.prototype.generateAttributeData = function(index, width, heig }.bind(this); +/** + * Builds our instanced geometry + */ GameLib.CustomCode.prototype.buildInstancedGeometry = function(index) { var attributeData = this.generateAttributeData(index, 128, 128); @@ -103,4 +127,6 @@ GameLib.CustomCode.prototype.buildInstancedGeometry = function(index) { }.bind(this); +this.buildInstancedGeometry(0); + //@ sourceURL=entiyuLoaded.js \ No newline at end of file