<?xml version="1.0" encoding="UTF-8"?>

<PropertyList>

  <path>dauphin.ac</path>

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

  <animation>
    <object-name>fuselage</object-name>
    <object-name>derive</object-name>
    <object-name>moteurs</object-name>
    <object-name>porteG</object-name>
    <object-name>porteD</object-name>
    <object-name>echappes</object-name>

    <object-name>roueA</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>

    <!-- Transparence -->
    <object-name>vitres</object-name>
  </animation>

  <animation>
    <type>material</type>
    <object-name>fuselage</object-name>
    <object-name>derive</object-name>
    <object-name>moteurs</object-name>
    <object-name>porteG</object-name>
    <object-name>porteD</object-name>
    <object-name>echappes</object-name>

    <object-name>roueA</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</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>derive</object-name>
    <object-name>moteurs</object-name>
    <object-name>porteG</object-name>
    <object-name>porteD</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>
  </animation>

  <!-- Interieur -->
  <model>
    <path>Aircraft/Dauphin/Models/Interior/interior.xml</path>
    <offsets>
      <x-m> 0 </x-m>
      <y-m> 0 </y-m>
      <z-m> 0 </z-m>
      <roll-deg>    0 </roll-deg>
      <pitch-deg>   0 </pitch-deg>
      <heading-deg> 0 </heading-deg>
    </offsets>
  </model>

  <!-- Rotor principale -->
  <model>
    <path>Aircraft/Dauphin/Models/MainRotor/mainrotor.xml</path>
    <offsets>
      <x-m> -1.785 </x-m>
      <y-m>  0.000 </y-m>
      <z-m>  1.449 </z-m>
      <roll-deg>    0 </roll-deg>
      <pitch-deg>  -5 </pitch-deg>
      <heading-deg> 0 </heading-deg>
    </offsets>
  </model>

  <!-- Rotor de queue -->
  <model>
    <path>Aircraft/Dauphin/Models/TailRotor/tailrotor.xml</path>
    <offsets>
      <x-m>  5.295 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -0.085 </z-m>
      <roll-deg>  -90 </roll-deg>
      <pitch-deg>   0 </pitch-deg>
      <heading-deg> 0 </heading-deg>
    </offsets>
  </model>

  <!-- Rentré des roues Temporairement disparition/apparition des roues -->
  <animation>
    <type>select</type>
    <object-name>roueA</object-name>
    <object-name>roueG</object-name>
    <object-name>roueD</object-name>
    <condition>
      <not>
        <equals>
          <property>gear/gear[0]/position-norm</property>
          <value>0</value>
        </equals>
      </not>
    </condition>
  </animation>

  <!-- Fermeture des portes des trains -->
  <animation>
    <type>rotate</type>
    <object-name>porteG</object-name>
    <property>gear/gear[1]/position-norm</property>
    <interpolation>
      <entry><ind> 0.0 </ind><dep>   0 </dep></entry>
      <entry><ind> 0.2 </ind><dep> -80 </dep></entry>
      <entry><ind> 1.0 </ind><dep> -80 </dep></entry>
    </interpolation>
    <axis>
      <x1-m> -0.985 </x1-m>
      <y1-m> -0.862 </y1-m>
      <z1-m> -1.148 </z1-m>
      <x2-m>  0.301 </x2-m>
      <y2-m> -0.697 </y2-m>
      <z2-m> -1.035 </z2-m>
    </axis>
  </animation>

  <animation>
    <type>rotate</type>
    <object-name>porteD</object-name>
    <property>gear/gear[2]/position-norm</property>
    <interpolation>
      <entry><ind> 0.0 </ind><dep>   0 </dep></entry>
      <entry><ind> 0.2 </ind><dep> -80 </dep></entry>
      <entry><ind> 1.0 </ind><dep> -80 </dep></entry>
    </interpolation>
    <axis>
      <x1-m>  0.301 </x1-m>
      <y1-m>  0.697 </y1-m>
      <z1-m> -1.035 </z1-m>
      <x2-m> -0.985 </x2-m>
      <y2-m>  0.862 </y2-m>
      <z2-m> -1.148 </z2-m>
    </axis>
  </animation>

  <!-- Compression -->
  <animation>
    <type>translate</type>
    <object-name>roueA</object-name>
    <property>gear/gear[0]/compression-norm</property>
    <factor>0.3</factor>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>roueG</object-name>
    <property>gear/gear[1]/compression-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> 0.0 </dep></entry>
      <entry><ind> 1 </ind><dep> 0.3 </dep></entry>
    </interpolation>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <animation>
    <type>translate</type>
    <object-name>roueD</object-name>
    <property>gear/gear[2]/compression-norm</property>
    <interpolation>
      <entry><ind> 0 </ind><dep> 0.0 </dep></entry>
      <entry><ind> 1 </ind><dep> 0.3 </dep></entry>
    </interpolation>
    <axis>
      <x> 0 </x>
      <y> 0 </y>
      <z> 1 </z>
    </axis>
  </animation>

  <!-- Rotation des roues lors du roulage -->
  <animation>
    <type>spin</type>
    <object-name>roueA</object-name>
    <property>gear/gear[0]/rollspeed-ms</property>
    <factor> 30 </factor>
    <center>
    <x-m> -4.811 </x-m>
    <y-m>  0.000 </y-m>
    <z-m> -1.670 </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>
    <factor> 30 </factor>
    <center>
      <x-m> -0.857 </x-m>
      <y-m> -1.001 </y-m>
      <z-m> -1.670 </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> -0.857 </x-m>
      <y-m>  1.001 </y-m>
      <z-m> -1.670 </z-m>
    </center>
    <axis>
      <x>  0 </x>
      <y> -1 </y>
      <z>  0 </z>
    </axis>
  </animation>

  <!-- Ajout des effets lumineux -->
  <model>
    <path>Aircraft/Dauphin/Models/light/beacon.xml</path>
    <offsets>
      <x-m> 5.925 </x-m>
      <y-m> 0.000 </y-m>
      <z-m> 2.086 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/Dauphin/Models/light/beacon.xml</path>
    <offsets>
      <x-m> -2.682 </x-m>
      <y-m>  0.000 </y-m>
      <z-m> -1.482 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/Dauphin/Models/light/RedLight.xml</path>
    <offsets>
      <x-m> -2.683 </x-m>
      <y-m> -1.000 </y-m>
      <z-m> -1.215 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/Dauphin/Models/light/GreenLight.xml</path>
    <offsets>
      <x-m> -2.683 </x-m>
      <y-m>  1.000 </y-m>
      <z-m> -1.215 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/Dauphin/Models/light/StrobeWhite.xml</path>
    <offsets>
      <x-m> -2.483 </x-m>
      <y-m> -1.000 </y-m>
      <z-m> -1.215 </z-m>
    </offsets>
  </model>

  <model>
    <path>Aircraft/Dauphin/Models/light/StrobeWhite.xml</path>
    <offsets>
      <x-m> -2.483 </x-m>
      <y-m>  1.000 </y-m>
      <z-m> -1.215 </z-m>
    </offsets>
  </model>

</PropertyList>

