B4J Question WebGL in a Webview ?

alienhunter

Active Member
Licensed User
Longtime User
Hi ,
i got a question , it is possible to run WebGL in a webwiew ?

it needs to load scripts

B4X:
  <script src="lib/three.min.js"></script>
  <script src="lib/orbitcontrols.js"></script>
  <!-- fallback if no WebGL -->
  <script src="lib/projector.js"></script>
  <script src="lib/canvasrenderer.js"></script>
  <script src="lib/jquery-2.1.3.min.js"></script>
  <script src="src/csg.js"></script>
  <script src="src/threecsg.js"></script>
  <script src="src/openjscad.js"></script>
  <script src="src/formats.js"></script>

error comes up
Error: Error: Your browser does not support the HTML File API


see link
https://joostn.github.io/OpenJsCad/
thanks
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can see which features are supported by WebView with this code:
B4X:
Sub AppStart (Form1 As Form, Args() As String)
   MainForm = Form1
   MainForm.SetFormStyle("UNIFIED")
   MainForm.Show
   Dim wv As WebView
   wv.Initialize("")
   MainForm.RootPane.AddNode(wv, 0, 0, 500, 500)
   wv.LoadUrl("https://html5test.com/")
End Sub
It doesn't support the File API which is apparently required by your scripts.
 
Upvote 0
Top