Sie sind nicht angemeldet.

nautama

Schüler

  • »nautama« ist der Autor dieses Themas

Beiträge: 82

Wohnort: La Paz, Baja California Sur, México

Beruf: KRpano programmer at www.imagen360.com

  • Nachricht senden

1

Dienstag, 12. August 2014, 20:55

How can I change an attribute from another scene that is not the current one?

For example I want to

Quellcode

1
 trace(scene[notthecurrentscene].image.fov)
, is that possible?

I've tried several ways like

Quellcode

1
2
3
4
5
trace(get(scene[notthecurrentscene].image.fov));

trace(scene[notthecurrentscene].image.fov);

trace(scene[notthecurrentscene].fov);


Moreover, I would like to change it's value without having to load the scene like

Quellcode

1
set(scene[notthecurrentscene].image.fov,100);


¿IS THIS EVEN POSSIBLE IN KRPANO?

Thanks!

Alberto.

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Dienstag, 12. August 2014, 21:32

Well, first observation - it's "view.fov", not "image.fov". And my guess to your question is "no". Because only "view.fov" of the currently loaded scene is parsed and available. You can trace(view.fov); of the currently loaded scene only. However, let's see what Klaus will say - maybe there's some kind of a trick there. *tongue*
Regards,

Alexey

nautama

Schüler

  • »nautama« ist der Autor dieses Themas

Beiträge: 82

Wohnort: La Paz, Baja California Sur, México

Beruf: KRpano programmer at www.imagen360.com

  • Nachricht senden

3

Mittwoch, 13. August 2014, 18:01

My mistake!, you are so right, view.fov. Hopefully there is a way and hopefully he'll reply.

Thanks!

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

4

Mittwoch, 13. August 2014, 18:21

But here are some thoughts from me *tongue*

I made a quick test and it seems to work. Here we go with trying to alter the fov setting of another (not currently loaded) scene.

Step one. Add

Quellcode

1
target_fov="70" 
inside

Quellcode

1
<scene name="your_scene" .... >
Must look like this:

Quellcode

1
<scene name="scene_8651" title="Бассейн и игровая площадка для детей" target_fov="70" thumburl="panos/8651.tiles/thumb.jpg" >  


now if you trace(scene[ scene_8651].target_fov); you will receive a trace.

And now try this code in some action:

Quellcode

1
2
3
showlog();trace(scene[scene_8651].target_fov);set(scene[scene_8651].target_fov,90);
		loadscene(scene_8651, null, MERGE);copy(view.fov, scene[scene_8651].target_fov);
		trace(view.fov);


So, we trace original value of "target_fov" (70), then set it to 90, then load scene and set view.fov to 90 and then trace that, yeeeessss, its 90.

this may be a direction to go ;-)
Regards,

Alexey

nautama

Schüler

  • »nautama« ist der Autor dieses Themas

Beiträge: 82

Wohnort: La Paz, Baja California Sur, México

Beruf: KRpano programmer at www.imagen360.com

  • Nachricht senden

5

Mittwoch, 13. August 2014, 22:03

That's a pretty smart solution!, hehe, although the real situation in my case is that I want to put a condition in the startup action which makes all the multires attributes (inside all the tour scenes) go FALSE in case the device is old and not powerful enough to support it, something like:

Quellcode

1
If(device.iosversion LT 7.0, set(scene[0].image.multires,false););


of course it would have to be done through a FOR action i think, or Async FOR (I'm not too clear on the difference), so in a loop it sets all multires attributes to false, but the first thing I need is a way to call externally the multires attribute inside each of the scenes.

Your solution might come in handy, I have a feeling it will work but still would be interesting and useful to know if there's a way to call attributes so far apart.

Thanks, Alexey.

Alberto.

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

6

Donnerstag, 14. August 2014, 10:09

As far as I know Krpano uses "mobile" images as fallback on the devices which don't support multires. I've never tested this case though...
Regards,

Alexey

7

Donnerstag, 14. August 2014, 10:56

Hi,

iOS 5.1 and iOS 6 should work also fine with multires, only iOS 4 can be problematic, but that's not supported anyway anymore.

Android stock browsers are way more problematic here.
Btw - the next krpano version will have several improvements here - Androidstock browsers will not try to use multires by default and there will be several additional possibilities to control device specific settings.

A note to the initial question - the content inside a <scene> element will not be loaded/parsed until the scene itself gets loaded. This has design and performance reasons. But if required, you can try manipulating the scene content by editing the scene[NAME].content variable - e.g. by a text search and replace with the txtreplace action.

Best regards,
Klaus

nautama

Schüler

  • »nautama« ist der Autor dieses Themas

Beiträge: 82

Wohnort: La Paz, Baja California Sur, México

Beruf: KRpano programmer at www.imagen360.com

  • Nachricht senden

8

Donnerstag, 14. August 2014, 18:43

I'm trying to disable it as an attempt for our demo to work smoothly on some devices, for the time being it crashes on ipod 4 (ios 6.1) and sometimes on a iphone 4S (ios 7), we thought that it could work, otherwise we are not sure why is this happening, maybe we are over using a plugin or something. I would be so thankful if you could give it a try and perhaps you will find what's making it so slow (or crashy). Thanks to both!

The demo link is www.demo.imagen360.com

9

Donnerstag, 14. August 2014, 21:18

Hi,

the iPod devices are generally slower and more instable than their iPhone counterparts and the iPhone 4S is strangely also more instable than the normal iPhone 4.

In the next krpano version the default limitations (hardwarelimit and maxmem) will be reduced for iPhone 4* devices to provide more stability for the 4S (detecting if 4 or 4S is not possible).

For the moment you could try adding these code:

Quellcode

1
2
<display hardwarelimit="800" devices="iphone" />
<memory maxmem="40" devices="iphone" />
But this would cover the iPhone 5 and 5S too, where these settings aren't necessary.

Best regards,
Klaus

nautama

Schüler

  • »nautama« ist der Autor dieses Themas

Beiträge: 82

Wohnort: La Paz, Baja California Sur, México

Beruf: KRpano programmer at www.imagen360.com

  • Nachricht senden

10

Mittwoch, 20. August 2014, 19:52

Thank you very much, I'll try to implement your suggestions and get back to you. Again, thank you very mucho!

Alberto.