Sie sind nicht angemeldet.

1

Mittwoch, 10. August 2011, 22:15

FovType converter

Hi there

Here's a small plugin I needed to make for another project, in case it's useful for someone. It converts between FovTypes. I'm including the final SWF and also the source.

Usage:
<plugin name="foo" url="FovConversion.swf"/>
plugin[foo].convert(var, toFovType, fromFov*, fromFovType*, screenWidth*, screenHeight*)

var: KRPano variable where to store the result
toFovType: convert to this type (can be vfov,hfov,dfov or mfov)
fromFov: fov value to convert (defaults to view.fov)
fromFovType: fov type from which to convert (defaults to view.fovtype)
screenWidth: width of screen to use for conversion (defaults to stagewidth)
screenHeight: width of screen to use for conversion (defaults to stageheight)
»emediquei« hat folgende Datei angehängt:
PanoTag: Facebook tagging for krpano

KRPano development and more: http://www.digisfera.pt/en/development

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

2

Donnerstag, 11. August 2011, 01:57

Can you provide a little description of why one would need to convert fovtype?
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

3

Donnerstag, 11. August 2011, 02:09

Well, in my case, I'm creating a plugin where that zooms into a certain area, and I want to be able to use the plugin in every panorama, no matter the fov type.

Another example is: imagine you want to zoom into a certain point in a panorama and want to be sure that 20º in the vertical axis will be visible. If you are using VFOV, you can just zoom to fov=20 or higher. But if you are using, for instance, MFOV there's no straightforward way to do this. With this plugin you could do something like:

Quellcode

1
2
plugin[foo].convert( tmp, get(view.fovtype), 20, vfov);
zoomto( tmp );
PanoTag: Facebook tagging for krpano

KRPano development and more: http://www.digisfera.pt/en/development

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

4

Donnerstag, 11. August 2011, 02:35

I see. I've not messed with fovtype before. Is there a particular reason you can't XML it completely? For js compatibly.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

5

Donnerstag, 11. August 2011, 11:12

Yup, with the latest beta (1.8.0.14) you can, since it provides the tan() and atan() functions. However, with previous versions it is not possible.
PanoTag: Facebook tagging for krpano

KRPano development and more: http://www.digisfera.pt/en/development