Sie sind nicht angemeldet.

  • »jeromebg« ist der Autor dieses Themas

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

1

Mittwoch, 17. Januar 2018, 12:32

stagewidth stageheight mobilescale

Hi, trying to figure out what stagewidth and stageheight returns depending on mobilescale.
If mobilescale is not set (so 0.5 by default) then stagewidth & stageheight returns half the real screen width and height and stagescale is 0.5 (tested on my S7 I have stagewidth= 720 instead of the 1440 real resolution).
If mobilescale is set to 1 (default setting since ?) then stagewidth & stageheight returns quater the real screen width and height and stagescale is 1 (tested on my S7 I have stagewidth= 360 instead of the 1440 real resolution).

Can someone explains me why ?

You can test on your mobile device :
with no mobilescale setting
with mobilescale:1

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Mittwoch, 17. Januar 2018, 13:24

Hi Jerome!

I made a quick test on my Redmi Note 4 and a standard Krpano tour returns stagewidth == 640. Then I remembered about pixelratio readonly variable (see here https://krpano.com/docu/actions/#device.pixelratio). Pixelratio of my phone is 3 and 3 * 640 == 1920 which is the real resolution of my phone.

For your device it seems that pixelratio is 4 (360 * 4 == 1440).
Regards,

Alexey

  • »jeromebg« ist der Autor dieses Themas

Beiträge: 1 120

Wohnort: Angers - France

Beruf: 360 experiences creator

  • Nachricht senden

3

Mittwoch, 17. Januar 2018, 13:59

Hi Jerome!

I made a quick test on my Redmi Note 4 and a standard Krpano tour returns stagewidth == 640. Then I remembered about pixelratio readonly variable (see here https://krpano.com/docu/actions/#device.pixelratio). Pixelratio of my phone is 3 and 3 * 640 == 1920 which is the real resolution of my phone.

For your device it seems that pixelratio is 4 (360 * 4 == 1440).


THX !
so to know the real resolution we just need to do realdevicewidth="calc(device.pixelration * stagescale * stagewidth)" !