Skip to content

Commit

Permalink
Implement vectorization of all assets
Browse files Browse the repository at this point in the history
  • Loading branch information
CarbonNeuron committed Feb 10, 2021
1 parent 904e343 commit ef2bf50
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
16 changes: 8 additions & 8 deletions AUCapture-WPF/Controls/PlayerControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@
</auCaptureWpf:BasePlayerGenerator.Alive>
</auCaptureWpf:BasePlayerGenerator>

<controls:CachedImage
<svgc:SvgViewbox
x:Name="Pants"
Width="148"
Height="198"
Margin="0,0,0,0"
VerticalAlignment="Bottom"
Panel.ZIndex="1"
Stretch="Uniform">
<controls:CachedImage.ImageUrl>
<svgc:SvgViewbox.StreamSource>
<MultiBinding Converter="{StaticResource PantsConverter}">
<Binding
Delay="100"
Expand All @@ -78,8 +78,8 @@
IsAsync="True"
Path="AliveStatus" />
</MultiBinding>
</controls:CachedImage.ImageUrl>
</controls:CachedImage>
</svgc:SvgViewbox.StreamSource>
</svgc:SvgViewbox>
<svgc:SvgViewbox
Width="212"
Margin="0,0,0,0"
Expand All @@ -101,13 +101,13 @@
</MultiBinding>
</svgc:SvgViewbox.StreamSource>
</svgc:SvgViewbox>
<controls:CachedImage
<svgc:SvgViewbox
Width="212"
Margin="0,0,0,0"
VerticalAlignment="Bottom"
Panel.ZIndex="1"
Stretch="Uniform">
<controls:CachedImage.ImageUrl>
<svgc:SvgViewbox.StreamSource>
<MultiBinding Converter="{StaticResource PetToIm}">
<Binding
Delay="100"
Expand All @@ -120,8 +120,8 @@
IsAsync="True"
Path="AliveStatus" />
</MultiBinding>
</controls:CachedImage.ImageUrl>
</controls:CachedImage>
</svgc:SvgViewbox.StreamSource>
</svgc:SvgViewbox>
</Grid>
</Viewbox>

Expand Down
2 changes: 1 addition & 1 deletion AUCapture-WPF/Converters/HatToImage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
return null;
}
var finalName = hatID + "-" + Hats[(hatID%95).ToString()];
var stream = FileCache.Hit("https://carbun.xyz/CDN/1-1.svg");
var stream = FileCache.Hit($"https://carbun.xyz/CDN/SVGHats/{finalName}.svg");
return stream;
}

Expand Down
7 changes: 4 additions & 3 deletions AUCapture-WPF/Converters/PantsConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Windows.Data;
using System.Windows.Media.Imaging;
using AmongUsCapture;
using AUCapture_WPF.Controls;

namespace AUCapture_WPF.Converters
{
Expand All @@ -21,11 +22,11 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
var alive = values[1] as bool? ?? false;
if (pantID == 0)
{
return "";
return null;
}
return !alive
? ""
: $"https://cdn.automute.us/Pants/{pantID}.png";
? null
: FileCache.Hit($"https://carbun.xyz/CDN/SVGPants/{pantID}.svg");;
}

return "";
Expand Down
10 changes: 7 additions & 3 deletions AUCapture-WPF/Converters/PetToImageConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using AUCapture_WPF.Controls;

namespace AUCapture_WPF.Converters
{
Expand All @@ -19,11 +20,14 @@ public object Convert(object[] values, Type targetType, object parameter, Cultur
var alive = values[1] as bool? ?? false;
if (petID == 0)
{
return "";
return null;
}
return !alive
? ""
: $"https://cdn.automute.us/Pets/{petID}.png";
? null
: FileCache.Hit($"https://carbun.xyz/CDN/SVGPets/{petID}.svg");
//return !alive
// ? null
// : $"https://cdn.automute.us/Pets/{petID}.png";
}


Expand Down

0 comments on commit ef2bf50

Please sign in to comment.