I have a situation where I am loading over 4350 3D objects from JSON files in my game.
for (var y in game.fields) {
for (var x in game.fields[y]) {
switch (game.fields[y][x]) {
case 'm':
Three.loadMountain(x, y)
break
case 'h':
Three.loadHill(x, y)
break
}
}
}
As these objects start appearing on the screen, everything suddenly turns white. I'm puzzled by this issue as there are no error messages in the console. My browser is Chromium. How can I troubleshoot this problem?
Functions:
this.loadMountain = function (x, y) {
loader.load('/models/mountain.json', getGeomHandler('#808080', x * 4 - 216, y * 4 - 311, 1));
}
this.loadHill = function (x, y) {
loader.load('/models/hill.json', getGeomHandler('#008000', x * 4 - 216, y * 4 - 311, 1));
}