3
$\begingroup$

The Blend4Web Planetarium Demo has text labels that expand to show more info when clicked. How can I make these?

$\endgroup$
2
$\begingroup$

These labels are called Anchors.

Here is the section of the Blend4Web Manual that explains about them.

Blend4Web's Anchors - used for tagging and interactive annotation

The object to be given an Anchor must be an Empty, so if you don't have an Empty selected the option will not be available in the menu.

Here's where to find the Anchor settings (for an Empty):

Blend4Web Anchor properties - annotation

The above screen shot was taken from the Planetarium Demo you mentioned. The source files are included in the Blend4Web SDK, so you can see exactly how it was done: /blender/interactivity/solar_system/solar_system_en.blend

$\endgroup$
  • $\begingroup$ how can i load data from an external html file? $\endgroup$ – sharad gupta Jun 5 '16 at 6:17
  • 1
    $\begingroup$ @sharadgupta First, set the Anchor Type to "Custom Element" and for HTML Element ID type the name of your unique DIV ID. Then, for Description Source choose "File". Please familiarize yourself with the three different methods of placing Blend4Web content on websites - because I believe the "Custom Element" type does not work with Method #1. $\endgroup$ – Mentalist Jun 5 '16 at 16:49
  • $\begingroup$ Thanks for the answer but i want to know that is there any way so that when i click on my blender character a pop up window comes in front and displays data and i want to fetch that data from database and then display it? $\endgroup$ – sharad gupta Jun 7 '16 at 6:11
  • 1
    $\begingroup$ @sharadgupta The simple answer is: Yes, you can. Because whatever is in that DIV will be displayed. However, at this point it becomes more of a web development question than a Blender question. You can have that data be generated by a PHP script, or retrieved from an SQL database, for example. $\endgroup$ – Mentalist Jun 13 '16 at 2:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.