<?xml version="1.0" encoding="ISO-8859-1"?>

<PropertyList>

  <path>sm65.ac</path>

  <!-- MP sound call -->
  <sound>
    <path>../Sounds/mp-sound.xml</path>
  </sound>

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/SM-65/Models/Liveries", 10);
    </load>
    <unload>
      livery_update  .stop();
    </unload>
  </nasal>

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>ailes2</object-name>
    <object-name>derive</object-name>
    <object-name>direction</object-name>
    <object-name>profondeur</object-name>
    <object-name>floteurs</object-name>
    <object-name>tourvitre</object-name>
    <object-name>bol1</object-name>
    <object-name>bol2</object-name>
    <object-name>tourvitre</object-name>
    <object-name>structure</object-name>

    <object-name>trous</object-name>
    <object-name>cables</object-name>
    <object-name>echappes</object-name>
    <object-name>helice1</object-name>
    <object-name>helice2</object-name>

    <!-- Objets transparents -->
    <object-name>vitres</object-name>
    <object-name>propdisc1</object-name>
    <object-name>propblur1</object-name>
    <object-name>propdisc2</object-name>
    <object-name>propblur2</object-name>
    <!-- HDR mode -->
    <object-name>HDRvitres</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>ailes2</object-name>
    <object-name>derive</object-name>
    <object-name>direction</object-name>
    <object-name>profondeur</object-name>
    <object-name>floteurs</object-name>
    <object-name>tourvitre</object-name>
    <object-name>bol1</object-name>
    <object-name>bol2</object-name>
    <object-name>tourvitre</object-name>
    <object-name>structure</object-name>
    <object-name>trous</object-name>
    <object-name>cables</object-name>
    <object-name>echappes</object-name>
    <object-name>helice1</object-name>
    <object-name>helice2</object-name>
    <object-name>vitres</object-name>
    <object-name>propdisc1</object-name>
    <object-name>propblur1</object-name>
    <object-name>propdisc2</object-name>
    <object-name>propblur2</object-name>
    <object-name>HDRvitres</object-name>

    <property-base>sim/model/livery</property-base>
    <texture-prop>texture</texture-prop>
    <texture>texture.png</texture>
    <specular>
      <red-prop>specular/red</red-prop>
      <green-prop>specular/green</green-prop>
      <blue-prop>specular/blue</blue-prop>
    </specular>
  </animation>

  <effect>
    <inherits-from>Aircraft/SM-65/Models/Effects/Bump/bumpspec</inherits-from>
    <object-name>fuselage</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>ailes2</object-name>
    <object-name>derive</object-name>
    <object-name>direction</object-name>
    <object-name>profondeur</object-name>
    <object-name>floteurs</object-name>
    <object-name>tourvitre</object-name>
    <object-name>bol1</object-name>
    <object-name>bol2</object-name>
    <object-name>tourvitre</object-name>
    <object-name>structure</object-name>
  </effect>

  <!-- working for Compositor -->
  <effect>
    <inherits-from>Effects/Glass/glassrain</inherits-from>
    <object-name>vitres</object-name>
  </effect>

  <effect>
    <inherits-from>Effects/Glass/glass</inherits-from>
    <object-name>HDRvitres</object-name>
  </effect>

  <!-- Sélection des vitres en fonction de HDR ou pas -->
  <animation>
    <type>select</type>
    <condition>
      <!-- <property>sim/rendering/hdr/hdr-enabled</property> -->
      <property>sim/multiplay/generic/bool[2]</property>
    </condition>
    <object-name>HDRvitres</object-name>
  </animation>

  <animation>
    <type>select</type>
    <condition>
      <!-- <not><property>sim/rendering/hdr/hdr-enabled</property></not> -->
      <not><property>sim/multiplay/generic/bool[2]</property></not>
    </condition>
    <object-name>vitres</object-name>
  </animation>

  <effect>
    <inherits-from>Effects/model-transparent</inherits-from>
    <object-name>propdisc1</object-name>
    <object-name>propblur1</object-name>
    <object-name>propdisc2</object-name>
    <object-name>propblur2</object-name>
  </effect>

  <model>
    <path>Interior/interior.xml</path>
  </model>

  <model>
    <path>Effects/wakes/all-wakes.xml</path>
  </model>

  <model>
    <path>Effects/cranking/all-cranking.xml</path>
  </model>

  <model>
    <path>light/all-lights.xml</path>
  </model>

  <!-- L'hélice du moteur 1-->
  <animation>
    <name>HeliceComplete1</name>
    <object-name>propdisc1</object-name>
    <object-name>propblur1</object-name>
    <object-name>helice1</object-name>
    <object-name>bol1</object-name>
  </animation>

  <!-- Séléction de l'objet visible en fonction des rpm -->
  <animation>
    <type>select</type>
    <object-name>propdisc1</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblur1</object-name>
    <condition>
    <and>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value>600.000</value>
      </greater-than>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>helice1</object-name>
    <condition>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceComplete1</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value> 5 </value>
      </greater-than>
    </condition>
    <property>engines/engine[0]/rpm</property>
    <factor> 10 </factor>
    <center>
      <x-m> -3.81072 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.67906 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- L'hélice du moteur 2-->
  <animation>
    <name>HeliceComplete2</name>
    <object-name>propdisc2</object-name>
    <object-name>propblur2</object-name>
    <object-name>helice2</object-name>
    <object-name>bol2</object-name>
  </animation>

  <!-- Séléction de l'objet visible en fonction des rpm -->
  <animation>
    <type>select</type>
    <object-name>propdisc2</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[1]/rpm</property>
        <value>1500</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblur2</object-name>
    <condition>
    <and>
      <greater-than>
        <property>engines/engine[1]/rpm</property>
        <value>600.000</value>
      </greater-than>
      <less-than>
        <property>engines/engine[1]/rpm</property>
        <value>1500.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>helice2</object-name>
    <condition>
      <less-than>
        <property>engines/engine[1]/rpm</property>
        <value>1500</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceComplete2</object-name>
    <condition>
      <greater-than>
        <property>engines/engine[1]/rpm</property>
        <value> 5 </value>
      </greater-than>
    </condition>
    <property>engines/engine[0]/rpm</property>
    <factor> 10 </factor>
    <center>
      <x-m> 0.73405 </x-m>
      <y-m> 0.00000 </y-m>
      <z-m> 0.73690 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Gouverne de direction -->
  <animation>
    <type>rotate</type>
    <object-name>direction</object-name>
    <property>controls/flight/rudder</property>
    <factor> 15 </factor>
    <center>
      <x-m> 4.81351 </x-m>
      <y-m> 0.00000 </y-m>
      <z-m> 0.67849 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Gouverne de profondeur -->
  <animation>
    <type>rotate</type>
    <object-name>profondeur</object-name>
    <!-- <property>controls/flight/elevator</property> -->
    <property>surface-positions/elevator-pos-norm</property>
    <factor> 15 </factor>
    <center>
      <x-m> 4.82818 </x-m>
      <y-m> 0.00000 </y-m>
      <z-m> 0.39361 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Animations des ailerons -->
  <animation>
    <type>rotate</type>
    <object-name>aileronG</object-name>
    <!-- <property>controls/flight/rudder</property> -->
    <property>surface-positions/rudder-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> -0.44860 </x1-m>
      <y1-m> -4.53458 </y1-m>
      <z1-m>  0.49896 </z1-m>
      <x2-m> -0.44397 </x2-m>
      <y2-m> -2.82452 </y2-m>
      <z2-m>  0.41773 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>aileronD</object-name>
    <property>surface-positions/right-aileron-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> -0.44397 </x1-m>
      <y1-m>  2.82452 </y1-m>
      <z1-m>  0.41773 </z1-m>
      <x2-m> -0.44860 </x2-m>
      <y2-m>  4.53458 </y2-m>
      <z2-m>  0.49896 </z2-m>
    </axis>
  </animation>

</PropertyList>
