Bläddra i källkod

Merge pull request #4193 from sbtron/sandboxdescription

Add text descriptions for sandbox
sebavan 7 år sedan
förälder
incheckning
8df768a09a
4 ändrade filer med 14 tillägg och 2 borttagningar
  1. 1 0
      sandbox/index-local.html
  2. 8 0
      sandbox/index.css
  3. 4 2
      sandbox/index.html
  4. 1 0
      sandbox/index.js

+ 1 - 0
sandbox/index-local.html

@@ -9,6 +9,7 @@
     <script src="../Tools/DevLoader/BabylonLoader.js"></script>
 </head>
 <body>
+    <p id="droptext">Drag and drop gltf, glb, obj or babylon files to view them</p>
     <canvas id="renderCanvas"></canvas>
     <div id="logo">
     </div>

+ 8 - 0
sandbox/index.css

@@ -106,6 +106,14 @@ a {
     background-size: 50%;
 }
 
+#droptext {
+    position: absolute;;
+    text-align: center;
+    color: #fff;
+    height: 50px;
+    width: 100%;
+    bottom: 5%;    
+}
 #btnDownArrow {
     position: absolute;
     bottom: 35px;

+ 4 - 2
sandbox/index.html

@@ -1,7 +1,9 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-    <title>BabylonJS - Sandbox</title>
+    <title>BabylonJS Sandbox - View glTF, glb, obj and babylon files</title>
+    <meta name="description" content="Viewer for glTF, glb, obj and babylon files powered by BabylonJS" />
+    <meta name="keywords" content="glTF, glb, obj, Babylon, BabylonJS, viewer, online viewer, 3D model viewer" />
     <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1">
 
     <link rel="shortcut icon" href="http://www.babylonjs.com/img/favicon/favicon.ico">
@@ -36,8 +38,8 @@
     <script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.min.js"></script>
     <script src="https://preview.babylonjs.com/materialsLibrary/babylonjs.materials.min.js"></script>
 </head>
-
 <body>
+    <p id="droptext">Drag and drop gltf, glb, obj or babylon files to view them</p>
     <canvas id="renderCanvas" touch-action="none"></canvas>
     <div id="logo">
     </div>

+ 1 - 0
sandbox/index.js

@@ -190,6 +190,7 @@ if (BABYLON.Engine.isSupported()) {
                 displayDebugLayerAndLogs();
             }
             document.getElementById("logo").className = "hidden";
+            document.getElementById("droptext").className = "hidden";
             canvas.style.opacity = 1;
             if (currentScene.activeCamera.keysUp) {
                 currentScene.activeCamera.keysUp.push(90); // Z