Hello~
Here I Want to Create some corridor in this way(Just for Testing)
but when I set i to 10 , j to 10000 which means 100000 Entites
My Chrome Pager get no respon and later it Crashed...
However 30000 is just OK(In my Lap)
So...I just want to figure out how to make it maxium performance in Creating Entities as many as possible...Thanks~
///////////////////////
var viewer = new Cesium.Viewer('cesiumContainer');
var i = 0,j = 0;
for(i=0;i<1;i++){
for(j=0;j<1000;j++){
var objName = 'WALL' + i*1000 + j;
var objLonFrom = i;
var objLonTo = i + 1;
var objHeight = j * 2000;
var objExtrudeHeight = (j + 1) * 2000;
var objCorridor = viewer.entities.add({
name : objName,
corridor : {
positions : Cesium.Cartesian3.fromDegreesArray([
objLonFrom, 40.0,
objLonTo, 40.0,
objLonTo, 38.0
]),
height : objHeight,
extrudedHeight : objExtrudeHeight,
width : 200.0,
cornerType: Cesium.CornerType.BEVELED,
material : Cesium.Color.BLUE.withAlpha(0.5),
outline : true,
outlineColor : Cesium.Color.BLUE
}
});
}}
viewer.zoomTo(viewer.entities);