Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

61

Montag, 6. Juni 2011, 12:33

Hi Klaus

Can we have somme documentation for this

Zitat

* new actions for looping / repeating actions:
- for(startaction, condition, nextaction, loopaction)
- asyncfor(startaction, condition, nextaction, loopaction)
- loop(condition, loopaction)
- asyncloop(condition, loopaction)


Thanks a lot

62

Dienstag, 7. Juni 2011, 22:05

Hi,
Can we have somme documentation for this

Quoted
* new actions for looping / repeating actions:
- for(startaction, condition, nextaction, loopaction)
- asyncfor(startaction, condition, nextaction, loopaction)
- loop(condition, loopaction)
- asyncloop(condition, loopaction)

okay, here a try:

Quellcode

1
for(startaction, condition, nextaction, loopaction)

  • startaction
    the action code that will be exectued before the loop starts
    e.g. typically set the a index or count variable here,
  • condition
    the condition of as long as the loop should be repeated
    works like the if condition
  • nextaction
    the action code that will be executed after the inner loop action code
  • loopaction
    the inner looping action code
e.g.

Quellcode

1
for(set(i,0), i LT 10, inc(i), trace(i));



Quellcode

1
asyncfor(startaction, condition, nextaction, loopaction)

the same like the for action, but with one difference - the following actions will not wait until the for is done, they will be executed directly after the call, the loopaction itself will be executed once per frame as long as the condition is true

the loop and asyncloop action are similar to the for and asyncfor just without the startaction and nextaction,

best regards,
Klaus

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

64

Mittwoch, 8. Juni 2011, 19:22

Wow Klaus! Thanks! The for loops will save alot of headaches in future projects!

Im still not sure what asyncfor does though...

what loop would fit if you try to do a loop over an array?
something like this?

Quellcode

1
2
3
4
5
6
7
8
9
10
11
<pictures>
   <pic name="p1" url="image.jpg" />
</picture>

<action name="add_pictures">
  for(set(i,0), i LT pictures.pic.count, add_pic(i));
</action>
<action name="add_pic">
 addplugin(pictures.pic[%1].name);
 set(plugin[pictures.pic[%1]].url, pictures.pic[%1].url);
</action>


or should i use the asyncfor?

65

Mittwoch, 8. Juni 2011, 19:29

The difference between "for" and "asyncfor" is that in a "for" loop, krpano first executes all iterations of the loop before continuing with the rest of the actions, whereas when you use "asyncfor" instead, krpano only does one iteration at a time, all the while executing other actions.

So "for" blocks execution of all other actions and events until its done, while "asyncfor" does not. You would use "for" for smaller loops, where it is important that every iteration gets executed before krpano continues. On the other hand you would use "asyncfor" for relatively long loops that would otherwise lock up krpano for too long.

In your simple case, either would work.

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

66

Mittwoch, 8. Juni 2011, 20:05

I tried something out quickly:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
	<picture>
		<pic name="test_1" />
		<pic name="test_2" />
	</picture>
	<action name="add_menu_items">
		for(set(i,0), i LT picture.pic.count, inc(i), test(i));
	</action>
	<action name="test">
		txtadd(test_name, 'plugin_', get(picture.pic[%1].name));	
		set(testvar, %1);
		trace(%1, get(picture.pic[%1].name), get(test_name)); <!-- not working -->
		trace(get(picture.pic[0].name)); <!-- working -->
		trace(get(picture.pic[get(testvar)].name)); <!-- not working -->
	</action>


why is the 1st and 3rd not working in the test action?

67

Mittwoch, 8. Juni 2011, 23:16

Hi,
why is the 1st and 3rd not working in the test action?

the call:

Quellcode

1
test(i)

will just pass 'i' not the value of the 'i' variable,

to pass the value of 'i' use:

Quellcode

1
test(get(i))

then it will work,

best regards,
Klaus

Zephyr

Profi

Beiträge: 1 003

Wohnort: Netherlands

Beruf: Web developer

  • Nachricht senden

68

Donnerstag, 9. Juni 2011, 11:09

Ok, and I reckon that in your example, trace already has something build in to convert 1 to get(i) automaticly, and if i doesnt exists it just traces i?

Quellcode

1
for(set(i,0), i LT 10, inc(i), trace(i));


can't that be the default behaviour of actions too? or is this because of some backwards compatibility?

69

