{"id":75,"date":"2020-11-30T05:56:26","date_gmt":"2020-11-30T05:56:26","guid":{"rendered":"https:\/\/studios.nomoss.co\/blog\/?page_id=75"},"modified":"2023-07-06T11:05:52","modified_gmt":"2023-07-06T00:05:52","slug":"real-deal-bridge-application-page","status":"publish","type":"page","link":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/","title":{"rendered":"Real Deal Bridge Application Page"},"content":{"rendered":"\n<p>This is the Real Deal Bridge .ejs page, displaying the WebGL version of the application.<\/p>\n\n\n\n<p><a href=\"https:\/\/studios.nomoss.co\/blog\/?p=66\">Find out more here.<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;head&gt;\n  &lt;meta charset=\"utf-8\"&gt;\n  &lt;meta http-equiv=\"Cache-control\" content=\"no-cache\"&gt;\n&lt;\/head&gt;\n\n&lt;body&gt;\n  &lt;div id=\"alreadyOpen\" style=\"display: none; width: 100%; text-align: center;\"&gt;&lt;h3&gt;You already have a Real Deal window open. Please close it and refresh this page.&lt;\/h3&gt;&lt;\/div&gt;\n\n  &lt;div id=\"unsupportedDevice\" style=\"display: none; width: 100%; text-align: center;\"&gt;&lt;h3&gt;Real Deal for web is not supported on your device. Please &lt;a href=\"http:\/\/onelink.to\/realdeal\"&gt;click here&lt;\/a&gt; to find a version for your device.&lt;\/h3&gt;&lt;\/div&gt;\n\n  &lt;div id=\"gameContainer\"&gt;&lt;\/div&gt;\n\n  &lt;div id=\"loader\"&gt;\n    &lt;img class=\"logo\" src=\"TemplateData\/logo.png\"&gt;&lt;\/img&gt;\n    &lt;div class=\"spinner\"&gt;&lt;\/div&gt;\n    &lt;div class=\"progress\"&gt;&lt;div class=\"full\"&gt;&lt;\/div&gt;&lt;\/div&gt;\n  &lt;\/div&gt;\n\n  &lt;!-- BEGIN WEBGL FILE BROWSER LIB --&gt;\n  &lt;form id=\"fileBrowserPopup\" style=\"display: none;\"&gt;\n      &lt;img src=\"TemplateData\/2x2.png\" style=\"position: absolute; width: 100%; height: 100%;\" \/&gt;\n      &lt;img src=\"TemplateData\/White-Button.png\" style=\"position: absolute;  top: 35%; left: 38%; width: 25%; height: 30%;\" \/&gt;\n\n      &lt;label for=\"fileToUpload\"&gt;\n          &lt;img src=\"TemplateData\/upload_button.png\" style=\"position: absolute; top: 45%; left: 42.8%; width: 16%; height: 10%;\" \/&gt;\n      &lt;\/label&gt;\n      &lt;input type=\"File\" name=\"fileToUpload\" id=\"fileToUpload\" style=\"width: 0px; height: 0px;\" onchange=\"sendfile(event);return false;\" \/&gt;\n\n      &lt;label for=\"closePopup\"&gt;\n          &lt;img src=\"TemplateData\/close_button.png\" style=\"position: absolute; top: 57%; left: 48.0%; width: 5%; height: 5%;\" \/&gt;\n      &lt;\/label&gt;\n      &lt;input type=\"button\" name=\"closePopup\" id=\"closePopup\" style=\"width: 0px; height: 0px;\" onclick=\"hidePopup()\" \/&gt;\n  &lt;\/form&gt;\n  &lt;!-- END WEBGL FILE BROWSER LIB --&gt;\n\n  &lt;!-- START PHOTON ACTIVE SCRIPT --&gt;\n  &lt;script&gt;\nvar isActive;\ndocument.onload = function(){\ndocument.addEventListener('visibilitychange', function () {\nif (document.visibilityState == \"hidden\") {\n  isActive = setInterval(function() { gameInstance.SendMessage(\"PUNManager\", \"SendServerAcks\"); }, 250);\n} else {\n  clearInterval(isActive);\n  isActive = false;\n}\n});\n}\n&lt;\/script&gt;\n  &lt;!-- END PHOTON ACTIVE SCRIPT --&gt;\n\n  &lt;!-- START ENVIRONMENT HELPER SCRIPT --&gt;\n  &lt;script&gt;\n    var env = '&lt;%= process.env.ENVIRONMENT %&gt;';\n    console.log(\"Environment: \" + env);\n    function GetEnv(){\n      return env;\n    }\n  &lt;\/script&gt;\n  &lt;!-- END ENV HELPER SCRIPT --&gt;\n\n&lt;\/body&gt;\n\n&lt;script&gt;\n\/\/Block multiple tabs from being open at the same time\nlocalStorage.openpages = Date.now();\nvar onLocalStorageEvent = function(e){\n  if(e.key == \"openpages\"){\n    \/\/ Emit that you're already available.\n    localStorage.page_available = Date.now();\n  }\n  if(e.key == \"page_available\"){\n    if(!IsSafari()){\n      alert(\"You already have a Real Deal window open. Please close it and refresh the page.\");\n      document.getElementById(\"gameContainer\").style.display = \"none\";\n      document.querySelector(\"#loader\").style.display = \"none\";\n      document.getElementById(\"alreadyOpen\").style.display = \"block\";\n      document.body.style.background = \"#ffffff\";\n    }\n  }\n};\nwindow.addEventListener('storage', onLocalStorageEvent, false);\n&lt;\/script&gt;\n\n&lt;script type='text\/javascript'&gt;\n    function sendfile(e) {\n        var files = e.target.files;\n        for (var i = 0, f; f = files&#91;i]; i++) {\n            var reader = new FileReader();\n            reader.onload = (function (file) {\n                return function (e) {\n                    gameInstance.SendMessage('FileBrowserDialogLib', 'ApplyFileName', escape(file.name));\n\n                    (window.filedata = window.filedata ? window.filedata : {})&#91;file.name] = e.target.result;\n                    gameInstance.SendMessage(\"FileBrowserDialogLib\", \"FileUpload\", file.name);\n                }\n            })(f);\n            reader.readAsArrayBuffer(f);\n        }\n    }\n    function hidePopup() {\n        gameInstance.SendMessage(\"FileBrowserDialogLib\", \"CloseFilePopupDialog\");\n    }\n&lt;\/script&gt;\n\n&lt;script type='text\/javascript'&gt;\n  \/\/This is the stuff to print an image\n\n  function ImagetoPrint(source)\n  {\n    console.log(\"Creating print page\");\n    return \"&lt;html&gt;&lt;head&gt;&lt;scri\"+\"pt&gt;function step1(){\\n\" +\n            \"setTimeout('step2()', 10);}\\n\" +\n            \"function step2(){window.print();window.close()}\\n\" +\n            \"&lt;\/scri\" + \"pt&gt;&lt;\/head&gt;&lt;body onload='step1()'&gt;\\n\" +\n            \"&lt;img src='\" + source + \"' style='max-width:3508px; max-height: 2480'\/&gt;&lt;\/body&gt;&lt;\/html&gt;\";\n  }\n\n  var pwa = null;\n\n  function PrintImage(source)\n  {\n    console.log(\"Received \" + source.length + \" bytes to print\");\n    var srcString = \"data:image\/png;base64,\";\n\n    var binaryString = '';\n    for(var i = 0; i &lt; source.length; i++){\n      binaryString += String.fromCharCode(source&#91;i]);\n    }\n\n    srcString += btoa(binaryString);\n\n    var Pagelink = \"about:blank\";\n    if(pwa == null || pwa.closed){\n      var pwa = window.open(Pagelink, \"_new\");\n\n      if(pwa == null){\n        alert(\"You or your browser has disabled popups for this site. Please adjust your browser settings then try again.\");\n      }else{\n        pwa.document.open();\n        pwa.document.write(ImagetoPrint(srcString));\n        pwa.document.close();\n      }\n    }else{\n      pwa.focus();\n    }\n\n    console.log(\"Printed\");\n  }\n&lt;\/script&gt;\n\n\n&lt;script src=\"Build\/UnityLoader.js\"&gt;&lt;\/script&gt;\n\n&lt;script&gt;\n\nif(IsMobileOrTablet()){\n  \/\/Show the 1link thing\n  document.getElementById(\"unsupportedDevice\").style.display = \"block\";\n  document.getElementById(\"gameContainer\").style.display = \"none\";\n  document.querySelector(\"#loader\").style.display = \"none\";\n  document.body.style.background = \"#ffffff\";\n}else{\n  Instantiate();\n}\n\nvar gameInstance;\nfunction Instantiate(){\n  gameInstance = UnityLoader.instantiate(\"gameContainer\", \"Build\/RealDealWeb.json\", {onProgress: UnityProgress});\n}\nfunction UnityProgress(gameInstance, progress) {\n  if (!gameInstance.Module) {\n    return;\n  }\n  const loader = document.querySelector(\"#loader\");\n  if (!gameInstance.progress) {\n    const progress = document.querySelector(\"#loader .progress\");\n    progress.style.display = \"block\";\n    gameInstance.progress = progress.querySelector(\".full\");\n    loader.querySelector(\".spinner\").style.display = \"none\";\n  }\n  gameInstance.progress.style.transform = `scaleX(${progress})`;\n  if (progress === 1 &amp;&amp; !gameInstance.removeTimeout) {\n    gameInstance.removeTimeout = setTimeout(function() {\n        loader.style.display = \"none\";\n    }, 100);\n  }\n}\n&lt;\/script&gt;\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is the Real Deal Bridge .ejs page, displaying the WebGL version of the application. Find out more here.<\/p>\n","protected":false},"author":1,"featured_media":933,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","footnotes":""},"ppma_author":[65],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Real Deal Bridge Application Page | Noble Steed Games<\/title>\n<meta name=\"description\" content=\"Sample .ejs code for our Real Deal Bridge application. It displays the Unity WebGL version of the application.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Real Deal Bridge Application Page | Noble Steed Games\" \/>\n<meta property=\"og:description\" content=\"Sample .ejs code for our Real Deal Bridge application. It displays the Unity WebGL version of the application.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/\" \/>\n<meta property=\"og:site_name\" content=\"Noble Steed Games\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/NobleSteedAU\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-06T00:05:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/07\/Production-Unity-WebGL.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"378\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@NobleSteedAU\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/\",\"url\":\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/\",\"name\":\"Real Deal Bridge Application Page | Noble Steed Games\",\"isPartOf\":{\"@id\":\"https:\/\/noblesteedgames.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/07\/Production-Unity-WebGL.jpg\",\"datePublished\":\"2020-11-30T05:56:26+00:00\",\"dateModified\":\"2023-07-06T00:05:52+00:00\",\"description\":\"Sample .ejs code for our Real Deal Bridge application. It displays the Unity WebGL version of the application.\",\"breadcrumb\":{\"@id\":\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#primaryimage\",\"url\":\"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/07\/Production-Unity-WebGL.jpg\",\"contentUrl\":\"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/07\/Production-Unity-WebGL.jpg\",\"width\":900,\"height\":378,\"caption\":\"A flowchart about Readl Deal Bridge's server architecture, using Unity WebGL.\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/noblesteedgames.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Real Deal Bridge Application Page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/noblesteedgames.com\/blog\/#website\",\"url\":\"https:\/\/noblesteedgames.com\/blog\/\",\"name\":\"Noble Steed Games\",\"description\":\"Stories from Development\",\"publisher\":{\"@id\":\"https:\/\/noblesteedgames.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/noblesteedgames.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/noblesteedgames.com\/blog\/#organization\",\"name\":\"Noble Steed Games\",\"url\":\"https:\/\/noblesteedgames.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/noblesteedgames.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/12\/PFP.jpg\",\"contentUrl\":\"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/12\/PFP.jpg\",\"width\":1374,\"height\":1374,\"caption\":\"Noble Steed Games\"},\"image\":{\"@id\":\"https:\/\/noblesteedgames.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/NobleSteedAU\",\"https:\/\/x.com\/NobleSteedAU\",\"https:\/\/www.instagram.com\/noblesteedau\/\",\"https:\/\/www.linkedin.com\/company\/18263569\/\",\"https:\/\/www.youtube.com\/channel\/UC-CE2Op8dEH0LET0t9Zw79g\",\"https:\/\/twitter.com\/NobleSteedAU\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Real Deal Bridge Application Page | Noble Steed Games","description":"Sample .ejs code for our Real Deal Bridge application. It displays the Unity WebGL version of the application.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/","og_locale":"en_US","og_type":"article","og_title":"Real Deal Bridge Application Page | Noble Steed Games","og_description":"Sample .ejs code for our Real Deal Bridge application. It displays the Unity WebGL version of the application.","og_url":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/","og_site_name":"Noble Steed Games","article_publisher":"https:\/\/www.facebook.com\/NobleSteedAU","article_modified_time":"2023-07-06T00:05:52+00:00","og_image":[{"width":900,"height":378,"url":"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/07\/Production-Unity-WebGL.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@NobleSteedAU","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/","url":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/","name":"Real Deal Bridge Application Page | Noble Steed Games","isPartOf":{"@id":"https:\/\/noblesteedgames.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#primaryimage"},"image":{"@id":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#primaryimage"},"thumbnailUrl":"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/07\/Production-Unity-WebGL.jpg","datePublished":"2020-11-30T05:56:26+00:00","dateModified":"2023-07-06T00:05:52+00:00","description":"Sample .ejs code for our Real Deal Bridge application. It displays the Unity WebGL version of the application.","breadcrumb":{"@id":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#primaryimage","url":"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/07\/Production-Unity-WebGL.jpg","contentUrl":"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/07\/Production-Unity-WebGL.jpg","width":900,"height":378,"caption":"A flowchart about Readl Deal Bridge's server architecture, using Unity WebGL."},{"@type":"BreadcrumbList","@id":"https:\/\/noblesteedgames.com\/blog\/real-deal-bridge-application-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/noblesteedgames.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Real Deal Bridge Application Page"}]},{"@type":"WebSite","@id":"https:\/\/noblesteedgames.com\/blog\/#website","url":"https:\/\/noblesteedgames.com\/blog\/","name":"Noble Steed Games","description":"Stories from Development","publisher":{"@id":"https:\/\/noblesteedgames.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/noblesteedgames.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/noblesteedgames.com\/blog\/#organization","name":"Noble Steed Games","url":"https:\/\/noblesteedgames.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/noblesteedgames.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/12\/PFP.jpg","contentUrl":"https:\/\/noblesteedgames.com\/blog\/wp-content\/uploads\/2023\/12\/PFP.jpg","width":1374,"height":1374,"caption":"Noble Steed Games"},"image":{"@id":"https:\/\/noblesteedgames.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/NobleSteedAU","https:\/\/x.com\/NobleSteedAU","https:\/\/www.instagram.com\/noblesteedau\/","https:\/\/www.linkedin.com\/company\/18263569\/","https:\/\/www.youtube.com\/channel\/UC-CE2Op8dEH0LET0t9Zw79g","https:\/\/twitter.com\/NobleSteedAU"]}]}},"_links":{"self":[{"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/pages\/75"}],"collection":[{"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/comments?post=75"}],"version-history":[{"count":3,"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/pages\/75\/revisions"}],"predecessor-version":[{"id":957,"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/pages\/75\/revisions\/957"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/media\/933"}],"wp:attachment":[{"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/media?parent=75"}],"wp:term":[{"taxonomy":"author","embeddable":true,"href":"https:\/\/noblesteedgames.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=75"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}