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

<PropertyList>

  <path>burnelli.ac</path>

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

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>cabine</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletC</object-name>
    <object-name>voletD</object-name>
    <object-name>ailes2</object-name>
    <object-name>directionG</object-name>
    <object-name>directionD</object-name>
    <object-name>profondeur</object-name>
    <object-name>ailettesG</object-name>
    <object-name>ailettesD</object-name>
    <object-name>air</object-name>
    <object-name>antenne</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>roueA</object-name>
    <object-name>trous</object-name>
    <object-name>heliceG</object-name>
    <object-name>heliceD</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>

    <!-- Objets transparents -->
    <object-name>vitres</object-name>
    <object-name>propblurG</object-name>
    <object-name>propblurD</object-name>
    <object-name>propdiscG</object-name>
    <object-name>propdiscD</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>cabine</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletC</object-name>
    <object-name>voletD</object-name>
    <object-name>ailes2</object-name>
    <object-name>directionG</object-name>
    <object-name>directionD</object-name>
    <object-name>profondeur</object-name>
    <object-name>ailettesG</object-name>
    <object-name>ailettesD</object-name>
    <object-name>air</object-name>
    <object-name>antenne</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>roueA</object-name>
    <object-name>trous</object-name>
    <object-name>heliceG</object-name>
    <object-name>heliceD</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>

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

    <ambient>
      <red-prop>ambient/red</red-prop>
      <green-prop>ambient/green</green-prop>
      <blue-prop>ambient/blue</blue-prop>
    </ambient>
-->
    <specular>
      <red-prop>specular/red</red-prop>
      <green-prop>specular/green</green-prop>
      <blue-prop>specular/blue</blue-prop>
    </specular>

    <emission>
      <red-prop>emission/red</red-prop>
      <green-prop>emission/green</green-prop>
      <blue-prop>emission/blue</blue-prop>
    </emission>
<!--
    <shininess>
      <shininess-prop>shininess</shininess-prop>
    </shininess>
