mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 00:43:30 +02:00
106 lines
3.3 KiB
HTML
106 lines
3.3 KiB
HTML
<html>
|
|
<head>
|
|
<title>Photo Booth</title>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" type="text/css" href="../../../../../system/html/css/edit-style.css">
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
width: 100%;
|
|
color: white;
|
|
}
|
|
|
|
.top-bar {
|
|
height: 90px;
|
|
background: linear-gradient(#2b2b2b, #1e1e1e);
|
|
font-family: Raleway-Bold;
|
|
padding-left: 30px;
|
|
padding-right: 30px;
|
|
display: flex;
|
|
align-items: center;
|
|
position: fixed;
|
|
width: 480px;
|
|
top: 0;
|
|
z-index: 1;
|
|
font-size: 16px;
|
|
}
|
|
|
|
.content {
|
|
margin-top: 90px;
|
|
padding: 30px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="top-bar">
|
|
<div>Photobooth</div>
|
|
</div>
|
|
<div class="content">
|
|
<div id="properties-list">
|
|
<div class="property url refresh">
|
|
<label>Model URL</label>
|
|
<input type="text" id="model-url"></input>
|
|
<input type="button" id="reload-model-button" class="glyph" value="F">
|
|
</div>
|
|
<div class="property dropdown">
|
|
<label>Camera</label>
|
|
<select id="property-camera">
|
|
<option>First Person Camera</option>
|
|
<option>Main Camera</option>
|
|
<option>Left Camera</option>
|
|
<option>Right Camera</option>
|
|
</select>
|
|
</div>
|
|
<div class="property">
|
|
<input id="picture-button" type="button" class="blue" value="Take Picture">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
|
<script>
|
|
|
|
// Helper function to emit web events to photoboothApp.js
|
|
function emit(eventType, eventData) {
|
|
var eventObject = {
|
|
"app": "photobooth",
|
|
"type": eventType,
|
|
"data": eventData
|
|
};
|
|
EventBridge.emitWebEvent(JSON.stringify(eventObject));
|
|
};
|
|
|
|
function loaded () {
|
|
openEventBridge(function () {
|
|
emit("onLoad", {value: "faye"});
|
|
|
|
var elModelURL = document.getElementById("model-url");
|
|
var elReloadModelButton = document.getElementById("reload-model-button");
|
|
var elCamera = document.getElementById("property-camera");
|
|
//var elLightingPreset = document.getElementById("property-lighting-preset");
|
|
var elPictureButton = document.getElementById("picture-button");
|
|
|
|
elReloadModelButton.addEventListener('click', function() {
|
|
emit("onClickReloadModelButton", {value: elModelURL.value});
|
|
});
|
|
elCamera.addEventListener('change', function() {
|
|
emit("onSelectCamera", {value: this.value});
|
|
});
|
|
// elLightingPreset.addEventListener('change', function() {
|
|
// emit("onSelectLightingPreset", {value: "faye"});
|
|
// });
|
|
elPictureButton.addEventListener('click', function() {
|
|
emit("onClickPictureButton", {value: "faye"});
|
|
});
|
|
|
|
|
|
});
|
|
$(document).ready(function() {
|
|
// Send a ready event to hifi
|
|
emit("ready", null);
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|