# Show default loading with ImportMeshAsync

**URL:** <https://forum.babylonjs.com/t/show-default-loading-with-importmeshasync/40974>\
**Category:** Questions\
**Created:** [May 19, 2023, 12:06pm UTC](https://forum.babylonjs.com/t/show-default-loading-with-importmeshasync/40974 "2023-05-19T12:06:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luca\_Scida](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/luca_scida/32/30906_2.png) [@Luca\_Scida](https://forum.babylonjs.com/u/Luca_Scida)\
**Post date:** [May 19, 2023, 12:06pm UTC](https://forum.babylonjs.com/t/show-default-loading-with-importmeshasync/40974/1 "2023-05-19T12:06:23Z")

</div>

It’s possible to show default loading with ImportMeshAsync ?

---

<div class="post-metadata">

**Author:** ![qq2315137135](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/qq2315137135/32/32219_2.png) [@qq2315137135](https://forum.babylonjs.com/u/qq2315137135)\
**Post date:** [May 19, 2023, 12:42pm UTC](https://forum.babylonjs.com/t/show-default-loading-with-importmeshasync/40974/2 "2023-05-19T12:42:53Z")

</div>

You may be looking for this

```javascript
    BABYLON.SceneLoader.ShowLoadingScreen = true

```

---

<div class="post-metadata">

**Author:** ![Luca\_Scida](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/luca_scida/32/30906_2.png) [@Luca\_Scida](https://forum.babylonjs.com/u/Luca_Scida)\
**Post date:** [May 19, 2023, 1:15pm UTC](https://forum.babylonjs.com/t/show-default-loading-with-importmeshasync/40974/3 "2023-05-19T13:15:01Z")

</div>

Not working [https://playground.babylonjs.com/#BRDY23#7](https://playground.babylonjs.com/#BRDY23#7)

---

<div class="post-metadata">

**Author:** ![Luca\_Scida](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/luca_scida/32/30906_2.png) [@Luca\_Scida](https://forum.babylonjs.com/u/Luca_Scida)\
**Post date:** [May 19, 2023, 2:15pm UTC](https://forum.babylonjs.com/t/show-default-loading-with-importmeshasync/40974/4 "2023-05-19T14:15:56Z")

</div>

```auto
scene.getEngine().displayLoadingUI();
...
scene.getEngine().hideLoadingUI();

```

---

<div class="post-metadata">

**Author:** ![DRLeria](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/drleria/32/50928_2.png) [@DRLeria](https://forum.babylonjs.com/u/DRLeria)\
**Post date:** [May 19, 2023, 2:30pm UTC](https://forum.babylonjs.com/t/show-default-loading-with-importmeshasync/40974/5 "2023-05-19T14:30:45Z")

</div>

You can also create your own Loading View

For example:

- In your HTML

```auto
  <!-- Loading DIV -->
  <div id="loadingDiv">
      <p id="loadingText" class="font-weight-light">L O A D I N G</p>
      <span class="loader"></span>
  </div>

```

- Format your Loading DIV in your CSS

```auto
/* Loader */
#loadingDiv {
    z-index: 200;
    position: absolute;
    width: 100%;
    height: 100%;
    background: #8bb4ff; /* Old browsers */
    background: -moz-linear-gradient(top, #8bb4ff 0%,#ff60f2 100%); /* FF3.6-15 */
    background: -webkit-linear-gradient(top, #8bb4ff 0%,#ff60f2 100%); /* Chrome10-25,Safari5.1-6 */
    background: linear-gradient(to bottom, #8bb4ff 0%,#ff60f2 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#FB7BA2', endColorstr='#FCE043',GradientType=0 ); /* IE6-9 */
    /* border: 25px solid rgb(255, 255, 255); */
    touch-action: none;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

#loadingText {
    position: absolute;
    color: white;
    display: inline-block;
    box-sizing: border-box;
    text-align: center;
    font-size: x-small;

    width: 100%;
    top: 50%;
    left: 50%;
    height: 50px;
    transform: translate(-50%, -50%);
    margin-top: 40px;
    letter-spacing: 0.3rem;
    touch-action: none;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
    /* animation: animText 6s ease infinite alternate; */
}

@keyframes animText {
    0% {
        letter-spacing: 0.2rem;
    }
    100% {
        letter-spacing: 0.4rem;
    }
}

.loader {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: 48px;
    height: 48px;
    display: inline-block;
    position: relative;
  }
.loader::after,
.loader::before {
    content: '';  
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #FFF;
    position: absolute;
    left: 0;
    top: 0;
    animation: animloader 2s linear infinite;
}
.loader::after {
    animation-delay: 1s;
}
  
@keyframes animloader {
    0% {
      transform: scale(0);
      opacity: 1;
    }
    100% {
      transform: scale(2);
      opacity: 0;
    }
}

```

- And finally in your js code you can hide your Loading DIV when your model is loaded

```auto
setTimeout(() => {
    hideLoadingView();              
}, 1000);

// Hide Loading View
function hideLoadingView() {
    document.getElementById("loadingDiv").style.display = "none";
}

```

Here you´ve an example:

[https://viseni.com/character\_navigation/](https://viseni.com/character_navigation/)
