I'm making an application for android with Ionic 3. I have one game that uses babylon.js
and another one that uses three.js
.
Testing the app on devices with Android 5.11 or inside, the part of three.js
does not walk while Babylon does. Three gives me this error:
webGL not supported
And if I put in the console:
document.createElement("canvas").getContext("webgl")
It results in NULL
, which makes sense.
Babylon is perfect, but with:
document.createElement("canvas").getContext("webgl")
It also returns NULL
. But if pongo engine.webGLversion
returns 2
.
On Android 6 or 7 everything is fine:
document.createElement("canvas").getContext("webgl")
It returns something that makes sense, and both three and babylon say they use webgl.
Reading out there I found out that the webview of android (chrome) blocked webgl for android 5.11 or lower. So it makes sense that three go well on Android 6 and 7.
I installed the Crosswalk plugin for ionic and everything was solved even though going much slower.
The question that remains is whether:
Did someone go through the same thing and could shed some light on the matter?