Update: CC - Bacon - Entity Loaded (8ia8dlk7l5.js) 2 bytes modified
parent
76dab8a883
commit
4ee2b1971e
|
@ -1485,21 +1485,28 @@ 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 = {
|
||||
|
||||
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.graphics,
|
||||
{
|
||||
|
@ -1510,7 +1517,7 @@ GameLib.CustomCode.prototype.createTile = function(tileName, imageName, displace
|
|||
widthSegments : 10,
|
||||
heightSegments : 10
|
||||
},
|
||||
scene : this.scene,
|
||||
parentScene : this.scene,
|
||||
materials : [material]
|
||||
}
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue