Sie sind nicht angemeldet.

1

Dienstag, 30. März 2010, 11:10

Howto: Start Multiple scenes with little planet into?

Hi!

I'm pretty new to krPano but already like it a lot and had little success, but at the moment I'm stuck.

So far I created a tour with the "scenes with imagemap" example. It would be great to start the first scene loaded with the "little planet" intro. I've already tried to add the little planet code but failed. As in the little planet example are no scenes and only one pano, I guess it's a little bit more complicated to add the little planet into to a scene?

Maybe someone has an idea to get this to work?

Cheers,
Magenta

2

Dienstag, 30. März 2010, 13:17

Below you can have a look what I got so far.
It starts with moving in into scene 2 as it should, but it does so all time, when switching from scene 1 or 3 back to scene 2.


Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<krpano version="1.0.8" onstart="loadscene(scene2,null,MERGE);" >


	<!-- text styles for startup info -->
	<textstyle name="infostyle" origin="top" edge="top" yoffset="10" textalign="center" background="false" border="false"  fontsize="40" textcolor="0xFFFFFF" bold="false" effect="glow(0xFFFFFF,0.7,4,2);glow(0x000000,1,4,2);dropshadow(3,45,0x000000,2,0.6);" showtime="1.0" fadetime="1.0" />


	<!-- scenes -->


	<!-- first scene/pano -->
	<scene name="scene1" onstart="action(startscene);">

		<action name="startscene">
			showtext([b][i]scene 1[/i][/b], infostyle);
			action(activatespot,scene1, 40);
		</action>
		
		<plugin name="mapmask" url="pano2_mapmask.png" parent="map" enabled="false" onloaded="updatemask();" />
		
		<view hlookat="-15" vlookat="-10" fov="90" />

		<image type="CUBESTRIP">
			<cubestrip url="pano1.jpg" />
		</image>

		</scene>


	<!-- second scene/pano-->
	<scene name="scene2" onstart="action(startscene);">

		<action name="startscene">
			showtext([b][i]scene 2[/i][/b], infostyle);
			action(activatespot,scene2, 120);
		</action>
		
		<plugin name="mapmask" url="pano1_mapmask.png" parent="map" enabled="false" onloaded="updatemask();" />
		
		<view hlookat="-110" vlookat="8" fov="100" />

		<image type="CUBESTRIP">
			<cubestrip url="pano2.jpg" />
		</image>

<!-- START ADDED -->
<view stereographic="true"
		  fisheye="1.0"
		  fov="150"
		  fovmax="150"
		  hlookat="0"
		  vlookat="90"
		  />
		  <display flash10="off" details="14" />		

	<events onloadcomplete="delayedcall(1.0, normalview());" />
	
	<action name="normalview">
		tween(view.hlookat, 180, 1.5, easeInOutQuad );
		tween(view.vlookat, 0,   1.5, easeInOutQuad );
		tween(view.fov, 	70, 1.5, easeInOutQuad );
		tween(view.fisheye, 0.0, 1.5, easeInOutQuad, WAIT);
		set(display.flash10,on);
		showtext(get(data[infotext].content), infostyle)
	</action>
<!-- STOP ADDED -->

	</scene>



	<!-- third scene/pano-->
	<scene name="scene3" onstart="action(startscene);">

		<action name="startscene">
			showtext([b][i]scene 3[/i][/b], infostyle);
			action(activatespot,scene3,190);
		</action>
		
		<plugin name="mapmask" url="pano3_mapmask.png" parent="map" enabled="false" onloaded="updatemask();" />
		
		<view hlookat="-174" vlookat="5" fov="75" />

		<image type="CUBESTRIP">
			<cubestrip url="pano3.jpg" />
		</image>

		</scene>


	<!-- global settings -->
	
	<plugin name="map" url="map.jpg" keep="true"  
	    	align="leftbottom" x="16"  y="16" alpha="0.85" handcursor="false" 
	    	scalechildren="true"
        	width="320" 
        	height="227"
        	onclick="action(closemap);"
        	/>
        	
	<plugin name="scene1" url="mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="50"  y="30" zorder="2" onhover="showtext(Garten);"     	onclick="loadscene(scene1, null, MERGE, BLEND(1));" />
	<plugin name="scene2" url="mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="193" y="60" zorder="2" onhover="showtext(Weinkeller);" 	onclick="loadscene(scene2, null, MERGE, BLEND(1));" />
	<plugin name="scene3" url="mappoint.png" keep="true" parent="map" align="lefttop" edge="center" x="153" y="195" zorder="2" onhover="showtext(Barriquekeller);" onclick="loadscene(scene3, null, MERGE, BLEND(1));" />
	
	<!-- activated hotpot -->
	<plugin name="activespot" url="mappointactive.png" keep="true" align="center" edge="center" visible="false" zorder="3" />
	
	<!-- radar plugin, set heading with "plugin[radar].heading" -->
	<plugin name="radar"
	    	url="%SWFPATH%/plugins/radar.swf"
	    	zorder="1"
	    	keep="true"
	    	heading="0"
	    	parent="map"
	    	mask="mapmask"
	    	align="lefttop"
	    	edge="center"
	    	x="0" y="0"
	    	linecolor="0"
	    	fillcolor="0xFF0000"
	    	scale="2.5"
	    	visible="false"
	    	/>
	
	<!-- update mask for radar -->
	<action name="updatemask">
		set(plugin[radar].mask, mapmask);
	</action>
		    	

	<!-- actions -->
	<action name="closemap">
    	set(onclick,action(openmap););
    	tween(width,64,distance(320,0.5),easeoutquad);
    	tween(height,45,distance(227,0.5),easeoutquad);
	</action>
	
	<action name="openmap">
    	set(onclick,action(closemap););
    	tween(width,320,distance(320,0.5),easeoutquad);
    	tween(height,227,distance(227,0.5),easeoutquad);
	</action>


	<!-- activatespot action, 
	 	- this action has two arguments:
	   	- %1 = the current spot
	   	- %2 = the current radar heading
	-->
	<action name="activatespot">
		set(plugin[activespot].parent, plugin[%1]);
		set(plugin[activespot].visible, true);
		
		copy(plugin[radar].x, plugin[%1].x);
		copy(plugin[radar].y, plugin[%1].y);
		
		set(plugin[radar].visible, true);
		set(plugin[radar].heading, %2);
	</action>
	


</krpano>

3

Mittwoch, 31. März 2010, 09:40

I tried to solve this problem like this, but I guess it's not very smart (from the code-view).

I simply added a "scene 0" which has the the initial little planet view code inside and is loaded on start.
"Scene 1" is exactly the same as 0 (load pano, ...) but not the little planet snippet.

Switching between scenes will load 1, 2 and 3. 0 is just startup.

4

Donnerstag, 1. April 2010, 13:04

Hi,

a other solution would be to use any custom variable (just set/define it to create it),
and check for it on the first call and then change this variable to a other value so that
on the next call notthing will happen,

best regards,
Klaus