Update: CC - Bacon - Entity Loaded (8ia8dlk7l5.js) 2 bytes modified
parent
76dab8a883
commit
4ee2b1971e
|
@ -1485,22 +1485,29 @@ GameLib.CustomCode.prototype.clearGrid = function() {
|
||||||
|
|
||||||
GameLib.CustomCode.prototype.createTile = function(tileName, imageName, displace) {
|
GameLib.CustomCode.prototype.createTile = function(tileName, imageName, displace) {
|
||||||
|
|
||||||
var material = {
|
var material = null;
|
||||||
materialType : GameLib.D3.API.Material.MATERIAL_TYPE_PHONG,
|
var apiMaterial = {};
|
||||||
componentType : GameLib.D3.API.Material.GetComponentType(GameLib.D3.API.Material.MATERIAL_TYPE_PHONG)
|
|
||||||
}
|
|
||||||
|
|
||||||
if (imageName) {
|
if (imageName) {
|
||||||
material.diffuseMap = {
|
|
||||||
image : this[imageName]
|
apiMaterial.diffuseMap = new GameLib.D3.Texture.Image(
|
||||||
};
|
this.graphics,
|
||||||
}
|
{
|
||||||
|
image : this[imageName]
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
if (displace) {
|
if (displace) {
|
||||||
material.displacementMap = this.textureDisplacement;
|
apiMaterial.displacementMap = this.textureDisplacement;
|
||||||
}
|
}
|
||||||
|
|
||||||
this[tileName] = new GameLib.D3.Mesh(
|
material = new GameLib.D3.Material.Phong(
|
||||||
|
this.graphics,
|
||||||
|
apiMaterial
|
||||||
|
)
|
||||||
|
|
||||||
|
this[tileName] = new GameLib.D3.Mesh(
|
||||||
this.graphics,
|
this.graphics,
|
||||||
{
|
{
|
||||||
geometry : {
|
geometry : {
|
||||||
|
@ -1510,7 +1517,7 @@ GameLib.CustomCode.prototype.createTile = function(tileName, imageName, displace
|
||||||
widthSegments : 10,
|
widthSegments : 10,
|
||||||
heightSegments : 10
|
heightSegments : 10
|
||||||
},
|
},
|
||||||
scene : this.scene,
|
parentScene : this.scene,
|
||||||
materials : [material]
|
materials : [material]
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue