58 lines
No EOL
2.3 KiB
HTML
58 lines
No EOL
2.3 KiB
HTML
|
|
<!-- saved from url=(0100)https://s3.eu-west-2.amazonaws.com/norteclabs.com/HF/scripts/avatar-blendshape-control/index.html?ff -->
|
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<script type="text/javascript" src="qrc:///qtwebchannel/qwebchannel.js"></script>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0">
|
|
|
|
<title>Avatar Emoticon</title>
|
|
<link rel="stylesheet" type="text/css" href="./index_files/style.css">
|
|
<script type="text/javascript" src="./index_files/lodash.min.js.download"></script>
|
|
<script type="text/javascript" src="./index_files/script.js.download"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<h1>Custom Avatar Controls</h1>
|
|
<div id="container">
|
|
<div class="loading">Loading...</div>
|
|
</div>
|
|
<script>
|
|
var states = {};
|
|
setTimeout(function () {
|
|
EventBridge.scriptEventReceived.connect(function (event) {
|
|
try {
|
|
data = JSON.parse(event);
|
|
if (data.type === 'emote_app_build') {
|
|
var container = document.getElementById("container");
|
|
|
|
container.innerText = "";
|
|
|
|
dropDown(container, "Face Emotes", data.emotes, playback);
|
|
states = dropDown(container, "Avatar Toggles", data.states,
|
|
toggle);
|
|
|
|
} else if (data.type === "emote_app_state_sync") {
|
|
|
|
for (var x = 0; x < data.states.length; x++) {
|
|
var currentState = data.states[x];
|
|
console.log(currentState[0]);
|
|
|
|
console.log(states, states[currentState[0]]);
|
|
|
|
states[currentState[0]].children[0].innerText = currentState[0] + ' ' +
|
|
currentState[1];
|
|
|
|
states[currentState[0]].className = "button " + currentState[1].toLowerCase();
|
|
}
|
|
}
|
|
} catch (exec) {
|
|
console.error(exec);
|
|
}
|
|
});
|
|
|
|
console.log(" loading!d");
|
|
emitEvent("emote_app_load_complete");
|
|
}, 500)
|
|
</script>
|
|
|
|
|
|
</body></html> |