Page 1 of 1

Player Width Logic Block

Posted: Fri Nov 18, 2022 1:41 pm
by Handers360
Hi,

I would like to make a skin that is suitable for different devices.

My idea is to build 3 containers:
_container-1 for desktop (1024px and above)
_container-2 for tablets (between 768px and 980px and above)
_container-3 for mobile (between 320px and 768px and above)

Now I want to create a logic block trigger that looks at the screen-size and then shows/call the required container.

My questions;
Is the posible?
Does anyone have an example or could help me further?

Kind regards,

Harry

Re: Player Width Logic Block

Posted: Sat Nov 19, 2022 7:58 pm
by Hopki
Hi Harry,
It depends on which version of Pano2VR you are using, but with Pano2VR 7 you can set up a mobile logic block.
Take a look at the packaged skins that come with Pano2VR 7, in the variable list you will see a variable called resp_phone, this has a variable logic block that states that if screen width =< 1024 it will be true.
So you can, scale, show and hide elements using this variable.
Regards,

Re: Player Width Logic Block

Posted: Sun Nov 20, 2022 10:42 am
by Handers360
Thank you.

I think I understand :)

Let's have a pano2VR day today :)


Have a nice day.

Harry