remove the 'hack' that ignored portals below the selected level limit - not needed now Niantic have fixed the mission portal issue
increase the number of items rendered in the render queue batches - should make IITC render a bit faster, especially now that the portals have gone and instead there's a fair amount of duplicate data from links/fields across multiple data tiles
This commit is contained in:
parent
5da190862e
commit
f3190731d6
@ -110,7 +110,7 @@ window.Render.prototype.processDeletedGameEntityGuids = function(deleted) {
|
||||
|
||||
}
|
||||
|
||||
window.Render.prototype.processGameEntities = function(entities,ignoreLevel) {
|
||||
window.Render.prototype.processGameEntities = function(entities) {
|
||||
|
||||
// we loop through the entities three times - for fields, links and portals separately
|
||||
// this is a reasonably efficient work-around for leafletjs limitations on svg render order
|
||||
@ -131,27 +131,13 @@ window.Render.prototype.processGameEntities = function(entities,ignoreLevel) {
|
||||
}
|
||||
}
|
||||
|
||||
// 2015-03-12 - Niantic have been returning all mission portals to the client, ignoring portal level
|
||||
// and density filtering usually in use. this makes things unusable when viewing the global view, so we
|
||||
// filter these out
|
||||
var minLevel = ignoreLevel ? 0 : this.level;
|
||||
var ignoredCount = 0;
|
||||
|
||||
for (var i in entities) {
|
||||
var ent = entities[i];
|
||||
|
||||
if (ent[2][0] == 'p' && !(ent[0] in this.deletedGuid)) {
|
||||
var portalLevel = ent[2][1] == 'N' ? 0 : parseInt(ent[2][4]);
|
||||
if (portalLevel >= minLevel) {
|
||||
this.createPortalEntity(ent);
|
||||
} else {
|
||||
ignoredCount++;
|
||||
}
|
||||
|
||||
this.createPortalEntity(ent);
|
||||
}
|
||||
}
|
||||
|
||||
if (ignoredCount) console.log('Render: ignored '+ignoredCount+' portals below the level requested from the server');
|
||||
}
|
||||
|
||||
|
||||
|
@ -57,7 +57,7 @@ window.MapDataRequest = function() {
|
||||
// render queue
|
||||
// number of items to process in each render pass. there are pros and cons to smaller and larger values
|
||||
// (however, if using leaflet canvas rendering, it makes sense to push as much as possible through every time)
|
||||
this.RENDER_BATCH_SIZE = L.Path.CANVAS ? 1E9 : 500;
|
||||
this.RENDER_BATCH_SIZE = L.Path.CANVAS ? 1E9 : 1500;
|
||||
|
||||
// delay before repeating the render loop. this gives a better chance for user interaction
|
||||
this.RENDER_PAUSE = (typeof android === 'undefined') ? 0.1 : 0.2; //100ms desktop, 200ms mobile
|
||||
@ -233,7 +233,7 @@ window.MapDataRequest.prototype.refresh = function() {
|
||||
this.render.startRenderPass(tileParams.level, dataBounds);
|
||||
|
||||
|
||||
this.render.processGameEntities(artifact.getArtifactEntities(),true);
|
||||
this.render.processGameEntities(artifact.getArtifactEntities());
|
||||
|
||||
var logMessage = 'requesting data tiles at zoom '+dataZoom;
|
||||
if (tileParams.level != tileParams.maxLevel) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user