some refactoring and improvements in rendering

- don't render portals or links outside the bounds. the backend returns lots of link, and some portals, outside of the data tiles
- moved more of the render pass start process inside startRenderPass function, rather than having to call separate functions in the data request code
This commit is contained in:
Jon Atkins
2014-03-23 01:23:36 +00:00
parent f47b1211d2
commit 95ed0ddd7b
2 changed files with 28 additions and 57 deletions

View File

@ -227,11 +227,8 @@ window.MapDataRequest.prototype.refresh = function() {
window.runHooks ('mapDataRefreshStart', {bounds: bounds, mapZoom: mapZoom, dataZoom: dataZoom, minPortalLevel: tileParams.level, tileBounds: dataBounds});
this.render.startRenderPass();
this.render.clearPortalsBelowLevel(tileParams.level);
this.render.clearEntitiesOutsideBounds(dataBounds);
this.render.startRenderPass(tileParams.level, dataBounds);
this.render.updateEntityVisibility();
this.render.processGameEntities(artifact.getArtifactEntities());