|
32 | 32 |
|
33 | 33 | gtag('config', 'G-YVVR1546XJ');
|
34 | 34 | </script>
|
| 35 | + <!-- MICROSCAPE FUNCTIONALITY --> |
| 36 | + <script> |
| 37 | + function send(message) { |
| 38 | + const iframe = document.querySelector("#game-window"); |
| 39 | + iframe.contentWindow.postMessage(message, "*"); |
| 40 | + } |
| 41 | + |
| 42 | + function sendMessage(event, value) { |
| 43 | + const message = { |
| 44 | + "type": event, |
| 45 | + "value": value |
| 46 | + } |
| 47 | + send(message); |
| 48 | + } |
| 49 | + |
| 50 | + function toogleChannel(cb, channel) { |
| 51 | + const message = { |
| 52 | + "type": "TOGGLE_CHANNEL", |
| 53 | + "value": channel + "|" + cb.checked |
| 54 | + } |
| 55 | + send(message); |
| 56 | + } |
| 57 | + |
| 58 | + function updateChannelAlpha(value, channel) { |
| 59 | + const message = { |
| 60 | + "type": "UPDATE_ALPHA", |
| 61 | + "value": channel + "|" + value |
| 62 | + } |
| 63 | + send(message); |
| 64 | + } |
| 65 | + |
| 66 | + function updateChannelColor(target, channel) { |
| 67 | + var color = target.value; |
| 68 | + const r = parseInt(color.substr(1,2), 16); |
| 69 | + const g = parseInt(color.substr(3,2), 16); |
| 70 | + const b = parseInt(color.substr(5,2), 16); |
| 71 | + const message = { |
| 72 | + "type": "UPDATE_COLOR", |
| 73 | + "value": channel + "|" + r + "|" + g + "|" + b |
| 74 | + } |
| 75 | + console.log(message); |
| 76 | + send(message); |
| 77 | + } |
| 78 | + |
| 79 | + function setAtlasNumber(event) { |
| 80 | + let atlasNumber = document.getElementById("atlas-number"); |
| 81 | + var number = atlasNumber.value; |
| 82 | + |
| 83 | + let atlasColor = document.getElementById("atlas-color"); |
| 84 | + var color = atlasColor.value; |
| 85 | + |
| 86 | + const r = parseInt(color.substr(1,2), 16); |
| 87 | + const g = parseInt(color.substr(3,2), 16); |
| 88 | + const b = parseInt(color.substr(5,2), 16); |
| 89 | + const message = { |
| 90 | + "type": "SET_ATLAS_NUMBER", |
| 91 | + "value": number + "|" + r + "|" + g + "|" + b |
| 92 | + } |
| 93 | + console.log(message); |
| 94 | + send(message); |
| 95 | + } |
| 96 | + |
| 97 | + document.getElementById("atlas-number").addEventListener("input", setAtlasNumber); |
| 98 | + document.getElementById("atlas-color").addEventListener("change", setAtlasNumber); |
| 99 | + |
| 100 | + function setResolution(resolution) { |
| 101 | + const message = { |
| 102 | + "type": "SET_RESOLUTION", |
| 103 | + "value": parseInt(resolution) |
| 104 | + } |
| 105 | + console.log(message); |
| 106 | + send(message); |
| 107 | + } |
| 108 | + |
| 109 | + document.getElementById("project").addEventListener("input", updateProject); |
| 110 | + |
| 111 | + function updateProject(event){ |
| 112 | + } |
| 113 | + |
| 114 | + </script> |
| 115 | +<!-- MICROSCAPE FUNCTIONALITY --> |
35 | 116 | </head>
|
36 | 117 | <body class="body">
|
37 | 118 | <div id="page-container">
|
@@ -399,6 +480,28 @@ <h4 class="closed">Project Must Contain</h4>
|
399 | 480 | </div>
|
400 | 481 | </div>
|
401 | 482 | </div>
|
| 483 | +<!-- microscape viewer portal --> |
| 484 | +<div id="threeDOverlay"> |
| 485 | + <div class="container"> |
| 486 | + <div id="open3DModal" class="modalDialog"> |
| 487 | + <div class="containing_and_positioning_of_modal"> |
| 488 | + <div id="body_of_modal" class="safeOfOverlayClick"> |
| 489 | + <p id="3Dmodal-greeting">Placeholder</p> |
| 490 | + <div class="lds-ring"><div></div><div></div><div></div><div></div></div> |
| 491 | + <iframe id="game-window" src="http://thien-test-iframe.s3-website-us-east-1.amazonaws.com/index.html?project=0001_h_ao_svd" width="100%" height="600px" style="position: relative; z-index:10;" frameborder="0"></iframe> |
| 492 | + <div id="modal-closure" style="margin-bottom:10px;"> |
| 493 | + <a href="http://www.microscape.xyz">www.microscape.xyz</a></div> |
| 494 | + </div> |
| 495 | + <div class="row"> |
| 496 | + <div class="col-xs-4 col-sm-4 top-right"> |
| 497 | + <a title = "Close" class="button close-button-modal"><i class="fa-solid fa-xmark"></i></a></div> |
| 498 | + <!-- 6LedB9gdAAAAANK8mQLhxsR7-mpeDlxzPdm9fQkV secret key --> |
| 499 | + </div> |
| 500 | + </div> |
| 501 | + </div> |
| 502 | + </div> |
| 503 | + </div> |
| 504 | +</div> |
402 | 505 | <!-- footer with contacts -->
|
403 | 506 | <section id="contact-section">
|
404 | 507 | <div class="container">
|
|
0 commit comments