Forum

[SOLVED] Create Web UI to control Blend4Web

18 April 2016 18:29
Is is possible to use html buttons to control the blen4web scene?
For example, I want to show different versions of a product. When button 1 is clicked, product 1 shows. When button 2 is clicked, product 1 hides and product 2 appears… and so on.

I can configure this from within the b4w presentation 3d window but I want to use controls on the web page instead.

If we get a web designer to make a full webpage, is it possible to use part of that design (buttons) to control the blend4web presentation?
I have attached a crude drawing to explain the functionality I have described.

Thanks

Danny Austin,Technical Manager
PIX Set Visions
18 April 2016 18:36
Hi Danny,

Please take a look at this demo & tutorials
The UI buttons there are actually HTML elements.

See also this tutorial on web page integration (you'll need method 3).

Hope this helps!
The Founder | Twitter | Facebook | Linkedin
18 April 2016 18:53
Fantastic!! I'd been looking at this particular demo but hadn't realized the controls were in HTML.
Great information.

Thanks Yuri!

Danny
Danny Austin,Technical Manager
PIX Set Visions
01 July 2016 13:40
Hi Yuri,

I'm still trying to achieve this HTML integration for Blend4Web. My main issue is that I have very little web programming experience.
So far I have tracked down the buttons in the code but I can't figure out how the send a message to b4w. I know it's a big ask but is there a step by step guide on how to do this?

For my example I want to use a HTML button to change the material of an object. I have achieved this within the b4w interface using the logic editor currently.

Many Thanks
Danny
Danny Austin,Technical Manager
PIX Set Visions
03 July 2016 23:28
Hello. There are différent ways to do that. At the moment if you want to use logici tree you could use a use entry point js function. I use one in the project in host on my github. Check out my last topic in the forum
 
Please register or log in to leave a reply.