Theme示例
{
name: "test", //theme's name
background: "#F2F2F2", //background color
//building's style
building: {
color: "#000000",
opacity: 0.1,
transparent: true,
depthTest: false
},
//floor's style
floor: {
color: "#E0E0E0",
opacity: 1,
transparent: false
},
//selected room's style
selected: "#ffff55",
floorWall: function(index){
var wallColors = ["#1f77b4", "#ffbb78"];
return {
color: wallColors[index%2],
opacity: 1,
transparent: false}
},
//rooms' style
room: function (type, category) {
var roomStyle;
if(!category) {
switch (type) {
case 100: //hollow. u needn't change this color. because i will make a hole on the model in the final version.
return {
color: "#F2F2F2",
opacity: 0.8,
transparent: true
}
case 300: //closed area
return {
color: "#AAAAAA",
opacity: 0.7,
transparent: true
};
case 400: //empty shop
return {
color: "#D3D3D3",
opacity: 0.7,
transparent: true
};
default :
break;
}
}
switch(category) {
case 101: //food
roomStyle = {
color: "#1f77b4",
opacity: 0.7,
transparent: true
};
break;
case 102: //retail
roomStyle = {
color: "#aec7e8",
opacity: 0.7,
transparent: true
};
break;
case 103: //toiletry
roomStyle = {
color: "#ffbb78",
opacity: 0.7,
transparent: true
};
break;
case 104: //parent-child
roomStyle = {
color: "#98df8a",
opacity: 0.7,
transparent: true
};
break;
case 105: //life services
roomStyle = {
color: "#bcbd22",
opacity: 0.7,
transparent: true
};
break;
case 106: //education
return {
color: "#2ca02c",
opacity: 0.7,
transparent: true
};
break;
case 107: //life style
roomStyle = {
color: "#dbdb8d",
opacity: 0.7,
transparent: true
};
break;
case 108: //entertainment
roomStyle = {
color: "#EE8A31",
opacity: 0.7,
transparent: true
};
break;
case 109: //others
roomStyle = {
color: "#8c564b",
opacity: 0.7,
transparent: true
};
default :
roomStyle = {
color: "#c49c94",
opacity: 0.7,
transparent: true
};
break;
}
return roomStyle;
},
//room wires' style
strokeStyle: {
color: "#5C4433",
opacity: 0.5,
transparent: true,
linewidth: 2
},
fontStyle:{
color: "#231815",
fontsize: 40,
fontface: "Helvetica, MicrosoftYaHei "
},
pubPointImg: {
"11001": System.imgPath+"/toilet.png",
"11002": System.imgPath+"/ATM.png",
"21001": System.imgPath+"/stair.png",
"22006": System.imgPath+"/entry.png",
"21002": System.imgPath+"/escalator.png",
"21003": System.imgPath+"/lift.png"
}
}