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

<PropertyList>

  <path>as37.ac</path>

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

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/Starck-AS-37/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>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>moteurs</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>
    <object-name>axeAH</object-name>
    <object-name>axeAB</object-name>
    <object-name>axeG</object-name>
    <object-name>axeD</object-name>

    <object-name>trous</object-name>
    <object-name>tourvitres</object-name>
    <object-name>tourvitresG</object-name>
    <object-name>tourvitresD</object-name>
    <object-name>roueA</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>heliceG</object-name>
    <object-name>heliceD</object-name>

    <!-- Objets transparents -->
    <object-name>vitre</object-name>
    <object-name>verriereG</object-name>
    <object-name>verriereD</object-name>
    <object-name>propdiscG</object-name>
    <object-name>propblurG</object-name>
    <object-name>propdiscD</object-name>
    <object-name>propblurD</object-name>
    <!-- HDR mode -->
    <object-name>HDRvitre</object-name>
    <object-name>HDRverriereG</object-name>
    <object-name>HDRverriereD</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>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>moteurs</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>
    <object-name>axeAH</object-name>
    <object-name>axeAB</object-name>
    <object-name>axeG</object-name>
    <object-name>axeD</object-name>
    <object-name>trous</object-name>
    <object-name>tourvitres</object-name>
    <object-name>tourvitresG</object-name>
    <object-name>tourvitresD</object-name>
    <object-name>roueA</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>heliceG</object-name>
    <object-name>heliceD</object-name>
    <object-name>vitre</object-name>
    <object-name>verriereG</object-name>
    <object-name>verriereD</object-name>
    <object-name>propdiscG</object-name>
    <object-name>propblurG</object-name>
    <object-name>propdiscD</object-name>
    <object-name>propblurD</object-name>
    <object-name>HDRvitre</object-name>
    <object-name>HDRverriereG</object-name>
    <object-name>HDRverriereD</object-name>

    <property-base>Aircraft/Starck-AS-37/Models/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>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>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>moteurs</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>
    <object-name>axeAH</object-name>
    <object-name>axeAB</object-name>
    <object-name>axeG</object-name>
    <object-name>axeD</object-name>
  </effect>

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

  <effect>
    <inherits-from>Effects/Glass/glass</inherits-from>
    <object-name>HDRvitre</object-name>
    <object-name>HDRverriereG</object-name>
    <object-name>HDRverriereD</object-name>
  </effect>

  <!-- Glass selection HDR or not -->
  <animation>
    <type>select</type>
    <condition>
      <!-- <property>sim/rendering/hdr/hdr-enabled</property> -->
      <property>sim/multiplay/generic/bool[2]</property>
    </condition>
    <object-name>HDRvitre</object-name>
    <object-name>HDRverriereG</object-name>
    <object-name>HDRverriereD</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>vitre</object-name>
    <object-name>verriereG</object-name>
    <object-name>verriereD</object-name>
  </animation>

  <effect>
    <inherits-from>Effects/model-transparent</inherits-from>
    <object-name>propdiscG</object-name>
    <object-name>propblurG</object-name>
    <object-name>propdiscD</object-name>
    <object-name>propblurD</object-name>
  </effect>

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

  <model>
    <path>Immat/immat.xml</path>
  </model>

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

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

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

  <!-- Propellers -->
  <animation>
    <name>HeliceCompleteGauche</name>
    <object-name>propdiscG</object-name>
    <object-name>propblurG</object-name>
    <object-name>heliceG</object-name>
    <object-name>bolG</object-name>
  </animation>

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

  <animation>
    <type>select</type>
    <object-name>propblurG</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>heliceG</object-name>
    <condition>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceCompleteGauche</object-name>
    <property>engines/engine[0]/rpm</property>
    <factor> -1 </factor>
    <center>
      <x-m> -0.55134 </x-m>
      <y-m> -1.20950 </y-m>
      <z-m> -0.04841 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <name>HeliceCompleteDroite</name>
    <object-name>propdiscD</object-name>
    <object-name>propblurD</object-name>
    <object-name>heliceD</object-name>
    <object-name>bolD</object-name>
  </animation>

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

  <animation>
    <type>select</type>
    <object-name>propblurD</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>heliceD</object-name>
    <condition>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1500</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceCompleteDroite</object-name>
    <property>engines/engine[0]/rpm</property>
    <factor> -1 </factor>
    <center>
      <x-m> -0.55134 </x-m>
      <y-m>  1.20950 </y-m>
      <z-m> -0.04841 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </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>  2.41460 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m> -0.10203 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Gouverne de direction -->
  <animation>
    <type>rotate</type>
    <object-name>direction</object-name>
    <!-- <property>controls/flight/rudder</property> -->
    <property>surface-positions/rudder-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> 2.46557 </x1-m>
      <y1-m> 0.00000 </y1-m>
      <z1-m> 0.09084 </z1-m>
      <x2-m> 2.78487 </x2-m>
      <y2-m> 0.00000 </y2-m>
      <z2-m> 0.88894 </z2-m>
    </axis>
  </animation>

  <!-- Animations des ailerons -->
  <animation>
    <type>rotate</type>
    <object-name>aileronG</object-name>
    <property>surface-positions/left-aileron-pos-norm</property>
    <factor> -15 </factor>
    <axis>
      <x1-m>  0.06484 </x1-m>
      <y1-m> -2.40504 </y1-m>
      <z1-m> -0.43930 </z1-m>
      <x2-m> -0.78367 </x2-m>
      <y2-m> -2.96436 </y2-m>
      <z2-m> -0.08310 </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.06484 </x1-m>
      <y1-m>  2.40504 </y1-m>
      <z1-m> -0.43930 </z1-m>
      <x2-m> -0.78367 </x2-m>
      <y2-m>  2.96436 </y2-m>
      <z2-m> -0.08310 </z2-m>
    </axis>
  </animation>

  <!-- Compression -->
  <animation>
    <name>RoueAvant</name>
    <object-name>roueA</object-name>
    <object-name>axeAB</object-name>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>RoueAvant</object-name>
    <!-- <property>gear/gear[0]/compression-norm</property> -->
    <property>sim/multiplay/generic/float[10]</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> 0.0000 </dep></entry>
      <entry><ind> 1 </ind><dep> 0.0628 </dep></entry>
    </interpolation>
    <axis>
      <x> 0.0133 </x>
      <y> 0.0000 </y>
      <z> 0.0613 </z>
    </axis>
  </animation>

  <animation>
    <name>RoueGauche</name>
    <object-name>roueG</object-name>
    <object-name>axeG</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>RoueGauche</object-name>
    <!-- <property>gear/gear[1]/compression-norm</property> -->
    <property>sim/multiplay/generic/float[11]</property>
    <interpolation>
      <entry><ind> 0 </ind><dep>   0 </dep></entry>
      <entry><ind> 1 </ind><dep> -10 </dep></entry>
    </interpolation>
    <center>
      <x-m> -0.87104 </x-m>
      <y-m> -0.47984 </y-m>
      <z-m> -0.58680 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <name>RoueDroite</name>
    <object-name>roueD</object-name>
    <object-name>axeD</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>RoueDroite</object-name>
    <!-- <property>gear/gear[2]/compression-norm</property> -->
    <property>sim/multiplay/generic/float[12]</property>
    <interpolation>
      <entry><ind> 0 </ind><dep>  0 </dep></entry>
      <entry><ind> 1 </ind><dep> 10 </dep></entry>
    </interpolation>
    <center>
      <x-m> -0.87104 </x-m>
      <y-m>  0.47984 </y-m>
      <z-m> -0.58680 </z-m>
    </center>
    <axis>
      <x> 1 </x>
      <y> 0 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Rotation de la roue avant en fonction de la gouverne de direction -->
  <animation>
    <name>TrainAvant</name>
    <object-name>roueA</object-name>
    <object-name>axeAB</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>TrainAvant</object-name>
    <!-- <property>gear/gear[0]/caster-angle-deg</property> -->
    <property>sim/multiplay/generic/float[9]</property>
    <factor> -0.6 </factor>
    <axis>
      <x1-m> -2.17093 </x1-m>
      <y1-m>  0.00000 </y1-m>
      <z1-m> -0.81038 </z1-m>
      <x2-m> -2.14937 </x2-m>
      <y2-m>  0.00000 </y2-m>
      <z2-m> -0.71815 </z2-m>
    </axis>
  </animation>

  <!-- Rotation des roues lors du roulage -->
  <animation>
    <type>spin</type>
    <object-name>roueA</object-name>
    <!-- <property>gear/gear[0]/rollspeed-ms</property> -->
    <property>sim/multiplay/generic/float[5]</property>
    <factor> 30 </factor>
    <center>
      <x-m> -2.20598 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m> -0.96219 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>roueG</object-name>
    <!-- <property>gear/gear[1]/rollspeed-ms</property> -->
    <property>sim/multiplay/generic/float[6]</property>
    <factor> 30 </factor>
    <center>
      <x-m> -0.87104 </x-m>
      <y-m> -0.89612 </y-m>
      <z-m> -0.95771 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>roueD</object-name>
    <!-- <property>gear/gear[2]/rollspeed-ms</property> -->
    <property>sim/multiplay/generic/float[7]</property>
    <factor> 30 </factor>
    <center>
      <x-m> -0.87104 </x-m>
      <y-m>  0.89612 </y-m>
      <z-m> -0.95771 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Canopy -->
  <animation>
    <type>pick</type>
    <object-name>tourvitresG</object-name>
    <object-name>verriereG</object-name>
    <object-name>HDRverriereG</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <condition>
          <and>
            <property>/gear/gear[0]/wow</property>
            <property>/gear/gear[1]/wow</property>
            <property>/gear/gear[2]/wow</property>
            <less-than>
              <property>/gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.crew.toggle();</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>tourvitresG</object-name>
    <object-name>verriereG</object-name>
    <object-name>HDRverriereG</object-name>
    <!-- <property>sim/model/door-positions/crew/position-norm</property> -->
    <property>sim/multiplay/generic/float[0]</property>
    <interpolation>
      <entry><ind> 0 </ind><dep>   0 </dep></entry>
      <entry><ind> 1 </ind><dep> -80 </dep></entry>
    </interpolation>
    <axis>
      <x1-m> -2.56287 </x1-m>
      <y1-m>  0.00000 </y1-m>
      <z1-m>  0.06121 </z1-m>
      <x2-m> -1.87393 </x2-m>
      <y2-m>  0.00000 </y2-m>
      <z2-m>  0.43800 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>pick</type>
    <object-name>tourvitresD</object-name>
    <object-name>verriereD</object-name>
    <object-name>HDRverriereD</object-name>
    <visible>true</visible>
    <action>
      <button>0</button>
      <repeatable>false</repeatable>
      <binding>
        <condition>
          <and>
            <property>/gear/gear[0]/wow</property>
            <property>/gear/gear[1]/wow</property>
            <property>/gear/gear[2]/wow</property>
            <less-than>
              <property>/gear/gear[0]/rollspeed-ms</property>
              <value>10</value>
            </less-than>
          </and>
        </condition>
        <command>nasal</command>
        <script>doors.passenger.toggle();</script>
      </binding>
    </action>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>tourvitresD</object-name>
    <object-name>verriereD</object-name>
    <object-name>HDRverriereD</object-name>
    <!-- <property>sim/model/door-positions/passenger/position-norm</property> -->
    <property>sim/multiplay/generic/float[1]</property>
    <interpolation>
      <entry><ind> 0 </ind><dep>  0 </dep></entry>
      <entry><ind> 1 </ind><dep> 80 </dep></entry>
    </interpolation>
    <axis>
      <x1-m> -2.56287 </x1-m>
      <y1-m>  0.00000 </y1-m>
      <z1-m>  0.06121 </z1-m>
      <x2-m> -1.87393 </x2-m>
      <y2-m>  0.00000 </y2-m>
      <z2-m>  0.43800 </z2-m>
    </axis>
  </animation>

</PropertyList>
