diff --git a/Docs/model-howto.html b/Docs/model-howto.html index 9ad5f2440..efd32d7ef 100644 --- a/Docs/model-howto.html +++ b/Docs/model-howto.html @@ -714,13 +714,14 @@ are only executed when the condition evaluated to true.

FlightGear sceneries use shared models. These models are loaded once and displayed multiple times. If we apply a transformation on an object of the model, every occurence of the model will show the same transformation, creating a -very unnatural unisson. To solve this kind of problem, several animations +very unnatural unison. To solve this kind of problem, several animations support the notion of personality. It means that a set of parameters are able to randomly vary in a specified range if the use-personality boolean property is set to true. For the moment, spin and timed animations support personality.

"select" animation type

+

The select animation is there to remove objects ( specified in the object-name elements ) from the scene when the associated condition evaluated to false.

In the example below :

@@ -741,6 +742,48 @@ elements ) from the scene when the associated condition evaluated to false< In other words, these objects, that are already in the scene because they were added by the designer of the model, are removed when the sun is above the horizon.

+

"timed" animation type

+ +

The timed animation selects only one object among those specified by object-name +for a specified duration. When the displayed time ends, the next object is selected for the +matching duration.

+

The simpler form is :

+
 <animation>
+  <name>BeaconFlasher</name>
+  <type>timed</type>
+  <object-name>BeaconOff</object-name>
+  <object-name>BeaconOn</object-name>
+  <duration-sec>1.0</duration-sec>
+ </animation>
+

In this example, each object is displayed during an equal time, specified in seconds.

+

This second example use personality :

+
 <animation>
+  <type>timed</type>
+  <object-name>StrobesOn</object-name>
+  <object-name>StrobesOff</object-name>
+  <use-personality type="bool">true</use-personality>
+  <branch-duration-sec>
+   <random>
+    <min>0.9</min>
+    <max>1.1</max>
+   </random>
+  </branch-duration-sec>
+  <branch-duration-sec>
+   <random>
+    <min>0.9</min>
+    <max>1.1</max>
+   </random>
+  </branch-duration-sec>
+ </animation>
+

In this case, there is a branch-duration-sec element for each +object-name that specify a duration for that object. The value of +branch-duration-sec could be a literal double value in seconds.
+Here, literals have been replaced by the random element. It means +that the duration is choosen randomly between min and max. +Because of the use-personality element set to true, durations are +allowed to be different for each occurence of this model, breaking the announced +unison.

+

"scale" animation type

Here is a contrived example of one way to use the "scale" animation