-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.html
70 lines (56 loc) · 1.74 KB
/
test.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Jasmine Spec Runner</title>
<link rel="stylesheet" type="text/css" href="scripts/vendor/jasmine/jasmine.css">
<script src="scripts/vendor/jasmine/jasmine.js"></script>
<script src="scripts/vendor/jasmine/jasmine-html.js"></script>
<script data-main="scripts/main" src="scripts/vendor/require/require.js"></script>
<script>
require.config({
baseUrl: "scripts",
paths: {
cs: "vendor/require/cs",
}
});
require([
"cs!spec/lib/entity",
"cs!spec/lib/mdl/mdl",
"cs!spec/lib/mdl/skin",
"cs!spec/lib/mdl/frame",
"cs!spec/lib/mdl/vertex",
"cs!spec/lib/mdl/header",
"cs!spec/lib/mdl/palette",
"cs!spec/lib/mdl/triangle",
"cs!spec/lib/mdl/vector_3",
"cs!spec/lib/mdl/skin_group",
"cs!spec/lib/mdl/simple_frame",
"cs!spec/lib/mdl/texture_coordinate"
],
function() {
var modelUrl = "/data/pak0/progs/grenade.mdl";
var buffer = null;
var xhr = new XMLHttpRequest();
initJasmine = function() {
var jasmineEnv = jasmine.getEnv();
jasmineEnv.buffer = buffer
jasmineEnv.updateInterval = 1000;
var htmlReporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(htmlReporter);
jasmineEnv.specFilter = function(spec) {
return htmlReporter.specFilter(spec);
};
jasmineEnv.execute();
}
xhr.responseType = "arraybuffer";
xhr.open("GET", modelUrl);
xhr.onload = function(e) { buffer = xhr.response; initJasmine(); }
xhr.send()
});
</script>
</head>
<body>
<div id="container" />
</body>
</html>