mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 09:08:37 +02:00
able to switch camera and clean up code
This commit is contained in:
parent
1e5090ad27
commit
217ec46222
1 changed files with 4 additions and 27 deletions
|
@ -69,38 +69,15 @@
|
||||||
"data": eventData
|
"data": eventData
|
||||||
};
|
};
|
||||||
EventBridge.emitWebEvent(JSON.stringify(eventObject));
|
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() {
|
$(document).ready(function() {
|
||||||
// Send a ready event to hifi
|
// Send a ready event to hifi
|
||||||
emit("ready", null);
|
emit("ready", null);
|
||||||
|
// Send an event when camera selection changes
|
||||||
$("#property-camera").on('change', function() {
|
$("#property-camera").on('change', function() {
|
||||||
console.log("ok");
|
console.log($("#property-camera").val());
|
||||||
emit("onSelectCamera", {value: this.val()});
|
emit("onSelectCamera", {value: $("#property-camera").val()});
|
||||||
});
|
});
|
||||||
// Send an event to hifi to trigger snapshot
|
// Send an event to hifi to trigger snapshot
|
||||||
$("#picture-button").click(function() {
|
$("#picture-button").click(function() {
|
||||||
|
|
Loading…
Reference in a new issue