I am in the process of evaluating KRPano to create an HTML5 version of a very large project (hundreds of nodes, viewable at gcpano.org) that already has a Flash version (based at its core on PanoSalado) that I intend to continue to use. I intend to make an HTML5 version, based on KRPano, available only when Flash is not available, primarily for iOS. Thus all my testing thus far has been in the HTML5 viewer.
I need to figure out the best way to maintain global state within KRPano. The application, for example, lets the user control whether all hotspots are displayed or not, and this setting is maintained as the user moves from node to node. I first tried simply declaring variables within a root XML file, but it seems that the variables are always lost whenever a new panorama is loaded (regardless of KEEP settings). The solution I then came up with, and am currently using, was to create a very simple non-graphical plugin where I simply register a set of attributes to maintain the required global state, and then get and set theses attributes from and to the plugin from within KRPano scripts located in .xml files for particular nodes.
Now that also has problems. In my testing so far, I must use the KEEPPLUGINS flag whenever loading new scenes and panoramas in order to keep my little plugin alive and its state maintained, but a side effect of the KEEPPLUGINS flag is that layers tied to the textfield plugin stick around as well, even if keep="false" is specified on the layer. I've found an ugly workaround to that as well, but I'm not happy with it.
So my core question is - how to best maintain global state? Is there something better than the non-graphical plugin solution I have come up with? Also am I missing something on the use of the KEEP flags and attributes for plugins?