content/hifi-public/tony/html/handshake2.html
Dale Glass 0d14e5a379 Initial data.
Needs a lot of cleanup. Data has been de-duplicated, and where identical copies existed, one of them
has been replaced with a symlink.

Some files have been excluded, such as binaries, installers and debug dumps. Some of that may still
be present.
2022-02-13 18:59:11 +01:00

69 lines
2.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script>
$(document).bind('pageinit', function () {
function controlHandlerMaker(name) {
return function (event, ui) {
var val = $('#' + name).val();
var checked = $('#' + name).is(":checked");
EventBridge.emitWebEvent({name: name, val: val, checked: checked});
};
}
var controls = [
'blend-factor',
'show-controllers',
'use-local-ik',
'use-static-hand-offset',
'use-haptics'
];
controls.forEach(function (name) {
$('#' + name).bind('change', controlHandlerMaker(name));
});
EventBridge.scriptEventReceived.connect(function (msg) {
console.log('AJT: msg = ' + msg);
var array = JSON.parse(msg);
array.forEach(function (obj) {
var widget = $('#' + obj.name);
if (widget) {
if (widget.attr('type') === "checkbox") {
$('#' + obj.name).prop('checked', obj.checked).checkboxradio('refresh');
} else if (widget.attr('type') === "number") {
$('#' + obj.name).val(obj.val).slider('refresh');
}
}
});
});
EventBridge.emitWebEvent({name: 'init-complete'});
});
</script>
<head>
<meta charset="utf-8" />
<body>
<div style="margin:10px">
<h1>Handshake Parameters</h1>
<label for="blend-factor">Blend Factor:</label>
<input type="range" name="blend-factor" id="blend-factor" value="0" min="0" max="100">
<fieldset data-role="controlgroup">
<input type="checkbox" name="show-controllers" id="show-controllers">
<label for="show-controllers">Show Controllers</label>
<input type="checkbox" name="use-local-ik" id="use-local-ik">
<label for="use-local-ik">Use Local IK</label>
<input type="checkbox" name="use-static-hand-offset" id="use-static-hand-offset">
<label for="use-static-hand-offset">Use Static Hand Offset</label>
<input type="checkbox" name="use-haptics" id="use-haptics">
<label for="use-haptics">Use Haptics</label>
</fieldset>
</div>
</body>
</head>
</html>