how would this work with for instance view? How to create that dynamicly? Or does it always exist in krpano and I only have to alter the defaults?
set('view.fov', 90);
If I for instance would not use a xml file at all. Give krpano a blanco xml file:
|
Quellcode
|
1
2
3
|
<krpano>
<preview type="grid(CUBE,16,16,512,0xCCCCCC,0xFFFFFF,0x999999);" />
</krpano>
|
and then control the rest with just javascript. Would I able to recreate a complete tour just using calls/gets/sets?
all the hotspots/plugins/attributes I could either parse a json from a server, translate to a addhotspot, addplugin, set(property, value); or parse the data as xml and send in directly to xml (not sure what would be faster yet).
The image would be possible by forcing a loadxml with the image tag in it (created from server). Im just theorycrafting here, what is your opinion, is it possible? Would it be fast enough?
I see some benefits with this method:
- always live data from a database. 10 people at the same time adding hotspots/plugins, adjusting views etc.
- more secure. Viewing xml, is not as simple as view source
- granually build up your pano, build priorities (show all hotspots before loading plugins).
- precalulation done in javascript (a thumbnails posistion in a gallery, can be calculated more easily)
- integrations with other apis (generate hotspots based on facebookfriends, get the latest retail information so you can set a hotspot with the label " sold" on a specific house")
First I did this with just hotspots and plugins. And altering some basic properties like the fov through javascript. But as more I develop javascript, the lesser xml I write. Im wondering where the line is....Should I be concerned of writing to less xml. I havent noticed any major delays yet ( I put 20 hotspots with a blink of an eye, each with all the properties + custom properties).