# Is it possible to create fully local version of Babylon Viewer?

**URL:** <https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693>\
**Category:** Questions\
**Created:** [April 4, 2021, 11:27am UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693 "2021-04-04T11:27:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [April 4, 2021, 11:27am UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/1 "2021-04-04T11:27:03Z")

</div>

There are situations when users have no access to Internet, or this access is specially restricted.  
Here is the screenshot of working viewer example when Internet is off.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/a/a879ad09bc00f4e62637fc2b29081a44935a000f.png)

Is it possible to provide to users fully local version of Babylon Viewer?  
(without need for them to make additional coding or templating)?

---

<div class="post-metadata">

**Author:** ![Deltakosh](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/deltakosh/32/26635_2.png) [@Deltakosh](https://forum.babylonjs.com/u/Deltakosh)\
**Post date:** [April 5, 2021, 4:23pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/2 "2021-04-05T16:23:15Z")

</div>

Pinging @RaananW (But don’t hold your breath as he is on vacation :))

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [April 6, 2021, 11:34am UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/3 "2021-04-06T11:34:37Z")

</div>

Assigned @RaananW on April 6, 2021, 11:34am UTC



---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [April 8, 2021, 9:20am UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/4 "2021-04-08T09:20:56Z")

</div>

Seems like it is the resources that are missing. The configuration files only use relative paths, so if you host it locally it will work as well.

But I guess the question is not about a local version but an “no internet” version. That can be a little tricky. As the viewer is an embedded tool, I don’t think it would be a good idea to store downloadable assets per default.

How are you testing it? seeing the debugger, it feels like you set the network throttle to disconnect from the internet after loading the .js file or using cache (otherwise the domain used to load the assets was not [viewer.babylonjs.com](http://viewer.babylonjs.com)).

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [April 8, 2021, 6:11pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/5 "2021-04-08T18:11:52Z")

</div>

Here is another screenshot, from Opera.  
Internet is off. Localhost is on.  
After loading the viewer from local file seems that it needs some more files in order to work properly.  
So the question is how to make a version which would be completely independent from any external sources.  
(Also, in some CMS there is the requirement for plugins that they should provide the ability to work without external links).

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/2/207767967ead25f05251d0ad61c5db120c011d05.png)

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [April 9, 2021, 8:57am UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/6 "2021-04-09T08:57:20Z")

</div>

Oh,

this is because the default assetsRootURL is the viewer’s domain. You can define the root url (part of the scene configuration - [Babylon.js/sceneConfiguration.ts at master · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/blob/master/Viewer/src/configuration/interfaces/sceneConfiguration.ts#L39)) to be localhost to host your own assets. If you only change this, the directory structure should stay the same.

Would that work out in your case?

---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [April 9, 2021, 2:08pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/7 "2021-04-09T14:08:01Z")

</div>

Seems that this may be not a trivial task for unprepared user 🙂  
Here is the list of some external assets which Viewer wants to load:

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/2X/5/5a6732930445fe6ad3d3a69190584624ae4cc036.png)

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [April 9, 2021, 3:25pm UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/8 "2021-04-09T15:25:32Z")

</div>

ouch.

Some of those are related to different aspects of the viewer (for example the XR controllers and hands which you probably don’t need). Some are not needed as well. When I look at your console output, the network errors all refer to [viewer.babylonjs.com](http://viewer.babylonjs.com), which is the base URL for the assets. The rest are actually coming from Babylon itself.  
How did you generate this list?

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [April 15, 2021, 10:16am UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/9 "2021-04-15T10:16:27Z")

</div>

Unassigned @RaananW on April 15, 2021, 10:16am UTC



---

<div class="post-metadata">

**Author:** ![labris](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/labris/32/12576_2.png) [@labris](https://forum.babylonjs.com/u/labris)\
**Post date:** [April 15, 2021, 11:48am UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/10 "2021-04-15T11:48:28Z")

</div>

This list came from the user of Viewer plugin. As well as the question, which remains the same - is it possible to provide the version of Viewer which could work with no Internet connection and with no external assets.

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [April 15, 2021, 11:54am UTC](https://forum.babylonjs.com/t/is-it-possible-to-create-fully-local-version-of-babylon-viewer/19693/11 "2021-04-15T11:54:22Z")

</div>

If you can, please create a github issue for us to investigate that. I agree it will be better to support offline viewer as well
