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

<PropertyList>

  <path>antoinette.ac</path>

  <nasal>
    <load>
      var livery_update = aircraft.livery_update.new("Aircraft/Antoinette/Models/Liveries", 10);

      var self = cmdarg();

      var float_0 = self.getNode("sim/multiplay/generic/float[0]", 1);
      var float_1 = self.getNode("sim/multiplay/generic/float[1]", 1);
      
      var crew_door = self.getNode("instrumentation/doors/crew/position-norm", 1);
      var passenger_door = self.getNode("instrumentation/doors/passenger/position-norm", 1);
    
      crew_door.alias(float_0);
      passenger_door.alias(float_1);
    </load>

    <unload>
      livery_update.stop();
      crew_door.unalias();
      passenger_door.unalias();
    </unload>
  </nasal>

  <animation>
    <!-- Objets opaques -->
    <object-name>fuselage</object-name>
    <object-name>structure</object-name>
    <object-name>attaches</object-name>
    <object-name>axes</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>intprofondeur</object-name>
    <object-name>intdirection</object-name>
    <object-name>helice1</object-name>
    <object-name>helice2</object-name>
    <object-name>radiateurs</object-name>
    <object-name>siege</object-name>
    <object-name>volantG</object-name>
    <object-name>volantD</object-name>
    <object-name>attachesvolants</object-name>
    <object-name>bidons</object-name>
    <object-name>portesbidons</object-name>
    <object-name>bouchons</object-name>
    <object-name>intaileronG</object-name>
    <object-name>intaileronD</object-name>
    <object-name>tenseurs</object-name>
    
    <object-name>blocmoteur</object-name>
    <object-name>pistons</object-name>
    <object-name>echappes</object-name>
    <object-name>tuyaux</object-name>
    <object-name>entrees</object-name>
    <object-name>disque</object-name>
    <object-name>bougies</object-name>
    <object-name>cables</object-name>
    
    <!-- Objets transparents -->
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>ailes</object-name>
    <object-name>ailes2</object-name>
    <object-name>tail</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>structure</object-name>
    <object-name>attaches</object-name>
    <object-name>axes</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <object-name>intprofondeur</object-name>
    <object-name>intdirection</object-name>
    <object-name>helice1</object-name>
    <object-name>helice2</object-name>
    <object-name>radiateurs</object-name>
    <object-name>siege</object-name>
    <object-name>volantG</object-name>
    <object-name>volantD</object-name>
    <object-name>attachesvolants</object-name>
    <object-name>bidons</object-name>
    <object-name>portesbidons</object-name>
    <object-name>bouchons</object-name>
    <object-name>intaileronG</object-name>
    <object-name>intaileronD</object-name>
    <object-name>tenseurs</object-name>

    <object-name>blocmoteur</object-name>
    <object-name>pistons</object-name>
    <object-name>echappes</object-name>   
    <object-name>tuyaux</object-name>
    <object-name>entrees</object-name>
    <object-name>disque</object-name>
    <object-name>bougies</object-name>
    <object-name>cables</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>
    <emission>
      <red-prop>emission/red</red-prop>
      <green-prop>emission/green</green-prop>
      <blue-prop>emission/blue</blue-prop>
    </emission>
  </animation>

  <animation>
    <type>material</type>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>ailes</object-name>
    <object-name>ailes2</object-name>
    <object-name>tail</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    
    <property-base>sim/model/livery-t</property-base>
    <texture-prop>texture</texture-prop>
    <texture>texture-t.png</texture>
    <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>
  </animation>

  <effect>
    <inherits-from>Aircraft/Generic/Effects/Fuselagereflect</inherits-from>
    <object-name>pistons</object-name>
    <object-name>tuyaux</object-name>
  </effect>

  <animation>
    <type>noshadow</type>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
  </animation>

  <!--  REMBRANDT support for transparent objects -->
  <effect>
    <inherits-from>Effects/model-transparent</inherits-from>
    <condition>
      <property>sim/rendering/rembrandt/enabled</property>
    </condition>
    <object-name>profondeur</object-name>
    <object-name>direction</object-name>
    <object-name>ailes</object-name>
    <object-name>ailes2</object-name>
    <object-name>tail</object-name>
    <object-name>aileronG</object-name>
    <object-name>aileronD</object-name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
  </effect>

 <!-- Une ombre pour OSG -->
 <model>
    <path>Aircraft/Antoinette/Models/shadow.xml</path>
    <offsets>
      <x-m> -0.007936 </x-m>
      <y-m>  0.000000 </y-m>
      <z-m> -1.340000 </z-m>
    </offsets>
  </model>

  <!-- Intérieur -->
  <model>
    <name>Interieur</name>
    <path>Aircraft/Antoinette/Models/Interior/interior.xml</path>
  </model>

  <!-- For Rembrandt -->
  <animation>
    <type>noshadow</type>
    <object-name>Interieur</object-name>
  </animation>

  <!-- Cranking effects -->
  <model>
    <path>Aircraft/Antoinette/Models/Effects/cranking/cranking.xml</path>
    <offsets>
      <x-m> -4.77401 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.80699 </z-m>
    </offsets>
  </model>
  
  <model>
    <path>Aircraft/Antoinette/Models/Effects/cranking/cranking.xml</path>
    <offsets>
      <x-m> -4.54401 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.80699 </z-m>
    </offsets>
  </model>
  
  <model>
    <path>Aircraft/Antoinette/Models/Effects/cranking/cranking.xml</path>
    <offsets>
      <x-m> -4.31401 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.80699 </z-m>
    </offsets>
  </model>
  
  <model>
    <path>Aircraft/Antoinette/Models/Effects/cranking/cranking.xml</path>
    <offsets>
      <x-m> -4.08401 </x-m>
      <y-m>  0.00000 </y-m>
      <z-m>  0.80699 </z-m>
    </offsets>
  </model>
  
  <!-- Effets sur le sol -->
  <!-- Patte avant -->
  <model>
    <path>Aircraft/Antoinette/Models/Effects/ground/ground0.xml</path>   
    <offsets>
      <x-m> -5.449 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -1.471 </z-m>
    </offsets>
  </model>
  
  <!-- Roue gauche -->
  <model>
    <path>Aircraft/Antoinette/Models/Effects/ground/ground1.xml</path>
    <offsets>
      <x-m> -3.088 </x-m>
      <y-m> -0.651 </y-m>
      <z-m> -1.639 </z-m>
    </offsets>
  </model>

  <!-- Roue droite -->
  <model>
    <path>Aircraft/Antoinette/Models/Effects/ground/ground2.xml</path>
    <offsets>
      <x-m> -3.088 </x-m>
      <y-m>  0.651 </y-m>
      <z-m> -1.639 </z-m>
    </offsets>
  </model>

  <!-- Patte arrière -->
  <model>
    <path>Aircraft/Antoinette/Models/Effects/ground/ground3.xml</path>   
    <offsets>
      <x-m>  5.029 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -1.617 </z-m>
    </offsets>
  </model>

  <!-- L'hélice --> 
  <animation>
    <name>Helice</name>
    <object-name>helice1</object-name>
    <object-name>helice2</object-name>
  </animation>

  <animation>
    <name>HeliceComplete</name>
    <object-name>propdisc</object-name>
    <object-name>propblur</object-name>
    <object-name>Helice</object-name>
  </animation>

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

  <animation>
    <type>select</type>
    <object-name>propblur</object-name>
    <condition>
    <and>
      <greater-than>
        <property>engines/engine[0]/rpm</property>
        <value>400.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>Helice</object-name>
    <condition>
      <less-than>
        <property>engines/engine[0]/rpm</property>
        <value>1100</value>
      </less-than>
    </condition>
  </animation>

  <animation>
    <type>spin</type>
    <object-name>HeliceComplete</object-name>
    <property>engines/engine[0]/rpm</property>
    <factor> 1 </factor>
    <center>
      <x-m> -5.412 </x-m>
      <y-m>  0.000 </y-m>
      <z-m>  0.309 </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>
    <object-name>intprofondeur</object-name>
    <property>surface-positions/elevator-pos-norm</property>
    <factor> 20 </factor>
    <center>
      <x-m>  4.732 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.438 </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>
    <object-name>intdirection</object-name>
    <property>surface-positions/rudder-pos-norm</property>
    <factor> 20 </factor>
    <center>
      <x-m>  4.730 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.424 </z-m>
    </center>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Animations des ailerons -->
  <animation>
    <type>rotate</type>
    <object-name>aileronG</object-name>
    <object-name>intaileronG</object-name>
    <property>surface-positions/left-aileron-pos-norm</property>
    <factor> 15 </factor>
    <axis>
      <x1-m> -1.645 </x1-m>
      <y1-m> -6.355 </y1-m>
      <z1-m>  0.591 </z1-m>
      <x2-m> -1.553 </x2-m>
      <y2-m> -4.671 </y2-m>
      <z2-m>  0.377 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>aileronD</object-name>
    <object-name>intaileronD</object-name>
    <property>surface-positions/right-aileron-pos-norm</property>
    <factor> -15 </factor>
    <axis>
      <x1-m> -1.645 </x1-m>
      <y1-m>  6.355 </y1-m>
      <z1-m>  0.591 </z1-m>
      <x2-m> -1.553 </x2-m>
      <y2-m>  4.671 </y2-m>
      <z2-m>  0.377 </z2-m>
    </axis>
  </animation>

</PropertyList>
