You are not logged in.

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

21

Saturday, December 25th 2021, 10:03am

Hi,

My second example is xml only
https://www.virtualtuur.com/krpano/120/h…okto/2/tour.xml

Tuur *thumbsup*

This post has been edited 1 times, last edit by "Tuur" (Dec 25th 2021, 1:28pm)


22

Saturday, December 25th 2021, 10:26am

be aware that when you work with this :

you have SEPARATE krpanos which do NOT share their actions, events, variables, etc

layer[newkrpanolayer].krpano.call("mycustomaction();");
does not work because the 2nd krpano expects mycustomaction to be defined its space,
but you have defined it in the space of the 1st krpano.

to fix this just define "mycustomaction" in the xml loaded by the 2nd krpano
or make a general myactionlibrary.xml and include it for both krpanos

This post has been edited 2 times, last edit by "indexofrefraction" (Dec 25th 2021, 10:39am)


San7

Professional

Posts: 626

Occupation: coding in krpano

  • Send private message

23

Saturday, December 25th 2021, 1:32pm

Hi, I'm also testing with a 3d model, but it doesn't work, it looks like an error in the syntax, but I can't figure out what exactly. *question*

Source code

1
2
3
4
5
6
7
8
9
10
11
12
<action name="showpano_1" type="Javascript"><![CDATA[ 
	var l = krpano.get("layer[test_3]"); 		
	l.krpano.image.reset(); 
	l.krpano.image.sphere = {url:'idol.jpg'}; 
	l.krpano.image.depthmap = {url:'idol.obj'}; 
		
	l.krpano.image.depthmap.rendermode = '3dmodel';
		
	l.krpano.view.oz = 1000;		
	l.krpano.actions.loadpanoimage(); 
 ]]>
</action>

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

24

Saturday, December 25th 2021, 1:39pm

mmm...
something is strange indeed.

I change all previous links and also made a 3rd
https://www.virtualtuur.com/krpano/120/h…layer_lookto/3/

*g*

many ideas to try and play with..

but the problem I find, indeed, is:
xml:
https://www.virtualtuur.com/krpano/120/h…okto/3/tour.xml
https://www.virtualtuur.com/krpano/120/h…rpanos/tour.xml
https://www.virtualtuur.com/krpano/120/h…kto/3/stuff.xml

I want to execute the 'dosomething' or the 'dosomethingelse' action after the last tween is done:

Source code

1
2
3
					delayedcall(0.1,
						layer[newkrpanolayer].krpano.actions.tween("view.camroll", -360,2,easeoubounce);
					);


I tried a lot but I can't make something happen/trigger after 'easeoutbounce' ..
like
layer[newkrpanolayer].krpano.actions.tween("view.camroll", -360,2,easeoubounce,dosomething);
tried all things I could imagine here..
function
layer[newkrpanolayer]
apostrophe catastrophe..
no success..
a syntax thing perhaps..

but Christmas first.
If anyone can advice here..

Tuur *thumbsup*

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

25

Saturday, December 25th 2021, 2:21pm

@san7
Perhaps take the brackets after loadpanoimage away?

Tuur *thumbsup*

San7

Professional

Posts: 626

Occupation: coding in krpano

  • Send private message

26

Saturday, December 25th 2021, 3:00pm

@san7
Perhaps take the brackets after loadpanoimage away?
No, it does not work, it seems the reason is different.
But this option works - example

Source code

1
2
3
<layer name="t_iframe" type="krpano" keep="true" align="center" bgalpha="0.3" bgcolor="0x007700" bgshadow="0 0 20 0 1.0"
width="500" height="500" onloaded="krpano.actions.loadpano('test.xml');" 
/>

Tuur

Sage

Posts: 3,839

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

27

Saturday, December 25th 2021, 3:15pm

@San7
yes I also have something like that as test example..

on phone now..
perhaps the depth map needs more:
scale="100" subdiv="100" textured="true" center="0,0,0" waitforload="true" background="none" enabled="true" encoding="gray" cull="front"

or at least some of them..

and perhaps also use the

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
		l.onloaded = function()
		{
			if (panotype == "xml")
			{
				l.krpano.actions.loadpano(url);
			}
			else
			{
				l.krpano.image.reset();
				l.krpano.image[panotype] = {url:url};
				l.krpano.actions.loadpanoimage();
				l.krpano.actions.lookat(18,10,40);
				//l.krpano.actions.lookto(100,10,40);
			}
		}


*question*

Have to go.. family..
Back on desktop after tomorrow..

Tuur *thumbsup*

San7

Professional

Posts: 626

Occupation: coding in krpano

  • Send private message

28

Saturday, December 25th 2021, 3:22pm

Merry Christmas everyone !!! *thumbsup* *thumbsup* *thumbsup*

Fernando

Intermediate

  • "Fernando" started this thread

Posts: 330

Location: Habana, Cuba

Occupation: Architect, Photographer.

  • Send private message

29

Saturday, December 25th 2021, 6:50pm

All solved for me

Edit: From beginning my questions was solved from the Klaus advises. Little error in debugmode configuration, confused me.

Happy Christmas holidays!!!

This post has been edited 3 times, last edit by "Fernando" (Dec 27th 2021, 4:24am)