-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (46 loc) · 1.28 KB
/
index.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
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TankDemo</title>
<!-- <link rel="stylesheet" type="text/css" media="screen" href="./template/main.css"> -->
<!-- <script src="system.js"></script> -->
<style>
body {
background: #eeeeee;
}
#canvas {
background: #ffffff; /* 背景白色 */
-webkit-box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
-moz-box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}
</style>
<script src="node_modules/systemjs/dist/system.js"></script>
<script src="node_modules/typescript/lib/typescript.js"></script>
</head>
<body>
<div>
<!-- <button id="start">start</button>
<button id="stop">stop</button> -->
</div>
<canvas id="canvas" width="800" height="600"></canvas>
</body>
<script>
System.config({
transpiler: 'typescript',
packages: {
'./src': {
defaultExtension: 'ts',
},
},
});
System
// .import('./src/Main.ts')
// .import('./src/TankDemo.ts')
// .import('./src/TankDemo1.ts')
.import('./src/TankDemo2.ts')
.then(null, console.error.bind(console)); // 如果有错误,转发到浏览器中的console显示错误
</script>
</html>