63 lines
No EOL
2.2 KiB
HTML
63 lines
No EOL
2.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<title>Statistics</title>
|
|
<link rel="stylesheet" type="text/css" href="css/ClinicianSettings.css">
|
|
|
|
<!-- Load JQuery/QT/Event Bridge/Firebug libary. -->
|
|
<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
|
|
<script type="text/javascript" src="qrc:///qtwebchannel/qwebchannel.js"></script>
|
|
<script type="text/javascript" src="js/eventBridgeLoader.js"></script>
|
|
|
|
|
|
<script>
|
|
window.onload = function() {
|
|
openEventBridge(function() {
|
|
EventBridge.scriptEventReceived.connect(function(message) {
|
|
writeToStatsHolder(message);
|
|
});
|
|
});
|
|
}
|
|
|
|
// Function to create a stats holder to parse the JSON information to which JQuery parses to JS file.
|
|
writeToStatsHolder = function(message) {
|
|
try {
|
|
//var MyStats = JSON.parse(message);
|
|
// console.log("Stats" + message)
|
|
var avatarPosition = JSON.stringify(message.position);
|
|
var leftHandPosition = JSON.stringify(message.leftHandPosition);
|
|
var rightHandPosition = JSON.stringify(message.rightHandPosition);
|
|
var d = new Date();
|
|
console.log("debug. " + d)
|
|
} catch (e) {
|
|
print('ERROR Parsing JSON');
|
|
}
|
|
// $('#getUsername').text(MyStats.getUsername);
|
|
$('#avatar-position').text(avatarPosition);
|
|
$('#left-hand').text(leftHandPosition);
|
|
$('#right-hand').text(rightHandPosition);
|
|
$('#date').text(d);
|
|
}
|
|
</script>
|
|
</head>
|
|
<body class="properties">
|
|
<div class="settings-container">
|
|
<div id="statsHolder">
|
|
<div class="stats-title">Stanford VRIT - Data Analysis</div>
|
|
<br>
|
|
<div>Time: </div>
|
|
<div><span id="date"></span></div>
|
|
<div>Avatar Position: </div>
|
|
<div><span id="avatar-position"></span></div>
|
|
<div>Left Hand Position: </div>
|
|
<div><span id="left-hand"></span></div>
|
|
<div>Right Hand Position: </div>
|
|
<div><span id="right-hand"></span></div>
|
|
<hr/>
|
|
<br>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
|
|
</html> |