Home › Forums › Bug Reports and Feature Requests › WebGL crash on mobile when importing ThreeJS
Tagged: Svensk lusta XXX WebGift
- This topic has 4 replies, 3 voices, and was last updated 7 years ago by donalffons.
-
AuthorPosts
-
2017-11-27 at 10:31 pm #779donalffonsCustomer
I ran into a problem with the bloom feature that I implemented. However, this seems not to be a bloom-related issue, but more a ThreeJS related one. Here is an example file, with the bloom effect I wanted to achieve: https://donalffons-interface.s3.amazonaws.com/Verge3D/BloomBug/Verge3DTest.html
This file runs fine in my laptop’s web browser. But it crashes on my phone (tried it on two different phones).
I drilled down on the issue a bit and found out, that seemingly as soon as I include ThreeJS in my main HTML page, it crashes on my phones. Example: https://donalffons-interface.s3.amazonaws.com/Verge3D/ThreeJSFail/ThreeJSFail.html
However, I think I need ThreeJS for the bloom effect (right?!).<html lang="en"> <head> ... </head> <body> <div id="container"></div> <script src="build/three.js"></script> <script src="v3d.js"></script> <script src="ThreeJSFail.js"></script> </body> </html>
Am I doing something wrong? Is there a way around this problem?
Attached is the simplified (second) example.
Here you can download the first (bloom) example: https://donalffons-interface.s3.amazonaws.com/Verge3D/BloomBug/Verge3DBloom.zip2017-11-27 at 10:34 pm #780donalffonsCustomerUpload failed. Download link for simplified (second) example: https://donalffons-interface.s3.amazonaws.com/Verge3D/ThreeJSFail/ThreeJSFail.zip
2017-11-28 at 12:24 am #786Will WelkerCustomerThe three.js engine is already included in your Verge3D app. One of the issues on my list to understand is how to implement three.js code into the Verge3D architecture. Three.js examples do all of their initializing operations as part of the example. In Verge3D, all that initializing is already done. So eventually I need to learn where to delineate the three.js examples and cut out the initialization parts that are already included within a Verge3D app.
2017-11-28 at 3:57 pm #797Yuri KovelenovStaffYes, Verge3D already exposes THREE namespace so no need to link three.js library again. I checked the file and see that there are many light sources in it and from my experience this may cause overflowing curtain shader limits on restricted hardware such as smartphones. We’ll investigate this further.
2017-11-28 at 9:58 pm #802donalffonsCustomerThank you for clarifying, Yuri. I will take another shot at making Bloom work without importing ThreeJS.
-
AuthorPosts
- You must be logged in to reply to this topic.