From 3c6468cccbbbd7202e0dc2fa0034b3223ec986d1 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Sat, 28 Dec 2013 08:20:11 +0000 Subject: [PATCH] revert bringPortalsToFront change - and add some comments concerning possible better fixes --- code/map_data_render.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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; }