diff --git a/scripts/developer/utilities/render/photobooth/html/photobooth.html b/scripts/developer/utilities/render/photobooth/html/photobooth.html index a7740330fb..0250084a54 100644 --- a/scripts/developer/utilities/render/photobooth/html/photobooth.html +++ b/scripts/developer/utilities/render/photobooth/html/photobooth.html @@ -10,7 +10,6 @@ padding: 0; width: 100%; color: white; - background: linear-gradient(#2b2b2b, #0f212e); } .top-bar { @@ -32,22 +31,44 @@ margin-top: 90px; padding: 30px; } - - - + + + +
+
Photobooth
+
+
+
+
+ + + +
+ +
+ +
+
+
+ - - - - -
-
Photobooth
-
-
-
-
- - - -
- -
- -
-
-
diff --git a/scripts/developer/utilities/render/photobooth/photobooth.js b/scripts/developer/utilities/render/photobooth/photoboothApp.js similarity index 95% rename from scripts/developer/utilities/render/photobooth/photobooth.js rename to scripts/developer/utilities/render/photobooth/photoboothApp.js index ab881ede4d..ca298d00de 100644 --- a/scripts/developer/utilities/render/photobooth/photobooth.js +++ b/scripts/developer/utilities/render/photobooth/photoboothApp.js @@ -19,11 +19,24 @@ icon: "icons/tablet-icons/snap-i.svg", text: "PHOTOBOOTH" }); + function onClicked() { tablet.gotoWebScreen(PHOTOBOOTH_WINDOW_HTML_URL); PhotoBooth.init(); } button.clicked.connect(onClicked); + tablet.webEventReceived.connect(onWebEventReceived); + + function onWebEventReceived(event) { + print("photobooth.js received a web event:" + event); + // Converts the event to a JavasScript Object + if (typeof event === "string") { + event = JSON.parse(event); + } + if (event.app === "photobooth") { + + } + } var PhotoBooth = {}; PhotoBooth.init = function () { @@ -170,20 +183,13 @@ print("clicked reload model button " + event.value); PhotoBooth.changeModel(event.value); }; - - photoboothWindow.webEventReceived.connect(function (data) { - var event = JSON.parse(data); - if (photoboothWindowListener[event.type]) { - photoboothWindowListener[event.type](event); - } - }); }; main(); function cleanup() { + tablet.removeButton(button); Camera.mode = "first person"; PhotoBooth.destroy(); - tablet.removeButton(button); } Script.scriptEnding.connect(cleanup); }()); \ No newline at end of file