Debian Codegraph @

Models/Volcanoes/Kilauea/puu_oo.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <!-- Lava fountain and sulfur smoke at the Puu Oo crater of Kilauea -->
4
5
6 <PropertyList>
7
8 <!--<nasal>
9 <load><![CDATA[
10
11 var puu_oo_loop_flag = 1;
12
13 var puu_oo_loop = func (strength, tgt_strength) {
14
15 if (puu_oo_loop_flag == 0)
16 {
17 print("Ending Puu Oo eruption simulation.");
18 return;
19 }
20
21 if (rand() > 0.99) {tgt_strength = 100.0;}
22
23 tgt_strength = tgt_strength - 0.5;
24 if (tgt_strength < 40.0) {tgt_strength = 40.0;}
25
26 var step = 5.0;
27
28 if (math.abs(strength - tgt_strength) < 5.0) {step = 1.0;}
29
30 if (strength < tgt_strength)
31 {strength += step;}
32 else
33 {strength -= step;}
34
35 setprop("/environment/volcanoes/kilauea/puu-oo-eruption-strength", strength);
36 setprop("/environment/volcanoes/kilauea/puu-oo-eruption-quantity", int(0.5*strength));
37
38
39 settimer(func {puu_oo_loop(strength, tgt_strength);}, 0.1);
40 }
41
42 puu_oo_state_manager = func {
43
44 print ("Puu Oo state manager");
45 var state = getprop("/environment/volcanoes/kilauea/puu-oo-activity");
46
47 if (state == 3)
48 {
49 print("Starting Puu Oo eruption simulation.");
50 puu_oo_loop_flag = 1;
51 puu_oo_loop(50.0, 50.0);
52 }
53 else
54 {
55 puu_oo_loop_flag = 0;
56 }
57
58 }
59
60 # call state manager once to get correct autosaved behavior, otherwise use listener
61
62 puu_oo_state_manager();
63
64 setlistener("/environment/volcanoes/kilauea/puu-oo-activity", puu_oo_state_manager);
65
66
67
68 ]]>
69 </load>
70
71 <unload><![CDATA[
72 print("Unloading Puu Oo volcano management.");
73 pu_oo_loop_flag = 0;
74 ]]>
75 </unload>
76
77 </nasal>-->
78
79 <path>kilauea.ac</path>
80 <offsets>
81 <x-m>0.00</x-m>
82 <y-m>0.00</y-m>
83 <z-m>8.00</z-m>
84 </offsets>
85
86 <animation>
87 <type>select</type>
88 <object-name>Lava</object-name>
89 <condition>
90 <greater-than>
91 <property>/environment/volcanoes/kilauea/puu-oo-activity</property>
92 <value>0</value>
93 </greater-than>
94 </condition>
95 </animation>
96
97 <effect>
98 <object-name>Lava</object-name>
99 <inherits-from>Effects/model-combined-deferred</inherits-from>
100 </effect>
101
102 <animation>
103 <type>scale</type>
104 <object-name>Lava</object-name>
105 <x-offset>120.0</x-offset>
106 <y-offset>120.0</y-offset>
107 <z-offset>2.0</z-offset>
108 </animation>
109
110 <animation>
111 <type>material</type>
112 <object-name>Lava</object-name>
113 <emission>
114 <red> 0.4 </red>
115 <green> 0.32 </green>
116 <blue> 0.32 </blue>
117 </emission>
118 </animation>
119
120 <model>
121 <path>puu_oo_smoke.xml</path>
122 <offsets>
123 <x-m>-20.0</x-m>
124 <y-m>20.0</y-m>
125 <z-m>140.0</z-m>
126 <heading-deg>0</heading-deg>
127 </offsets>
128 <condition>
129 <greater-than>
130 <property>/environment/volcanoes/kilauea/puu-oo-activity</property>
131 <value>0</value>
132 </greater-than>
133 </condition>
134 </model>
135
136 <model>
137 <path>puu_oo_lava_fountain.xml</path>
138 <offsets>
139 <x-m>0.0</x-m>
140 <y-m>0.0</y-m>
141 <z-m>0.0</z-m>
142 <heading-deg>0</heading-deg>
143 </offsets>
144 <condition>
145 <greater-than>
146 <property>/environment/volcanoes/kilauea/puu-oo-activity</property>
147 <value>2</value>
148 </greater-than>
149 </condition>
150 </model>
151
152 <model>
153 <path>puu_oo_lava_fountain2.xml</path>
154 <offsets>
155 <x-m>0.0</x-m>
156 <y-m>0.0</y-m>
157 <z-m>0.0</z-m>
158 <heading-deg>0</heading-deg>
159 </offsets>
160 <condition>
161 <greater-than>
162 <property>/environment/volcanoes/kilauea/puu-oo-activity</property>
163 <value>2</value>
164 </greater-than>
165 </condition>
166 </model>
167
168 <model>
169 <path>kilauea_lava_fountain.xml</path>
170 <offsets>
171 <x-m>30.0</x-m>
172 <y-m>-20.0</y-m>
173 <z-m>0.0</z-m>
174 <heading-deg>0</heading-deg>
175 </offsets>
176 <condition>
177 <greater-than>
178 <property>/environment/volcanoes/kilauea/puu-oo-activity</property>
179 <value>1</value>
180 </greater-than>
181 </condition>
182 </model>
183
184
185
186
187 </PropertyList>