Update: CC - Bacon - Entity Loaded (8ia8dlk7l5.js) 2 bytes modified

beta.r3js.org
-=yb4f310 2018-02-22 14:19:55 +01:00
parent 76dab8a883
commit 4ee2b1971e
1 changed files with 21 additions and 14 deletions

View File

@ -1485,22 +1485,29 @@ GameLib.CustomCode.prototype.clearGrid = function() {
GameLib.CustomCode.prototype.createTile = function(tileName, imageName, displace) {
var material = {
materialType : GameLib.D3.API.Material.MATERIAL_TYPE_PHONG,
componentType : GameLib.D3.API.Material.GetComponentType(GameLib.D3.API.Material.MATERIAL_TYPE_PHONG)
}
var material = null;
var apiMaterial = {};
if (imageName) {
material.diffuseMap = {
image : this[imageName]
};
}
apiMaterial.diffuseMap = new GameLib.D3.Texture.Image(
this.graphics,
{
image : this[imageName]
}
);
};
if (displace) {
material.displacementMap = this.textureDisplacement;
}
apiMaterial.displacementMap = this.textureDisplacement;
}
material = new GameLib.D3.Material.Phong(
this.graphics,
apiMaterial
)
this[tileName] = new GameLib.D3.Mesh(
this[tileName] = new GameLib.D3.Mesh(
this.graphics,
{
geometry : {
@ -1510,7 +1517,7 @@ GameLib.CustomCode.prototype.createTile = function(tileName, imageName, displace
widthSegments : 10,
heightSegments : 10
},
scene : this.scene,
parentScene : this.scene,
materials : [material]
}
)