Forum

Blend4web Quality Settings (Please help)

17 February 2019 23:59
Yes so the reason I did that was so I could allow my pre loader to work which it does. So I have the .js .html and .css files. (Which I manipulated for the preloader) Now I'm hoping I/we can allow the quality settings to work with the custom pre loader.

The copy project I built and deployed and it runs the pre loader perfect but no settings tab like you previously attached . Just so we clear.

I again really appropriate your time.
18 February 2019 00:51
Yes, so do you only want your custom preloader to work along with the Webplayer, or do you have other custom js content?

I'll have to look into it, but my understanding is that combining custom js and Webplayer is not really provided for by the software, so it will take some workaround; also read this thread.

Can you post or mail your project.zip with the custom preloader?

Also, which B4W version do you use?
18 February 2019 13:37
Im hoping for that work around. And dumb question coming up. How do I check which version of blend4web im working on? lol
18 February 2019 19:58
You can check the version in Blender->User Preferences->Add-Ons. Scroll to Blend4Web and click the little arrow so that the options drop down. There you see the version number.

I have two suggestions to offer:

1. The Webplayer itself is a project under your /projects folder (in older B4W versions it's somewhere else), so it should be possible to change its preloader to your own and recompile it. Then you export your project to HTML and it should have your custom preloader. Then you may want to restore the original webplayer - unless you want every future exported HTML project to have your preloader.

2. But I found that all too complicated, and I don't want to change the webplayer, so I came up with a quick "hack" to put a custom preloader directly and only into an exported HTML, without recompiling anything. This is fast and simple: You look for the two spots in the exported HTML's source code where the preloader div and the preloader callback function are. You set the original preloader div's content to "display:none", add your own content to the div, and then your own code to the callback. If you run the HTML, your preloader will play. (Actually, your preloader AND the standard preloader will both play, but only yours will be visible.)

This works fine. I've attached a demo HTML file. (It's the default cube project exported to HTML.) Look at the source. The changes are
- in line 13 (where I added my CSS)
- in line 1698 (where I added my preloader CODE; the function function X(a) is actually the preloader_callback function; and the passed variable "a" contains the percentage!)
- in line 3380 (where I added my preloader HTML CONTENT). Note how I set the divs "bg" and "logo_cont" to display:none

IMPORTANT: Do NOT delete the original content of the preloader callback and the preloader divs because then the preloader will throw errors and not close properly after running. (This is why I set the original content to display:none, rather than just deleting it.)

You should be able to replicate this for your project.
 
Please register or log in to leave a reply.