Forum

SOLVED Augmented Reality: self-styled preloader not working

04 September 2018 20:59
Hello everybody,
so after my last question I manage it to get it work. But I have 4 specific problems, maybe they are related to the "augmented reality-mode" or not (I'm not that used in blend4web to decide or know it, sorry).

So question 3 of 4:
I tried to style an own preloader following this tutorial: https://www.blend4web.com/en/community/article/258/, this worked without any problems. The preloader is shown as should. But the funktion
m_preloader.create_preloader();

wasn't in the js-script I adapted from the solar AR-sample (this line I didn't edited, so the create_preloader function is also not part in the solar AR-sample).
Problem is, that after putting the
m_preloader.create_preloader();

in the js-script, it doesn't connect to the camera any more, after loading the scene successefully the "scene/picture" frozes just showing the empty preloader.
Do I need a next code, that it connects to the camera, or why it works completely correctly without this code-snippet, but not with this function?

To make it easier to follow what I did (wrong), a sample blend4web-folder is attached (recognised marker is the marker of the blend4web-example, to be found here).

Thanks for every input or help

p.s. I decided to made a single request for every question, so its more clear and also easier to find later (if needed), hope this is ok
05 September 2018 12:17
Sorry, I just didn't saw it yesterday, don't know why. The solution is easy: in the AR-Script the line
m_preloader.create_preloader();

isn't under
function load() {

as in the Tutorial, its under
function init_cb(canvas_elem, success) {

By customize the preloader here, the AR-scene is working perfectly. So question solved
 
Please register or log in to leave a reply.