Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for Fade Near and Far #220

Merged
merged 2 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xml_converter/doc/fade/distance_fade_end.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ applies_to: [Icon, Trail]
xml_fields: [FadeFar, DistanceFadeEnd]
protobuf_field: distance_fade_end
---
Any part of the object that is farther then this value will be at.
Any part of the object that is farther then this value will be at 0 alpha.

Notes
=====
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
</MarkerCategory>

<POIs>
<POI Type="mycategory" FadeFar="1.000000" FadeNear="0.000000" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="mycategory" FadeFar="3.140000" FadeNear="0.000000" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="mycategory" FadeFar="123.456001" FadeNear="0.000000" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<Trail Type="mycategory" FadeFar="3.140000" FadeNear="0.000000"/>
<POI Type="mycategory" FadeFar="3.141590" FadeNear="3.140000" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="mycategory" FadeFar="123.456001" FadeNear="3.140000" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<Trail Type="mycategory" FadeFar="3.141590" FadeNear="3.140000"/>
<POI Type="mycategory" FadeFar="0.000000" FadeNear="0.000000" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="mycategory" FadeFar="3.140000" FadeNear="0.000000" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<POI Type="mycategory" FadeFar="123.456001" FadeNear="0.000000" MapID="50" XPos="169.809998" YPos="210.649994" ZPos="215.830002"/>
<Trail Type="mycategory" FadeFar="3.140000" FadeNear="0.000000"/>
</POIs>
</OverlayData>
19 changes: 19 additions & 0 deletions xml_converter/intigration_tests/inputs/xml_fade/xml_file.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
</MarkerCategory>

<POIs>
<POI FadeNear="0" FadeFar="1" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI FadeNear="0" FadeFar="3.14" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI FadeNear="0" FadeFar="123.456" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<Trail FadeNear="0" FadeFar="3.14" Type="mycategory" />
<POI FadeNear="3.14" FadeFar="3.14159" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI FadeNear="3.14" FadeFar="123.456" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<Trail FadeNear="3.14" FadeFar="3.14159" Type="mycategory" />
<POI DistanceFadeStart="0" DistanceFadeEnd="0" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI DistanceFadeStart="0" DistanceFadeEnd="3.14" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<POI DistanceFadeStart="0" DistanceFadeEnd="123.456" Type="mycategory" XPos="169.81" YPos="210.65" ZPos="215.83" MapID="50" />
<Trail DistanceFadeStart="0" DistanceFadeEnd="3.14" Type="mycategory" />
<!-- TODO: Distance Fade Start and End should only be positive and Fade Near should be less than Fade Far -->
</POIs>
</OverlayData>
6 changes: 6 additions & 0 deletions xml_converter/intigration_tests/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@ class Testcase:
expected_output_xml_path="./expected_outputs/xml_is_wall",
expected_output_proto_path="./expected_outputs/proto_is_wall",
),
Testcase(
name="fade",
xml_input_paths=["./inputs/xml_fade"],
expected_output_xml_path="./expected_outputs/xml_fade",
expected_output_proto_path="./expected_outputs/proto_fade",
),
Testcase(
name="festival_filter",
xml_input_paths=["./inputs/xml_festival_filter"],
Expand Down