-->
  </animation>

  <effect>
    <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
    <object-name>fuselage</object-name>
    <object-name>cabine</object-name>
    <object-name>ailes</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>voletG</object-name>
    <object-name>voletC</object-name>
    <object-name>voletD</object-name>
    <object-name>ailes2</object-name>
    <object-name>directionG</object-name>
    <object-name>directionD</object-name>
    <object-name>profondeur</object-name>
    <object-name>ailettesG</object-name>
    <object-name>ailettesD</object-name>
    <object-name>air</object-name>
    <object-name>antenne</object-name>
    <object-name>bolG</object-name>
    <object-name>bolD</object-name>
  </effect>

  <animation>
    <type>shader</type>
    <shader>chrome</shader>
    <texture>Aircraft/Generic/Effects/glass_shader.png</texture>
    <object-name>vitres</object-name>
  </animation>

  <animation>
    <type>noshadow</type>
    <object-name>vitres</object-name>
    <object-name>propblurG</object-name>
    <object-name>propblurD</object-name>
    <object-name>propdiscG</object-name>
    <object-name>propdiscD</object-name>
  </animation>

  <!-- Intérieur -->
  <model>
    <path>Aircraft/Burnelli-CBY-3/Models/Interior/interior.xml</path>
    <offsets>
      <x-m> 0 </x-m>
      <y-m> 0 </y-m>
      <z-m> 0 </z-m>
    </offsets>
  </model>

  <!-- Moteurs -->
  <!-- gauche -->
  <model>
    <path>Aircraft/B-24-Liberator/Models/Engines/r1830.xml</path>
    <offsets>
      <x-m> -7.466 </x-m>
      <y-m> -2.321 </y-m>
      <z-m> -0.899 </z-m>
    </offsets>
  </model>

  <!-- droit -->
  <model>
    <path>Aircraft/B-24-Liberator/Models/Engines/r1830.xml</path>
    <offsets>
      <x-m> -7.466 </x-m>
      <y-m>  2.321 </y-m>
      <z-m> -0.899 </z-m>
    </offsets>
  </model>

  <!-- Les hélices --> 
  <animation>
    <name>HeliceCompleteG</name>
    <object-name>propdiscG</object-name>
    <object-name>propblurG</object-name>
    <object-name>heliceG</object-name>
    <object-name>bolGE</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>1100</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>500.000</value>
      </greater-than>
      <less-than>
        <property>/engines/engine[0]/rpm</property>
        <value>1100.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>1100</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceCompleteG</object-name>
    <property>/engines/engine[0]/rpm</property>
    <factor> 1 </factor>
    <center>
      <x-m> -7.838 </x-m>
      <y-m> -2.321 </y-m>
      <z-m> -0.899 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <name>HeliceCompleteD</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[1]/rpm</property>
        <value>1100</value>
      </greater-than>
    </condition>
  </animation>

  <animation>
    <type>select</type>
    <object-name>propblurD</object-name>
    <condition>
    <and>
      <greater-than>
        <property>/engines/engine[1]/rpm</property>
        <value>500.000</value>
      </greater-than>
      <less-than>
        <property>/engines/engine[1]/rpm</property>
        <value>1100.001</value>
      </less-than>
    </and>
    </condition>
  </animation>

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

  <animation>
    <type>spin</type>
    <object-name>HeliceCompleteD</object-name>
    <property>/engines/engine[1]/rpm</property>
    <factor> 1 </factor>
    <center>
      <x-m> -7.838 </x-m>
      <y-m>  2.321 </y-m>
      <z-m> -0.899 </z-m>
    </center>
    <axis>
      <x> -1 </x>
      <y>  0 </y>
      <z>  0 </z>
    </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>  -1.793 </x1-m>
      <y1-m> -12.445 </y1-m>
      <z1-m>   0.561 </z1-m>
      <x2-m>  -1.238 </x2-m>
      <y2-m>  -6.721 </y2-m>
      <z2-m>   0.114 </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> -1.238 </x1-m>
      <y1-m>  6.721 </y1-m>
      <z1-m>  0.114 </z1-m>
      <x2-m> -1.793 </x2-m>
      <y2-m> 12.445 </y2-m>
      <z2-m>  0.561 </z2-m>
    </axis>
  </animation>

  <!-- Gouvernes de direction -->
  <animation>
    <type>rotate</type>
    <object-name>directionG</object-name>
    <property>surface-positions/rudder-pos-norm</property>
    <factor> 20 </factor>
    <center>
      <x-m>  7.347 </x-m>
      <y-m> -2.776 </y-m>
      <z-m>  1.722 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y>  0 </y>
      <z> -1 </z>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>directionD</object-name>
    <property>surface-positions/rudder-pos-norm</property>
    <factor> 20 </factor>
    <center>
      <x-m> 7.347 </x-m>
      <y-m> 2.776 </y-m>
      <z-m> 1.722 </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>surface-positions/elevator-pos-norm</property>
    <factor> 20 </factor>
    <center>
     <x-m> 7.395 </x-m>
     <y-m> 0.000 </y-m>
     <z-m> 1.510 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Volets -->
  <animation>
    <type>rotate</type>
    <object-name>voletG</object-name>
    <property>surface-positions/flap-pos-norm</property>
    <factor> -45 </factor>
    <axis>
      <x1-m> -1.453 </x1-m>
      <y1-m> -6.578 </y1-m>
      <z1-m> -0.055 </z1-m>
      <x2-m> -1.198 </x2-m>
      <y2-m> -3.067 </y2-m>
      <z2-m> -0.386 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>voletD</object-name>
    <property>surface-positions/flap-pos-norm</property>
    <factor> -45 </factor>
    <axis>
      <x1-m> -1.198 </x1-m>
      <y1-m>  3.067 </y1-m>
      <z1-m> -0.386 </z1-m>
      <x2-m> -1.453 </x2-m>
      <y2-m>  6.578 </y2-m>
      <z2-m> -0.055 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>voletC</object-name>
    <property>surface-positions/flap-pos-norm</property>
    <factor> -45 </factor>
    <center>
      <x-m>  2.243 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -1.225 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Rentré des roues -->
  <animation>
    <name>TrainGauche</name>
    <object-name>roueG</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>TrainGauche</object-name>
    <property>gear/gear[0]/position-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> 105 </dep></entry>
      <entry><ind> 1 </ind><dep>   0 </dep></entry>
    </interpolation>
    <center>
      <x-m> -3.585 </x-m>
      <y-m> -2.325 </y-m>
      <z-m> -1.453 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <name>TrainDroit</name>
    <object-name>roueD</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>TrainDroit</object-name>
    <property>gear/gear[1]/position-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> 105 </dep></entry>
      <entry><ind> 1 </ind><dep>   0 </dep></entry>
    </interpolation>
    <center>
      <x-m> -3.585 </x-m>
      <y-m>  2.325 </y-m>
      <z-m> -1.453 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <animation>
    <name>TrainAvant</name>
    <object-name>roueA</object-name>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>TrainAvant</object-name>
    <property>gear/gear[2]/position-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> 90 </dep></entry>
      <entry><ind> 1 </ind><dep>  0 </dep></entry>
    </interpolation>
    <center>
      <x-m>  1.879 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -1.155 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 1 </y>
      <z> 0 </z>
    </axis>
  </animation>

  <!-- Compression -->
  <animation>
    <name>RoueGauche</name>
    <object-name>roueG</object-name>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>RoueGauche</object-name>
    <property>gear/gear[0]/compression-norm</property>
    <interpolation>
      <entry><ind> 0.00 </ind><dep> -0.08 </dep></entry>
      <entry><ind> 0.13 </ind><dep>  0.00 </dep></entry>
      <entry><ind> 1.00 </ind><dep>  0.29 </dep></entry>
    </interpolation>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

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

  <animation>
    <type>translate</type>
    <object-name>RoueDroite</object-name>
    <property>gear/gear[1]/compression-norm</property>
    <interpolation>
      <entry><ind> 0.00 </ind><dep> -0.08 </dep></entry>
      <entry><ind> 0.13 </ind><dep>  0.00 </dep></entry>
      <entry><ind> 1.00 </ind><dep>  0.29 </dep></entry>
    </interpolation>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <animation>
    <name>RoueAvant</name>
    <object-name>roueA</object-name>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>RoueAvant</object-name>
    <property>gear/gear[2]/compression-norm</property>
    <interpolation>
      <entry><ind> 0.00 </ind><dep> -0.08 </dep></entry>
      <entry><ind> 0.13 </ind><dep>  0.00 </dep></entry>
      <entry><ind> 1.00 </ind><dep>  0.29 </dep></entry>
    </interpolation>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Rotation de la roue arriere en fonction de la gouverne de direction -->
  <animation>
    <type>rotate</type>
    <object-name>RoueAvant</object-name>
    <property>surface-positions/rudder-pos-norm</property>
    <factor> -30 </factor>
    <center>
      <x-m>  1.879 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -1.772 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Rotation des roues lors du roulage -->
  <animation>
    <type>spin</type>
    <object-name>roueG</object-name>
    <property>/gear/gear[0]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m> -3.585 </x-m>
      <y-m> -2.325 </y-m>
      <z-m> -2.626 </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[1]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m> -3.585 </x-m>
      <y-m>  2.325 </y-m>
      <z-m> -2.626 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>roueA</object-name>
    <property>/gear/gear[2]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
      <x-m>  1.879 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -1.772 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

</PropertyList>

