-
Notifications
You must be signed in to change notification settings - Fork 1
/
msgTest.html
34 lines (31 loc) · 947 Bytes
/
msgTest.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>MUSEControl msgTest</title>
</head>
<body>
Messages<br>
<pre id="jsonArea">
</pre>
<script src="js/libs/jquery-3.1.0.min.js"></script>
<script src="js/libs/sprintf.js"></script>
<script src="js/libs/socket.io-1.4.5.js"></script>
<script src="js/libs/dat.gui.js"></script>
<script src="js/CanvasTool.js"></script>
<script src="js/util.js"></script>
<script src="js/MUSEControl.js"></script>
<script>
var muse = null;
$(document).ready(function () {
muse = new MUSEControl();
muse.sendMessage({type: 'joined'});
muse.setMessageHandler(msg => {
console.log("show msg", msg);
var str = JSON.stringify(msg, null, 3);
console.log("json str", str);
$("#jsonArea").html(str);
})
});
</script>
</body>