Dienstag, 14. Juni 2011, 13:49

Hi,

Zitat

trace already has something build in to convert 1 to get(i) automaticly, and if i doesnt exists it just traces i?
right, some actions are first checking if there is a variable with that name and if then they use the content of the variable, and if not then they just use the name of the variable,

but when an action have that behavior ot should be documented here in the actions documentation:
http://krpano.com/docu/actions/#detailsactions


can't that be the default behaviour of actions too? or is this because of some backwards compatibility?
some actions have that behavior because they exists before the get() was introduced, and because it makes the usage easier in some situations,

doing that (passing the value of the variable) always by default would be not possible, because then it would not be possible to pass the name of variable anymore,

best regards,
Klaus

esys

Fortgeschrittener

Beiträge: 267

Wohnort: Balazé France

Beruf: photographer

  • Nachricht senden

70

Donnerstag, 30. Juni 2011, 18:02

Krpanoiphone.js version 1.0.8.14 with 1.0.8.12 template ?

Hi,

I've built a tour for all devices with the 1.0.8.12 template. Iphone 4 loads tablets tiles.

So, i've uploaded the 1.0.8.14 release candidate 2 viewer to get the krpanoiphone.js which increased iPod4 stability by limiting and automatically downsampling the max. cubesize to 640x640. Then i replaced the old krpanoiphone.js and .swf (version.12) with the new ones.
I built my tour once again with the .12 Vtour template and the new .js. Uploaded only the .js .swf and .html on the server (not the xml). I've just tried, and it seems that iphone still to get the tablet tiles..!?
Link for iphone or smartphone

I've made it wrong ?

Thanks. *smile*
Steph
Steph

71

Samstag, 2. Juli 2011, 11:31

Hi,
I've made it wrong ?
the smaller <mobile> images were used only on iPhone 3 and iPod 2 and 3,
the iPhone 4, iPad, and iPod 4 and Android are using the <tablet> images,

best regards,
Klaus

72

Montag, 4. Juli 2011, 16:51

I think I found a bug. On version 1.8.0.14-rc3, none of the "InOut" tweens seem to be easing out, only easing in. Let me know if you can't reproduce this and I'll upload an example.

Thanks
PanoTag: Facebook tagging for krpano

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

73

Montag, 4. Juli 2011, 17:20

Oops, just read on the release notes that they were removed on purpose. Is there some way to get them back? I use them a lot for "non-blocking" camera control
PanoTag: Facebook tagging for krpano

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

74

Montag, 4. Juli 2011, 18:09

Hi emediquei,

Yes...

Zitat

krpano 1.0.8.14 viewer release candidate 3 (2011-05-20)

Changes/Fixes (compared to the last pre-release from 2011-04-11)

# krpano.swf & krpanoiphone.js

* new actions for looping / repeating actions:
- for(startaction, condition, nextaction, loopaction)
- asyncfor(startaction, condition, nextaction, loopaction)
- loop(condition, loopaction)
- asyncloop(condition, loopaction)

* new Math object for mathematical constants and actions:
- Math.PI
- Math.abs(var) or Math.abs(result,v)
- Math.acos(var) or Math.acos(result,v)
- Math.asin(var) or Math.asin(result,v)
- Math.atan(var) or Math.atan(result,v)
- Math.atan2(result,a,b)
- Math.ceil(var) or Math.ceil(result,v)
- Math.cos(var) or Math.cos(result,v)
- Math.exp(var) or Math.exp(result,v)
- Math.floor(var) or Math.floor(result,v)
- Math.log(var) or Math.log(result,v)
- Math.max(var,var2) or Math.max(result,...vars)
- Math.min(var,var2) or Math.min(result,...vars)
- Math.pow(var,var2) or Math.pow(result,v1,v2)
- Math.round(var) or Math.round(result,v)
- Math.sin(var) or Math.sin(result,v)
- Math.sqrt(var) or Math.sqrt(result,v)
- Math.tan(var) or Math.tan(result,v)

* Removing of all InOut and OutIn tweentypes - they were typically not
needed and the removing saves a lot of swf and js filesize.
I feel that is for let the player as small as posible *huh* ... Surely due to the adding of the looping actions and maths features...
That makes me think that if it could not be more adequate making the player light and the enhanced features as external files (included files) instead of making an compromise between features and lightweight... Don't you think so *rolleyes* ?

SAlut.

75

Montag, 4. Juli 2011, 21:48

