# Hosting babylon.js project on onion site

**URL:** <https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758>\
**Category:** Questions\
**Tags:** tutorial\
**Created:** [May 12, 2023, 10:38pm UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758 "2023-05-12T22:38:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andrey](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andrey/32/32186_2.png) [@Andrey](https://forum.babylonjs.com/u/Andrey)\
**Post date:** [May 12, 2023, 10:38pm UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/1 "2023-05-12T22:38:22Z")

</div>

Hey guys,  
I was looking for an easy to learn 3d web-library… I just found an amazing babylon.js project. Thanks to the developers who love it! And here is the question straight away. Has anyone tried to host a project on an onion web-site? Sample.html works perfectly in a browser on localhost, works well if run via ngrok. But if accessed via onion-browser, then it is just a white page even though javascrips are allowed, etc. (I mention that the page as a pure-html is accessible to confirm that there is access to it and all js-files hosted on cds are accessible) Any suggestions? Thanks.  
Update: if I open this forum via onion-browser with existing snippets, it shows the following.

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

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 15, 2023, 2:16pm UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/2 "2023-05-15T14:16:39Z")

</div>

Did you check with the tor browser ppl ? I wonder if WebGL/WebGPU is allowed inside for privacy reasons ?

---

<div class="post-metadata">

**Author:** ![Andrey](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andrey/32/32186_2.png) [@Andrey](https://forum.babylonjs.com/u/Andrey)\
**Post date:** [May 15, 2023, 2:19pm UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/3 "2023-05-15T14:19:14Z")

</div>

> [@sebavan](#):
>
> WebGL/WebGPU

I do not know how to check it.

---

<div class="post-metadata">

**Author:** ![carolhmj](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/carolhmj/32/25918_2.png) [@carolhmj](https://forum.babylonjs.com/u/carolhmj)\
**Post date:** [May 15, 2023, 3:15pm UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/4 "2023-05-15T15:15:21Z")

</div>

You could check here if you can access it? [https://get.webgl.org](https://get.webgl.org/)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 15, 2023, 7:21pm UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/5 "2023-05-15T19:21:53Z")

</div>

The issue seems to be on the browser side as they disable webgl by default. You should check on the TOR forum how to enable it ? Once you have it all working on WebGL we could check if there are any specific Babylon issue.

---

<div class="post-metadata">

**Author:** ![Andrey](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andrey/32/32186_2.png) [@Andrey](https://forum.babylonjs.com/u/Andrey)\
**Post date:** [May 16, 2023, 11:50am UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/6 "2023-05-16T11:50:32Z")

</div>

Nope. They did not disable it by default.

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

---

<div class="post-metadata">

**Author:** ![Andrey](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andrey/32/32186_2.png) [@Andrey](https://forum.babylonjs.com/u/Andrey)\
**Post date:** [May 16, 2023, 11:56am UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/7 "2023-05-16T11:56:52Z")

</div>

A little bit more of a research:  
WebGL 2 is disabled.  
But… I tried to convert the sample project to WebGL 1, and 2… and WebPBU or what ever is there, there is still “0Operation not supported” message.

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/e/4/e405f1be58efe546103f7cbee8d28fda1f218be9.png)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 16, 2023, 5:24pm UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/8 "2023-05-16T17:24:21Z")

</div>

So it might not be related to rendering but another feature of the page you are trying to load. It looks like you have an iframe there ?

Could you check on the TOR forum ? they could help let us know what the issue is ?

---

<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:** [May 16, 2023, 7:16pm UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/9 "2023-05-16T19:16:13Z")

</div>

This is probably the issue - [https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/40117](https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/40117)

To prevent fingerprinting they disabled the video card query support.

---

<div class="post-metadata">

**Author:** ![Andrey](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/andrey/32/32186_2.png) [@Andrey](https://forum.babylonjs.com/u/Andrey)\
**Post date:** [May 17, 2023, 7:10am UTC](https://forum.babylonjs.com/t/hosting-babylon-js-project-on-onion-site/40758/10 "2023-05-17T07:10:04Z")

</div>

I have found a solution, a work-around:

Here are steps for Firefox (original tor-browser), for other browsers steps are different in how to find the settings

1. Go to `about:config` in your address bar.
2. Search for `webgl.force-enabled` and make sure this preference is set to `true`.  
If it is currently set to false, click the toggle icon on the far right to change the value to true.
3. Search for `webgl.disabled` and make sure this preference is set to `false`. If it is currently set to true, click the toggle icon on the far right to change the value to false.
4. **Restart** Firefox to apply your new settings.

Also a Babylon project must be WEBGL2, other types just do not work… To my understanding to set WEBGL2, only canvas must be defined. As follows:

```auto
var createDefaultEngine = function() {
return new BABYLON.Engine(canvas, true,
{ preserveDrawingBuffer: true, stencil: true,
disableWebGL2Support: false}); };

```
