Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
EliphasNUIT committed Jan 1, 2025
2 parents 889189a + 97a5cbd commit 61f45f5
Show file tree
Hide file tree
Showing 22 changed files with 72 additions and 77 deletions.
2 changes: 1 addition & 1 deletion GW2EIBuilders/GW2EIBuilders.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<LangVersion>12.0</LangVersion>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<Version>0.56.0</Version>
<Version>0.57.0</Version>
<Configurations>Debug;Release;NoRewards;Trace</Configurations>
</PropertyGroup>

Expand Down
4 changes: 2 additions & 2 deletions GW2EIBuilders/Resources/JS/CR-JS/decorations.js
Original file line number Diff line number Diff line change
Expand Up @@ -797,12 +797,12 @@ class BackgroundDrawable {

class MovingPlatformDrawable extends BackgroundDrawable {
constructor(params) {
super(start, end);
super(params);
this.positions = params.positions;
if (this.positions.length > 1) {
this.currentIndex = 0;
this.currentStart = Number.NEGATIVE_INFINITY;
this.currentEnd = positions[0][5];
this.currentEnd = this.positions[0][5];
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

internal class ActorOrientationDecoration : AttachedDecoration
{
internal class ActorOrientationDecorationMetadata : AttachedDecorationMetadata
public class ActorOrientationDecorationMetadata : AttachedDecorationMetadata
{

public override string GetSignature()
Expand All @@ -16,7 +16,7 @@ public override DecorationMetadataDescription GetCombatReplayMetadataDescription
return new ActorOrientationDecorationMetadataDescription(this);
}
}
internal class ActorOrientationDecorationRenderingData : AttachedDecorationRenderingData
public class ActorOrientationDecorationRenderingData : AttachedDecorationRenderingData
{
public ActorOrientationDecorationRenderingData((long, long) lifespan, AgentItem agent) : base(lifespan, new AgentConnector(agent))
{
Expand All @@ -36,10 +36,6 @@ public override DecorationRenderingDescription GetCombatReplayRenderingDescripti
}
}

internal ActorOrientationDecoration(ActorOrientationDecorationMetadata metadata, ActorOrientationDecorationRenderingData renderingData) : base (metadata, renderingData)
{
}

public ActorOrientationDecoration((long start, long end) lifespan, AgentItem agent) : base(new ActorOrientationDecorationMetadata(), new ActorOrientationDecorationRenderingData(lifespan, agent))
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

internal abstract class AttachedDecoration : Decoration
{
internal abstract class AttachedDecorationMetadata : _DecorationMetadata
public abstract class AttachedDecorationMetadata : _DecorationMetadata
{
}
internal abstract class AttachedDecorationRenderingData : _DecorationRenderingData
public abstract class AttachedDecorationRenderingData : _DecorationRenderingData
{
public readonly GeographicalConnector ConnectedTo;
public RotationConnector? RotationConnectedTo { get; protected set; }
Expand Down Expand Up @@ -37,7 +37,7 @@ public virtual void UsingSkillMode(SkillModeDescriptor? skill)
public RotationConnector? RotationConnectedTo => DecorationRenderingData.RotationConnectedTo;
public SkillModeDescriptor? SkillMode => DecorationRenderingData.SkillMode;

internal AttachedDecoration(AttachedDecorationMetadata metadata, AttachedDecorationRenderingData renderingData) : base(metadata, renderingData)
protected AttachedDecoration(AttachedDecorationMetadata metadata, AttachedDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}

Expand Down
6 changes: 3 additions & 3 deletions GW2EIEvtcParser/EIData/CombatReplay/Decorations/Decoration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

public abstract class Decoration
{
internal abstract class _DecorationMetadata
public abstract class _DecorationMetadata
{

public abstract string GetSignature();
Expand All @@ -13,7 +13,7 @@ internal abstract class _DecorationMetadata

}

internal abstract class _DecorationRenderingData
public abstract class _DecorationRenderingData
{
public readonly (long start, long end) Lifespan;

Expand All @@ -28,7 +28,7 @@ protected _DecorationRenderingData((long start, long end) lifespan)
internal readonly _DecorationRenderingData DecorationRenderingData;

public (long start, long end) Lifespan => DecorationRenderingData.Lifespan;
internal Decoration(_DecorationMetadata metaData, _DecorationRenderingData renderingData)
protected Decoration(_DecorationMetadata metaData, _DecorationRenderingData renderingData)
{
DecorationMetadata = metaData;
DecorationRenderingData = renderingData;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

internal class CircleDecoration : FormDecoration
{
internal class CircleDecorationMetadata : FormDecorationMetadata
public class CircleDecorationMetadata : FormDecorationMetadata
{
public readonly uint Radius;
public readonly uint MinRadius;
Expand All @@ -28,7 +28,7 @@ public override DecorationMetadataDescription GetCombatReplayMetadataDescription
return new CircleDecorationMetadataDescription(this);
}
}
internal class CircleDecorationRenderingData : FormDecorationRenderingData
public class CircleDecorationRenderingData : FormDecorationRenderingData
{
public CircleDecorationRenderingData((long, long) lifespan, GeographicalConnector connector) : base(lifespan, connector)
{
Expand All @@ -44,7 +44,7 @@ public override DecorationRenderingDescription GetCombatReplayRenderingDescripti
public uint MinRadius => DecorationMetadata.MinRadius;


internal CircleDecoration(CircleDecorationMetadata metadata, CircleDecorationRenderingData renderingData) : base(metadata, renderingData)
protected CircleDecoration(CircleDecorationMetadata metadata, CircleDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

internal class DoughnutDecoration : FormDecoration
{
internal class DoughnutDecorationMetadata : FormDecorationMetadata
public class DoughnutDecorationMetadata : FormDecorationMetadata
{
public readonly uint OuterRadius;
public readonly uint InnerRadius;
Expand All @@ -28,7 +28,7 @@ public override DecorationMetadataDescription GetCombatReplayMetadataDescription
return new DoughnutDecorationMetadataDescription(this);
}
}
internal class DoughnutDecorationRenderingData : FormDecorationRenderingData
public class DoughnutDecorationRenderingData : FormDecorationRenderingData
{
public DoughnutDecorationRenderingData((long, long) lifespan, GeographicalConnector connector) : base(lifespan, connector)
{
Expand All @@ -43,10 +43,6 @@ public override DecorationRenderingDescription GetCombatReplayRenderingDescripti
public uint OuterRadius => DecorationMetadata.OuterRadius;
public uint InnerRadius => DecorationMetadata.InnerRadius;

internal DoughnutDecoration(DoughnutDecorationMetadata metadata, DoughnutDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}

public DoughnutDecoration(uint innerRadius, uint outerRadius, (long start, long end) lifespan, string color, GeographicalConnector connector) : base(new DoughnutDecorationMetadata(color, innerRadius, outerRadius), new DoughnutDecorationRenderingData(lifespan, connector))
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

internal abstract class FormDecoration : AttachedDecoration
{
internal abstract class FormDecorationMetadata : AttachedDecorationMetadata
public abstract class FormDecorationMetadata : AttachedDecorationMetadata
{
public readonly string Color;

Expand All @@ -11,7 +11,7 @@ protected FormDecorationMetadata(string color)
Color = color;
}
}
internal abstract class FormDecorationRenderingData : AttachedDecorationRenderingData
public abstract class FormDecorationRenderingData : AttachedDecorationRenderingData
{
public bool Filled { get; private set; } = true;
public long GrowingEnd { get; private set; }
Expand Down Expand Up @@ -39,7 +39,7 @@ public virtual void UsingGrowingEnd(long growingEnd, bool reverse = false)
public long GrowingEnd => DecorationRenderingData.GrowingEnd;
public bool GrowingReverse => DecorationRenderingData.GrowingReverse;

internal FormDecoration(FormDecorationMetadata metadata, FormDecorationRenderingData renderingData) : base(metadata, renderingData)
protected FormDecoration(FormDecorationMetadata metadata, FormDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

internal class LineDecoration : FormDecoration
{
internal class LineDecorationMetadata : FormDecorationMetadata
public class LineDecorationMetadata : FormDecorationMetadata
{
public bool WorldSizeThickness;
public uint Thickness;
Expand All @@ -29,7 +29,7 @@ public override DecorationMetadataDescription GetCombatReplayMetadataDescription
return new LineDecorationMetadataDescription(this);
}
}
internal class LineDecorationRenderingData : FormDecorationRenderingData
public class LineDecorationRenderingData : FormDecorationRenderingData
{
public readonly GeographicalConnector ConnectedFrom;
public LineDecorationRenderingData((long, long) lifespan, GeographicalConnector connector, GeographicalConnector targetConnector) : base(lifespan, connector)
Expand All @@ -54,10 +54,6 @@ public override DecorationRenderingDescription GetCombatReplayRenderingDescripti
public bool WorldSizeThickness => DecorationMetadata.WorldSizeThickness;
public uint Thickness => DecorationMetadata.Thickness;

internal LineDecoration(LineDecorationMetadata metadata, LineDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}

public LineDecoration((long start, long end) lifespan, string color, GeographicalConnector connector, GeographicalConnector targetConnector) : base(new LineDecorationMetadata(color), new LineDecorationRenderingData(lifespan, connector, targetConnector))
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

internal class PieDecoration : CircleDecoration
{
internal class PieDecorationMetadata : CircleDecorationMetadata
public class PieDecorationMetadata : CircleDecorationMetadata
{
public readonly float OpeningAngle; //in degrees

Expand All @@ -30,7 +30,7 @@ public override DecorationMetadataDescription GetCombatReplayMetadataDescription
return new PieDecorationMetadataDescription(this);
}
}
internal class PieDecorationRenderingData : CircleDecorationRenderingData
public class PieDecorationRenderingData : CircleDecorationRenderingData
{
public PieDecorationRenderingData((long, long) lifespan, GeographicalConnector connector) : base(lifespan, connector)
{
Expand All @@ -44,10 +44,6 @@ public override DecorationRenderingDescription GetCombatReplayRenderingDescripti
private new PieDecorationMetadata DecorationMetadata => (PieDecorationMetadata)base.DecorationMetadata;
public float OpeningAngle => DecorationMetadata.OpeningAngle;

internal PieDecoration(PieDecorationMetadata metadata, PieDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}

//using arcs rotation argument as Input (cone in facing direction). Y direction is reversed due to different axis definitions for arc and javascript

public PieDecoration(uint radius, float openingAngle, (long start, long end) lifespan, string color, GeographicalConnector connector) : base(new PieDecorationMetadata(color, radius, 0, openingAngle), new PieDecorationRenderingData(lifespan, connector))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

internal class RectangleDecoration : FormDecoration
{
internal class RectangleDecorationMetadata : FormDecorationMetadata
public class RectangleDecorationMetadata : FormDecorationMetadata
{
public readonly uint Height;
public readonly uint Width;
Expand All @@ -24,7 +24,7 @@ public override DecorationMetadataDescription GetCombatReplayMetadataDescription
return new RectangleDecorationMetadataDescription(this);
}
}
internal class RectangleDecorationRenderingData : FormDecorationRenderingData
public class RectangleDecorationRenderingData : FormDecorationRenderingData
{
public RectangleDecorationRenderingData((long, long) lifespan, GeographicalConnector connector) : base(lifespan, connector)
{
Expand All @@ -39,10 +39,6 @@ public override DecorationRenderingDescription GetCombatReplayRenderingDescripti
public uint Height => DecorationMetadata.Height;
public uint Width => DecorationMetadata.Width;

internal RectangleDecoration(RectangleDecorationMetadata metadata, RectangleDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}

public RectangleDecoration(uint width, uint height, (long start, long end) lifespan, string color, GeographicalConnector connector) : base(new RectangleDecorationMetadata(color, width, height), new RectangleDecorationRenderingData(lifespan, connector))
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

internal class BackgroundIconDecoration : ImageDecoration
{
internal class BackgroundIconDecorationMetadata : ImageDecorationMetadata
public class BackgroundIconDecorationMetadata : ImageDecorationMetadata
{

public BackgroundIconDecorationMetadata(string icon, uint pixelSize, uint worldSize) : base(icon, pixelSize, worldSize)
Expand All @@ -20,7 +20,7 @@ public override DecorationMetadataDescription GetCombatReplayMetadataDescription
return new BackgroundIconDecorationMetadataDescription(this);
}
}
internal class BackgroundIconDecorationRenderingData : ImageDecorationRenderingData
public class BackgroundIconDecorationRenderingData : ImageDecorationRenderingData
{
public readonly IReadOnlyList<ParametricPoint1D> Opacities;
public readonly IReadOnlyList<ParametricPoint1D> Heights;
Expand All @@ -43,9 +43,6 @@ public override DecorationRenderingDescription GetCombatReplayRenderingDescripti
public IReadOnlyList<ParametricPoint1D> Opacities => DecorationRenderingData.Opacities;
public IReadOnlyList<ParametricPoint1D> Heights => DecorationRenderingData.Heights;

internal BackgroundIconDecoration(BackgroundIconDecorationMetadata metadata, BackgroundIconDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}
public BackgroundIconDecoration(string icon, uint pixelSize, uint worldSize, IEnumerable<ParametricPoint1D> opacities, IEnumerable<ParametricPoint1D> heights, (long start, long end) lifespan, GeographicalConnector connector) : base(new BackgroundIconDecorationMetadata(icon, pixelSize, worldSize), new BackgroundIconDecorationRenderingData(lifespan, opacities, heights, connector))
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

internal class IconDecoration : ImageDecoration
{
internal class IconDecorationMetadata : ImageDecorationMetadata
public class IconDecorationMetadata : ImageDecorationMetadata
{
public readonly float Opacity;

Expand All @@ -23,7 +23,7 @@ public override DecorationMetadataDescription GetCombatReplayMetadataDescription
return new IconDecorationMetadataDescription(this);
}
}
internal class IconDecorationRenderingData : ImageDecorationRenderingData
public class IconDecorationRenderingData : ImageDecorationRenderingData
{
public bool IsSquadMarker { get; private set; }
public IconDecorationRenderingData((long, long) lifespan, GeographicalConnector connector) : base(lifespan, connector)
Expand All @@ -44,7 +44,7 @@ public override DecorationRenderingDescription GetCombatReplayRenderingDescripti
public float Opacity => DecorationMetadata.Opacity;
public bool IsSquadMarker => DecorationRenderingData.IsSquadMarker;

internal IconDecoration(IconDecorationMetadata metadata, IconDecorationRenderingData renderingData) : base(metadata, renderingData)
protected IconDecoration(IconDecorationMetadata metadata, IconDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace GW2EIEvtcParser.EIData;

internal class IconOverheadDecoration : IconDecoration
{
internal class IconOverheadDecorationMetadata : IconDecorationMetadata
public class IconOverheadDecorationMetadata : IconDecorationMetadata
{


Expand All @@ -21,7 +21,7 @@ public override DecorationMetadataDescription GetCombatReplayMetadataDescription
return new IconOverheadDecorationMetadataDescription(this);
}
}
internal class IconOverheadDecorationRenderingData : IconDecorationRenderingData
public class IconOverheadDecorationRenderingData : IconDecorationRenderingData
{
public IconOverheadDecorationRenderingData((long, long) lifespan, GeographicalConnector connector) : base(lifespan, connector)
{
Expand All @@ -35,9 +35,6 @@ public override DecorationRenderingDescription GetCombatReplayRenderingDescripti
return new IconOverheadDecorationRenderingDescription(log, this, map, usedSkills, usedBuffs, metadataSignature);
}
}
internal IconOverheadDecoration(IconOverheadDecorationMetadata metadata, IconOverheadDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}
public IconOverheadDecoration(string icon, uint pixelSize, float opacity, (long start, long end) lifespan, AgentConnector connector) : base(new IconOverheadDecorationMetadata(icon, pixelSize, Math.Min(connector.Agent.HitboxWidth / 2, 250), opacity), new IconOverheadDecorationRenderingData(lifespan, connector))
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

internal abstract class ImageDecoration : AttachedDecoration
{
internal abstract class ImageDecorationMetadata : AttachedDecorationMetadata
public abstract class ImageDecorationMetadata : AttachedDecorationMetadata
{
public readonly string Image;
public readonly uint PixelSize;
Expand All @@ -18,7 +18,7 @@ protected ImageDecorationMetadata(string icon, uint pixelSize, uint worldSize) :
}
}
}
internal abstract class ImageDecorationRenderingData : AttachedDecorationRenderingData
public abstract class ImageDecorationRenderingData : AttachedDecorationRenderingData
{
protected ImageDecorationRenderingData((long, long) lifespan, GeographicalConnector connector) : base(lifespan, connector)
{
Expand All @@ -29,7 +29,7 @@ protected ImageDecorationRenderingData((long, long) lifespan, GeographicalConnec
public uint PixelSize => DecorationMetadata.PixelSize;
public uint WorldSize => DecorationMetadata.WorldSize;

internal ImageDecoration(ImageDecorationMetadata metadata, ImageDecorationRenderingData renderingData) : base(metadata, renderingData)
protected ImageDecoration(ImageDecorationMetadata metadata, ImageDecorationRenderingData renderingData) : base(metadata, renderingData)
{
}
}
Loading

0 comments on commit 61f45f5

Please sign in to comment.