You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, June 6th 2018, 12:05pm

Newby question on Textfield

Sorry for my question: I need to realize a window text that appear when the WebVR curson is on an hotspot.
Could someone give me a simple example in order to make some test, I'm not an expert into program code.
Thanks to all.
Luca

2

Wednesday, June 6th 2018, 12:48pm

Hi,

in WebVR only hotspots are visible, so that textfield need to be defined as hotspot.
To keep that hotspot always in the center of the view the setting flying="1.0" can be used (btw - if you want a nice paralax effect you can also use there also smaller values e.g. like flying="0.8").
Then the hotspot should be invisible at the beginning (=> alpha=0.0) and above all other hotspots (=> zorder=99).

That's basically all - here an example:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
<hotspot name="infotext"
         type="text"
         html="Hello I'm a Textfield Hotspot"
         flying="1.0"
         enabled="false"
         zorder="99"
         alpha="0.0"
         distorted="true"
         oversampling="2"
         depth="500"
         scale="0.5"
         ... other textfield settings for styling ...
         />


To make it visible when add onover/onout to the 'other' hotspot that should trigger it and
tween (=animate) there the alpha value to it visible and invisible again:

Source code

1
2
3
4
5
<hotspot ...
         onover="tween(hotspot[infotext].alpha, 1.0);"
         onout="tween(hotspot[infotext].alpha, 0.0);"
         ...
         />


The WebVR cursor works like the mouse and triggers the same events.

Best regards,
Klaus

3

Wednesday, June 6th 2018, 5:29pm

Many thanks for the helpful notes Klaus, I have realize my first text info in VR mode.
http://visual4d.it/VR_nautica/tour.html
if you have again patience I would timidly ask:
1) there is a way in order to have the Vr cursor behind the text info window?
2) and there is the way to have the same winfow aspect between Desktop view and VR mode view?
Thanks a lot again
Luca

4

Wednesday, June 6th 2018, 7:43pm

1) there is a way in order to have the Vr cursor behind the text info window?
The vr-cursor hotspot will get internally zorder=999999999 to be above all other hotspots. That means to place a hotspot above the vr cursor use an even higher value ;-).

2) and there is the way to have the same winfow aspect between Desktop view and VR mode view?
Sorry, not sure what you mean... the hotspot scaling/sizing should be always the same...

5

Thursday, June 7th 2018, 10:18am

Fantastic, I've resolved.
Inserting these parameters :
...
zorder="999999999999"
...
depth.mobile="500"
depth.normal="100"
scale="0.1" />
Now I've the Vr_cursor under the text window and the same text window dimension between destop version and Oculus WebVR version using depth.mobile and depth.normal parameters.
http://demo.visual4d.it/VR_nautica/tour.html
Thanks again Klaus.

6

Saturday, October 13th 2018, 5:16pm

...uhm not well resolved instead!

I use these parameters for my text windows:<hotspot name="p4_parete" type="text" html="data:p4_parete" padding="10" width="250" bgalpha="0.90" bgcolor="0xe5e5e5"
css="font-family: MiloPro; font-size:14px"
bgroundedge="5"
flying="1"
ox="0"
enabled="false"
zorder="999999999999"
alpha="0"
distorted="true"
mipmapping="true"
oversampling="4"
depth.mobile="200"
depth.normal="80"

scale="0.1" />
I have to scale down the text in "mobile" version 'cause on Oculus Go the text appear huge at the same scale of "normal" view.

So I obtain a correct visualization both in desktop view as in Oculus GO or other Web VR visualizations.But when I'm on a mobile devices, before to enter in VR mode, the text windows appear very small, like you can clearly see (on mobile) in that vr tour:http://demo.visual4d.it/VR_terraxcube/to…tscene=scene_p5

Obviously I've missed something.


There's a way to unify the window dimension in all these 3 scenarios?Thanks a lot for help me.
Luca
GIOLETS has attached the following images:
  • DESKTOP.jpg
  • VR MODE.jpg
  • MOBILE.jpg

This post has been edited 5 times, last edit by "GIOLETS" (Oct 13th 2018, 10:44pm)