Update: CC - Bacon - Entity Loaded (8ia8dlk7l5.js) 1250 bytes modified
parent
01d494a00f
commit
9fc8a86259
|
@ -1485,82 +1485,35 @@ GameLib.CustomCode.prototype.clearGrid = function() {
|
||||||
|
|
||||||
GameLib.CustomCode.prototype.createTile = function(tileName, imageName, displace) {
|
GameLib.CustomCode.prototype.createTile = function(tileName, imageName, displace) {
|
||||||
|
|
||||||
var apiMaterial;
|
var material = {
|
||||||
|
{
|
||||||
|
materialType : GameLib.D3.API.Material.MATERIAL_TYPE_PHONG
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (imageName) {
|
if (imageName) {
|
||||||
if (displace) {
|
material.diffuseMap = {
|
||||||
apiMaterial = new GameLib.D3.API.Material.Phong(
|
image : this[imageName]
|
||||||
null,
|
};
|
||||||
null,
|
}
|
||||||
null,
|
|
||||||
null,
|
if (displace) {
|
||||||
null,
|
material.displacementMap = this.textureDisplacement;
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
this.textureDisplacement,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
new GameLib.D3.API.Texture.Image(
|
|
||||||
null,
|
|
||||||
this[imageName]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
apiMaterial = new GameLib.D3.API.Material.Phong(
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
null,
|
|
||||||
new GameLib.D3.API.Texture.Image(
|
|
||||||
null,
|
|
||||||
this[imageName]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
apiMaterial = new GameLib.D3.API.Material.Phong();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this[tileName] = new GameLib.D3.Mesh(
|
this[tileName] = new GameLib.D3.Mesh(
|
||||||
this.graphics,
|
this.graphics,
|
||||||
new GameLib.D3.API.Mesh(
|
{
|
||||||
null,
|
geometry : {
|
||||||
null,
|
componentType : GameLib.Component.GEOMETRY_BUFFER_PLANE,
|
||||||
null,
|
width : 1,
|
||||||
null,
|
height : 1,
|
||||||
new GameLib.D3.API.Geometry.Buffer.Plane(
|
widthSegments : 10,
|
||||||
null,
|
heightSegments : 10
|
||||||
1,
|
}
|
||||||
1,
|
scene : this.scene,
|
||||||
10,
|
materials : [apiMaterial]
|
||||||
10
|
}
|
||||||
),
|
|
||||||
[
|
|
||||||
apiMaterial
|
|
||||||
],
|
|
||||||
null,
|
|
||||||
this.scene
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
this[tileName].visible = false;
|
this[tileName].visible = false;
|
||||||
|
|
Loading…
Reference in New Issue