Sie sind nicht angemeldet.

1

Dienstag, 26. Juli 2016, 21:19

Adjust canvas size for retina displays

Hey all,

Is it possible to adjust the size of the canvas for retina displays. I've found the `stagescale` in the documentation but this does not affect the size of the actual canvas. I use it like this in the .xml:

Quellcode

1
   <action name="desktopscale" autorun="preinit" devices="all">	mul(stagescale, 2);</action>




The reason for asking is the high CPU usage when viewing the site on a Macbook Pro Retina. I'm using the KRPano Player to play a 360 video.

All help is appreciated,

Cheers,

Plasmic

2

Mittwoch, 27. Juli 2016, 14:21

Hi,

yes - via the display.framebufferscalesetting:
http://krpano.com/docu/xml/#display.framebufferscale

But I wouldn't recommend setting it automatically for all devices, so maybe add it only for Macs with retina screens - e.g.:

Quellcode

1
<display framebufferscale="0.5" if="device.mac AND device.pixelratio GT 1.0" />

Maybe additionally also add 'AND device.safari' if only the Safari browser is the one with the performance problems and the others are fine.

Best regards,
Klaus

3

Mittwoch, 27. Juli 2016, 21:36

Hey Klaus,

Thanks again for the help, this was exactly what i was looking for!

Cheers,

Plasmic

4

Sonntag, 13. November 2016, 18:30

hm, would that be a more general solution?

Quellcode

1
2
3
	<action name="content_start" autorun="preinit">
		set(display.framebufferscale, calc(1/device.pixelratio) );
	</action>


i found this thread, bc we used a retina mac book pro,
which was stuttering on multires images while my mac pro displays everyhing fluidly

ps. device.pixelratio is not mentioned in the documentation, is it?

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (14. November 2016, 09:53)


5

Montag, 14. November 2016, 16:06

i found this thread, bc we used a retina mac book pro,
which was stuttering on multires images while my mac pro displays everyhing fluidly
I would change generally reduce the framebufferscale setting just because of one (or a few) lower-end systems/browsers...
May add a least a Mac and safari check - e.g. if(device.mac AND device.safari, ...);
See also the post above.

ps. device.pixelratio is not mentioned in the documentation, is it?
It is - here:
http://krpano.com/docu/actions/#device.pixelratio

Best regards,
Klaus