Hi,
Oops, just read on the release notes that they were removed on purpose. Is there some way to get them back? I use them a lot for "non-blocking" camera control
really?
sorry, I really thought were not used (especially the OutIn tweens)...
which InOut or OutIn tween types were you using? (and in which situations? I would be really interested, I have done a lot of test and often these tweentypes look a bit strange or unsuitable)

about getting back - yes, that would be possible but that would increase the swf/js size of course (around 2-3kb each) and I want to avoid wasting so much space for almost not used functionality,

maybe I could just add/return a few from them (many of them are very similar),
e.g. what about just keeping "easeInOutCubic" and "easeInOutBack" (and mapping all other InOut tweens to "easeInOutCubic" by default),
I think these two were the best ones of all the InOut and OutIn tweens...

an other or additional way would be to externalize them as plugin - the tween calls itself wouldn't need to be changed for that, only the plugin must be loaded once,
e.g. via:

Quellcode

1
<plugin url="moretweentypes.swf" alturl="moretweentypes.js" preload="true" />


That makes me think that if it could not be more adequate making the player light and the enhanced features as external files (included files) instead of making an compromise between features and lightweight... Don't you think so *rolleyes* ?
right, therefore there are the plugins to extend the viewer with additional features that were not core features, but here I really thought these tween types were not really used and removing them could save a lot of space, but I want to keep the viewer also as upward-compatible as possible of course, so maybe in the next version they or at least some of the removed tweens will be back...

best regards,
Klaus

76

Dienstag, 5. Juli 2011, 14:23

I agree that these tweens are not very used. I've also only used InOutQuad for custom camera control. Here are a couple of examples:

http://demo.digisfera.pt/segourmet/
On this website made in krpano, the user can click links on the "Produtos" section. I wanted to allow the user to click while the camera is moving, and since "lookto" blocks user control, tweening "hlookat", "vlookat" and "fov" seemed to be the best solution. easeInOutQuad allows the movement to be smooth both in the beginning and the end.

http://www.digisfera.pt/maior-fotografia-lisboa
In this gigapixel there is a custom movement: the camera zooms out and then zooms in. You can see it by clicking on a couple of thumbnails. Once again, InOutQuad allows for a smooth beginning and end of movement.

I tried replacing Quad by Cubic in both cases, and Quad resulted in a more adequate acceleration. So, I think the best solution is what you sugested:

- Make all tween types available in a separate plugin
- Just keep 1 or 2 of these types in the "core", and map all others to them. Probably print a warning whenever the mapping is needed.

A more powerful lookto() would also be a solution and a nice feature. I think it would be cool to have a new lookto() function which provided:
1. non-blocking mode
2. ability to set initial and final speed (to create more complex movements with consecutive calls to the function)
3. a "donecall" parameter, like in tween() (as a way to support consecutive calls to the non-blocking function)
4. a way to define our own motion type functions

Thanks a lot!
PanoTag: Facebook tagging for krpano

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

77

Donnerstag, 14. Juli 2011, 14:27

Hi,

just a quick update note:
- the easeInOutQuad will be back in the next version
- there will be 'moretweentypes' plugins for Flash and Javascript for additional tweening types
- it will be possible to use the tweentypes also in the lookto actions
- and there will be an optional non-blocking lookto with a donecall
- and some other features too...


best regards,
Klaus

78

Sonntag, 17. Juli 2011, 22:25

Thanks Klaus! Can't wait for it :)
PanoTag: Facebook tagging for krpano

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

79

Mittwoch, 3. August 2011, 18:35

combobox plugin.js version issue?

I use the 2011-04-11-krpanotools-1.0.8.14-win beta version to create a vtour in combination with the 2011-05-20-krpano10814-viewer-rc3 beta version. This is working fine for the pc, but when I try to use the combobox for ipad, I get an error message: combobox plugin - too old krpano version (min. version 1.0.8.14 / build 2011-05-19)

<krpano version="1.0.8.14" onstart="startup();">
<!-- vtour.xml template krpano tools version 1.0.8.14 -->

How can this be? Am I confusing something?

Michael

80

Mittwoch, 3. August 2011, 18:55

Hi,

when using older tools with a new viewer version, then it would be necessary to update all viewer files in the tools folder,
this are these files:
- krpano.swf
- krpanoiphone.js
- swfkrpano.js

best regards,
Klaus