Browse Source

Merge branch 'master' of https://github.com/BabylonJS/Babylon.js

David Catuhe 6 năm trước cách đây
mục cha
commit
a0f1e94c56

+ 20 - 18
Playground/frame.css

@@ -18,27 +18,29 @@ canvas {
     right: 10px;
     top: 20px;
     cursor: default;
-    color: white;
+    z-index:10;
+    background-color: #7283a0;
+    color:white;
+    padding:5px;
+    font-family: 'Segoe UI';
+    pointer-events: none;
+    user-select: none;
 }
 
-#link {
+.refreshlabel, .editlabel{
     position: absolute;
-    width: 100%;
-    bottom: 10px;
-    cursor: default;
+    left: 0px;
+    cursor: pointer;    
     color: white;
-    text-align: center;
-    left:0;
-    cursor:pointer;
+    background-color: #7283a0;
+    color:white;
+    padding:5px;
+    
 }
 
-#refresh {
-    position: absolute;
-    width: 100%;
-    top: 10px;
-    cursor: default;
-    color: white;
-    text-align: center;
-    left:0;
-    cursor:pointer;
-}
+.refreshlabel {
+    top: 20px;
+}
+.editlabel {
+    top: 75px;
+}

+ 12 - 4
Playground/frame.html

@@ -76,10 +76,18 @@
     <body>
         <canvas touch-action="none" id="renderCanvas" tabindex="1"></canvas>
 
-        <span class="label" id="fpsLabel">FPS</span>
-
-        <a class="link" id="refresh" href="#">Reload</a>
-        <a class="link" id="link" href="#" target="_blank">Edit</a>
+        <span id="fpsLabel">FPS</span>
+
+        <div class="refreshlabel">
+                <img id="refresh" src="textures/Refresh_32.png" height="32" width="32" alt="Reload Page" title="Reload Page"/>
+        </div>
+
+        <div class="editlabel">
+            <a id="edit" href="#" target="_blank">
+                <img src="textures/Edit_32.png" height="32" width="32" alt="Edit in Playground" title="Edit in Playground"/>
+            </a>
+        </div>
+        
 
         <script src="https://code.jquery.com/jquery.js"></script>
         <script src="js/frame.js"></script>

+ 6 - 6
Playground/js/frame.js

@@ -4,7 +4,7 @@
     var engine;
     var fpsLabel = document.getElementById("fpsLabel");
     var refreshAnchor = document.getElementById("refresh");
-    var linkAnchor = document.getElementById("link");
+    var editAnchor = document.getElementById("edit");
     var scripts;
     var zipCode;
 
@@ -13,8 +13,8 @@
         fpsLabel.style.display = "none";
         refreshAnchor.style.visibility = "hidden";
         refreshAnchor.style.display = "none";
-        linkAnchor.style.visibility = "hidden";
-        linkAnchor.style.display = "none";
+        editAnchor.style.visibility = "hidden";
+        editAnchor.style.display = "none";
     }
 
     BABYLON.Engine.ShadersRepository = "/src/Shaders/";
@@ -191,10 +191,10 @@
                 xmlHttp.open("GET", snippetUrl + "/" + hash.replace("#", "/"));
                 xmlHttp.send();
 
-                var link = document.getElementById("link");
+                var edit = document.getElementById("edit");
 
-                if (link) {
-                    link.href = "//www.babylonjs-playground.com/#" + hash;
+                if (edit) {
+                    edit.href = "//www.babylonjs-playground.com/#" + hash;
                 }
             } catch (e) {
 

BIN
Playground/textures/Edit_32.png


BIN
Playground/textures/Refresh_32.png