-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshellWasmTest.html
More file actions
42 lines (35 loc) · 868 Bytes
/
Copy pathshellWasmTest.html
File metadata and controls
42 lines (35 loc) · 868 Bytes
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
<!doctype html>
<html>
<meta charset="UTF-8">
<script>
var safe = false;
var Module = {
onRuntimeInitialized: function() {
runFunc();
safe = true;
}
};
//console.log(safe);
var instance;
function runFunc(){
instance = new Module.shell(780, .460, 2574, 1460, 6, .292, 77, .033);
console.log(instance);
instance.calcImpact();
//instance.printImpact();
console.log("ran");
var angles = [0.0, 10.0, 20.0, 30.0];
instance.calcPostPen(70, angles);
console.log("ran");
instance.printPostPen();
//instance.delete();
}
if(safe){
runFunc();
}
//}
</script>
<script src="shellWasm.js"></script>
<body>
<button type="button" onclick="runFunc()">Test</button>
</body>
</html>