diff --git a/code/map_data_render.js b/code/map_data_render.js index d7bc21a8..e4e1da36 100644 --- a/code/map_data_render.js +++ b/code/map_data_render.js @@ -114,8 +114,15 @@ window.Render.prototype.processGameEntities = function(entities) { } } - // reorder portals to be after links/fields - this.bringPortalsToFront(); +//TODO: better method to bring portals to front during rendering +//as it stands, rendering from cache causes multiple passes through bringToFront - which is a waste +//possible options: +//1. add fields, links and portals in the order they should be rendered. will be close to right while rendering, and +// a final bringPortalsToFront call can fix up any errors +//2. run bringPortalsToFront on a short timer, so it's not immediate after render. + +// // reorder portals to be after links/fields +// this.bringPortalsToFront(); } @@ -143,8 +150,8 @@ window.Render.prototype.endRenderPass = function() { } } -// // reorder portals to be after links/fields -// this.bringPortalsToFront(); + // reorder portals to be after links/fields + this.bringPortalsToFront(); this.isRendering = false; }