1
0
Fork 0
fgdata/Aircraft/Generic/Human/Models/equipment/flashlight.xml
TheFGFSEagle edf4077402 Add compositor flashlight to the walker to replace the ALS one from Effects/model-combined
See: https://sourceforge.net/p/flightgear/codetickets/2853/

Squashed commit of the following:

commit 28d4891e613f0ec14e13da2db3a1dd294ef0d922
Author: hbeni <beni@hallinger.org>
Date:   Tue Jan 9 08:03:40 2024 +0100

    Walker menu item label changed

    fix #2655
    see: https://sourceforge.net/p/flightgear/codetickets/2655/

commit 61adecd3b7d706ef13462e855ba9c141a8d0995b
Author: hbeni <beni@hallinger.org>
Date:   Mon Jan 8 08:43:36 2024 +0100

    Walker flashlight moved to own XML file and renamed colour-attributes to color

commit ef7c6119506368abc02d9ee0c239d6fa6b0ad6af
Author: hbeni <beni@hallinger.org>
Date:   Sun Jan 7 16:53:11 2024 +0100

    Walker/Flashlight: add CTRL+F as default keybind to toggle modes

commit 55d62498e5a86aa83d0447cce99ff054c0596076
Author: hbeni <beni@hallinger.org>
Date:   Sun Jan 7 16:25:45 2024 +0100

    Dimmed walker flashlight, so it better corresponds to the old c172 one

commit 0c8bc8a6c1c6c07308ddfb4d73ca6cf92fe40cae
Author: hbeni <beni@hallinger.org>
Date:   Sun Jan 7 14:46:47 2024 +0100

    Walker: Add a flashlight

    This adds a compositor based flashlight to the walker model.
    The flashlight currently has three modes: off/white/red.
    It can be toggled using the walker menu entry.
2024-01-09 22:24:09 +01:00

107 lines
3 KiB
XML

<!-- Compositor based flashlight for the walker -->
<!-- 1/2024 B. Hallinger -->
<PropertyList>
<light>
<name>walker_flashlight</name>
<type>spot</type>
<position>
<x-m><property>sim/walker/flashlight/pos-x-m</property></x-m>
<y-m><property>sim/walker/flashlight/pos-y-m</property></y-m>
<z-m><property>sim/walker/flashlight/pos-z-m</property></z-m>
</position>
<direction>
<pitch-deg>90</pitch-deg>
<roll-deg>0</roll-deg>
<heading-deg>0</heading-deg>
</direction>
<ambient>
<r><property>sim/walker/flashlight/color-red-factor</property></r>
<g><property>sim/walker/flashlight/color-green-factor</property></g>
<b><property>sim/walker/flashlight/color-blue-factor</property></b>
<a>1</a>
</ambient>
<diffuse>
<r><property>sim/walker/flashlight/color-red-factor</property></r>
<g><property>sim/walker/flashlight/color-green-factor</property></g>
<b><property>sim/walker/flashlight/color-blue-factor</property></b>
<a>1</a>
</diffuse>
<specular>
<r><property>sim/walker/flashlight/color-red-factor</property></r>
<g><property>sim/walker/flashlight/color-green-factor</property></g>
<b><property>sim/walker/flashlight/color-blue-factor</property></b>
<a>1</a>
</specular>
<attenuation>
<c>1.0</c>
<l>0.09</l>
<q>0.032</q>
</attenuation>
<dim-factor><property>sim/walker/flashlight/dim-factor</property></dim-factor>
<spot-exponent>45</spot-exponent>
<spot-cutoff>50</spot-cutoff>
<range-m>10</range-m>
</light>
<animation>
<type>select</type>
<object-name>walker_flashlight</object-name>
<condition>
<and>
<property>sim/walker/outside</property>
<greater-than>
<property>sim/walker/flashlight/mode</property>
<value>0</value>
</greater-than>
<equals>
<property>sim/current-view/name</property>
<value>Walk View</value>
</equals>
</and>
</condition>
</animation>
<animation>
<type>translate</type>
<object-name>walker_flashlight</object-name>
<property>sim/walker/flashlight/pos-x-m</property>
<axis>
<x>1</x>
<y>0</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>walker_flashlight</object-name>
<property>sim/walker/flashlight/pos-y-m</property>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
</animation>
<animation>
<type>translate</type>
<object-name>walker_flashlight</object-name>
<property>sim/walker/flashlight/pos-z-m</property>
<axis>
<x>0</x>
<y>0</y>
<z>1</z>
</axis>
</animation>
<animation>
<type>rotate</type>
<object-name>walker_flashlight</object-name>
<property>sim/current-view/pitch-offset-deg</property>
<center>
<x-m><property>sim/walker/flashlight/pos-x-m</property></x-m>
<y-m><property>sim/walker/flashlight/pos-y-m</property></y-m>
<z-m><property>sim/walker/flashlight/pos-z-m</property></z-m>
</center>
<axis>
<x>0</x>
<y>1</y>
<z>0</z>
</axis>
</animation>
</PropertyList>