diff options
author | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-11 13:11:32 +0200 |
---|---|---|
committer | Kristian Lyngstol <kristian@bohemians.org> | 2015-04-11 13:11:32 +0200 |
commit | 3d9d4b13e3748dfc15811a28e2378c4061a1c772 (patch) | |
tree | fd63bd7a0a9cae465ca744d1b15e5c91b5fab54b /web/nms.gathering.org/nms2/index.html | |
parent | 40a60dd9696c51cd06b6a20e313528701e917aee (diff) |
NMS: Multi-canvas drawing for potential performance
Not a big deal for chromium at the moment, but firefox liked it.
It also has more potential for future improvments.
Diffstat (limited to 'web/nms.gathering.org/nms2/index.html')
-rw-r--r-- | web/nms.gathering.org/nms2/index.html | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/web/nms.gathering.org/nms2/index.html b/web/nms.gathering.org/nms2/index.html index f57c717..869fee0 100644 --- a/web/nms.gathering.org/nms2/index.html +++ b/web/nms.gathering.org/nms2/index.html @@ -48,7 +48,7 @@ <li><a href="#" onclick="toggleNightMode()" title="Add 'nightMode' anywhere in the url to auto-enable">Toggle Night Mode</a></li> <li class="divider"> </li> <li><a href="#" onclick="document.getElementById('nowPickerBox').style.display = 'block';">Travel in time</a></li> - <li><a href="#" onclick="startReplay();" title="Replay from opening 30 minutes per second">Replay TG</p></li> + <li><a href="#" onclick="startReplay();" title="Replay from opening 30 minutes per second">Replay TG</a></li> <li class="divider"> </li> <li><input type="range" id="scaler" name="points" min="0.5" max="3" step="0.01" onchange="scaleChange()" /></li> <li><a href="#">Scale: <div id="scaler-text"></div></a></li> @@ -64,7 +64,7 @@ </div> <div class="container-fluid"> - <div class="panel" style="position: fixed; z-index: 100;"> + <div class="panel" style="position: fixed; z-index: 150;"> <div class="span4"> <div id="nowPickerBox" style="display:none; background: white; border: 1px solid #000000;" > @@ -79,7 +79,7 @@ <div class="row-fluid"> <div class="span12"> - <div id="aboutBox" class="panel" style="display: none; background: white; position: fixed; border: 1px solid #000000; z-index: 10;"> + <div id="aboutBox" class="panel" style="display: none; background: white; position: fixed; border: 1px solid #000000; z-index: 100;"> <button onclick="document.getElementById('aboutBox').style.display = 'none';" style="float: right;">X</button> <h1>Welcome to NMS</h1> <h3>Cool stuff:</h3> @@ -126,7 +126,12 @@ </ul> </div> -<canvas id="myCanvas" width="1920" height="1032" style="cursor: pointer;" onclick="canvasClick(event)"> +<canvas id="bgCanvas" width="1920" height="1032" style="position: fixed; z-index: 1;"> </canvas> +<canvas id="linkCanvas" width="1920" height="1032" style="position: fixed; z-index: 10;"> </canvas> +<canvas id="blurCanvas" width="1920" height="1032" style="position: fixed; z-index: 20;"> </canvas> +<canvas id="switchCanvas" width="1920" height="1032" style="position: fixed; z-index: 30;"> </canvas> +<canvas id="textCanvas" width="1920" height="1032" style="position: fixed; z-index: 40;"> </canvas> +<canvas id="topCanvas" width="1920" height="1032" style="position: fixed; z-index: 50; cursor: pointer;" onclick="canvasClick(event)"> </canvas> <div style="display:none;"><img id="source" src="img/tg15-salkart-full.png" ></div> @@ -142,10 +147,6 @@ </div> </div><!--/.fluid-container--> <script src="js/bootstrap.min.js" type="text/javascript"></script> - <script type="text/javascript"> - var draw_linknets = true; - var can_edit = false; - </script> <script type="text/javascript" src="js/nms.js"></script> <script type="text/javascript"> updatePorts(); @@ -157,7 +158,6 @@ setInterval(updatePing,1000); setInterval(updateMap,1000); setInterval(updateSpeed,3000); - setInterval(drawScene,1000); url = document.URL; if (/#ping/.exec(url)) { setUpdater(handler_ping); |