User posts Yuri Kovelenov
13 January 2015 08:08
12 January 2015 23:12
The init_cb() callback which is fired after initialization has the second boolean argument (named success). If this value is false, that is no WebGL, an app can show up some hidden HTML content (image, text, video whatever).
For example:
Here assumed that the container element exists in your page, but is initially hidden, which can be done with HTML and CSS as follows:
Edit: added a bit more code to clarify things..
For example:
if (!success) {
var cont = document.getElementById("my_ID"); // get <div> container for fallback content
cont.style.display = "";
}
Here assumed that the container element exists in your page, but is initially hidden, which can be done with HTML and CSS as follows:
<div id="my_ID">Fallback content here..</div>
<style>
#my_ID {
display: none;
}
</style>
Edit: added a bit more code to clarify things..
12 January 2015 22:44
Well, it was our intention to show a troubleshooting page of some sort when WebGL is not available. We are going to provide help on this page on possible steps for getting WebGL work. For now it just contains another link to the corresponding manual section. We are pretty sure that it is not a perfect solution especially as it looks now. Luckily, share of WebGL-capable browsers tends to grow (86% according to webglstats). For older browsers, it is possible to provide a fallback image which will be shown instead of 3D content. This can be done via URL parameter, or via API, as we did for example in our xmas greeting card.
URL parameter example:
https://www.blend4web.com/apps/webplayer/webplayer.html?load=../../assets/capri/buildings/fountain_elephants/fountain_elephants.json&fallback_image=/static/blend4web/images/demos/fountain/1.jpg
Try to open this link in a browser without WebGL: you will get a 2D image instead of 3D rendering, but it it still better than an ugly error message.
This is what we show to the new year's greeting card WebGL-less visitors:
Hope this helps.
URL parameter example:
https://www.blend4web.com/apps/webplayer/webplayer.html?load=../../assets/capri/buildings/fountain_elephants/fountain_elephants.json&fallback_image=/static/blend4web/images/demos/fountain/1.jpg
Try to open this link in a browser without WebGL: you will get a 2D image instead of 3D rendering, but it it still better than an ugly error message.
This is what we show to the new year's greeting card WebGL-less visitors:
Hope this helps.
12 January 2015 21:22
12 January 2015 21:04
12 January 2015 20:50
You might email Blender developers to this public mailing list, suggesting this feature. They are quite active there and may even reply to those who they like .
12 January 2015 20:45
Just checked that page and it opens for me. Are you using the latest Blend4Web version, that is 14.12? Also, you can override the default no-WebGL screen using fallback_image url parameter.
12 January 2015 20:38
Hi Ryan,
That is rather old version of Safari, and it is quite possible that its WebGL implementation does not support some functionality from the Khronos spec, such as getShaderPrecisionFormat() function. Officially, WebGL is supported since OS X Yosemite, Safari version 8.0. Do you have opportunity to upgrade your browser and/or Snow Leopard? If not you might download Chrome of Firefox.
That is rather old version of Safari, and it is quite possible that its WebGL implementation does not support some functionality from the Khronos spec, such as getShaderPrecisionFormat() function. Officially, WebGL is supported since OS X Yosemite, Safari version 8.0. Do you have opportunity to upgrade your browser and/or Snow Leopard? If not you might download Chrome of Firefox.