From 2ace630ed5e90dde04dd4de8d27905ee717f6571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20=E2=80=98Touky=E2=80=99=20Huet?= Date: Sat, 21 Sep 2013 22:02:25 +0000 Subject: [PATCH] MeshViewer html update --- test/meshviewer_index.html | 125 +++++++++++++++---------------------- 1 file changed, 52 insertions(+), 73 deletions(-) diff --git a/test/meshviewer_index.html b/test/meshviewer_index.html index bf79b6d3..37384cbc 100644 --- a/test/meshviewer_index.html +++ b/test/meshviewer_index.html @@ -16,7 +16,6 @@ progress { height: 18px; border-radius: 9px; } - progress::-webkit-progress-bar { background-color: #f3f3f3; border: 1px solid #000000; @@ -30,6 +29,24 @@ progress::-webkit-progress-value { height: 14px; border-radius: 0px; } +#listener { + position: relative; +} +#progress_bar { + position: absolute; + top: 40%; + left: 40%; + z-index: 3; +} +#nacl_div { + position: absolute; + top: 2px; + left: 2px; + z-index: -1; +} +#BGCanvas { + border:1px solid #000000; +} @@ -39,31 +56,20 @@ progress::-webkit-progress-value { NaClModule = null; // Global application object. MeshCodeModule = null; statusText = 'NO-STATUS'; - window.setTimeout("Tick()", 100); - document.getElementById('prout').style.top = 0; function Tick() { - window.setTimeout("Tick()", 100); - var truc = parseInt(document.getElementById('prout').style.top); - //document.getElementById('prout').style.top = truc + 1 + "px"; - var statusField = document.getElementById('tick_field'); - if (statusField) { - statusField.innerHTML = truc; - } + window.setTimeout("Tick()", 100); } // Indicate load success. function moduleDidLoad() { - NaClModule = document.getElementById('ID_NaClModule'); - MeshCodeModule = document.getElementById('ID_MeshCode'); - //document.getElementById('listener').style.visibility = "visible"; - //document.getElementById('canvas_loading').style.display = "none"; - //document.getElementById('ID_NaClModule').width = 640; - //document.getElementById('ID_NaClModule').height = 480; - - updateStatus('Rock n\' Roll !!'); + NaClModule = document.getElementById('ID_NaClModule'); + MeshCodeModule = document.getElementById('ID_MeshCode'); + updateStatus('Rock n\' Roll !!'); + var progress_bar = document.getElementById('progress_bar'); + progress_bar.style.visibility="hidden"; } // The 'message' event handler. This handler is fired when the NaCl module @@ -111,7 +117,7 @@ progress::-webkit-progress-value { progressBar.max = event.total; progressBar.value = event.loaded; var load_progress = ((event.loaded / event.total) * 100.0); - status_field.innerHTML = 'Loading [' + load_progress.toFixed(0) + '%]'; + status_field.innerHTML = 'Please wait, loading [' + load_progress.toFixed(0) + '%]'; } else { progressBar.value = -1; @@ -123,11 +129,7 @@ progress::-webkit-progress-value { function SendMeshData() { if (NaClModule) - { NaClModule.postMessage(MeshCodeModule.value); - //NaClModule.postMessage("sc#f8f afcb 1 1 1 0"); - alert("Data sent"); - } else alert("Module not loaded"); } @@ -137,66 +139,43 @@ progress::-webkit-progress-value {

Mesh Viewer : Native Client version.

-

- - -
- -
NO-STATUS
- - - - -
-
+
+
+ + test + +
+
NO-STATUS
+ +
+
+ + +
+ +
+

Status

- +
-
- -
- -
-