forked from JasonXieyf/tacpro
/
sectiondetail.html
38 lines (36 loc) · 1.23 KB
/
sectiondetail.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<head>
<meta name="keywords" content="TacPro, R6, rainbowsix">
<meta name="author" content="Sizhao Li, Ming Xie, Yifei Xie">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TacPro Test</title>
<link rel="stylesheet" href="section.css">
</head>
<body>
<canvas id="canvas">
Your browser does not support the canvas element.
</canvas>
<a href="core.html"><img src="back2.png" alt="back" id="GoBack"></a>
<script>
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
canvas.width = 800;
canvas.height = 700;
//load the section pic
var secImg = new Image();
var currSec = window.localStorage.getItem("currSection");
var currFloor = window.localStorage.getItem("currFloor");
var mapName = window.localStorage.getItem("currMap");
secImg.src = "r6maps/" + mapName + "/" + currFloor + "/" + currSec + ".jpg";
secImg.addEventListener("load", drawImg, false);
function drawImg()
{
ctx.clearRect(0, 0, canvas.width, canvas.height);
ctx.drawImage(secImg,0,0,800,650);
}
/*ctx.beginPath();
ctx.arc(300,300,10,0,2*Math.PI);
ctx.fillStyle="#ffff00";
ctx.fill();*/
</script>
</body>