Skip to content
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## v0.16.15

- 修复 3.5 版本文件加载错误

## v0.16.14

- 优化 FFmpeg 导出速度
Expand Down
33 changes: 0 additions & 33 deletions Spine/Implementations/V35/Attachments/ClippingAttachment35.cs

This file was deleted.

32 changes: 0 additions & 32 deletions Spine/Implementations/V35/Attachments/PointAttachment35.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public override int ComputeWorldVertices(ISlot slot, ref float[] worldVertices)
if (slot is Slot35 st)
{
if (worldVertices.Length < 8) worldVertices = new float[8];
_o.ComputeWorldVertices(st.InnerObject.Bone, worldVertices, 0);
_o.ComputeWorldVertices(st.InnerObject.Bone, worldVertices);
return 8;
}
throw new ArgumentException($"Invalid slot type. Expected {nameof(Slot35)}, but received {slot.GetType().Name}", nameof(slot));
Expand Down
44 changes: 15 additions & 29 deletions Spine/Implementations/V35/SkeletonClipping35.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,45 +12,31 @@ namespace Spine.Implementations.V35
{
internal sealed class SkeletonClipping35 : ISkeletonClipping
{
private readonly SkeletonClipping _o = new();
public bool IsClipping => false;

public bool IsClipping => _o.IsClipping();
public float[] ClippedVertices { get; private set; } = [];

public float[] ClippedVertices => _o.ClippedVertices.Items;
public int ClippedVerticesLength { get; private set; } = 0;

public int ClippedVerticesLength => _o.ClippedVertices.Count;
public int[] ClippedTriangles { get; private set; } = [];

public int[] ClippedTriangles => _o.ClippedTriangles.Items;
public int ClippedTrianglesLength { get; private set; } = 0;

public int ClippedTrianglesLength => _o.ClippedTriangles.Count;
public float[] ClippedUVs { get; private set; } = [];

public float[] ClippedUVs => _o.ClippedUVs.Items;
public void ClipEnd(ISlot slot) { }

public void ClipTriangles(float[] vertices, int verticesLength, int[] triangles, int trianglesLength, float[] uvs)
=> _o.ClipTriangles(vertices, verticesLength, triangles, trianglesLength, uvs);
public void ClipEnd() { }

public void ClipStart(ISlot slot, IClippingAttachment clippingAttachment)
{
if (slot is Slot35 st && clippingAttachment is Attachments.ClippingAttachment35 att)
{
_o.ClipStart(st.InnerObject, att.InnerObject);
return;
}
throw new ArgumentException($"Received {slot.GetType().Name} {clippingAttachment.GetType().Name}");
}
public void ClipStart(ISlot slot, IClippingAttachment clippingAttachment) { }

public void ClipEnd(ISlot slot)
public void ClipTriangles(float[] vertices, int verticesLength, int[] triangles, int trianglesLength, float[] uvs)
{
if (slot is Slot35 st)
{
_o.ClipEnd(st.InnerObject);
return;
}
throw new ArgumentException($"Received {slot.GetType().Name}", nameof(slot));
ClippedVertices = vertices.ToArray();
ClippedVerticesLength = verticesLength;
ClippedTriangles = triangles.ToArray();
ClippedTrianglesLength = trianglesLength;
ClippedUVs = uvs.ToArray();
}

public void ClipEnd() => _o.ClipEnd();

public override string ToString() => _o.ToString();
}
}
8 changes: 4 additions & 4 deletions Spine/Implementations/V35/Slot35.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public Slot35(Slot innerObject, SpineObjectData35 data, Bone35 bone)
_bone = bone;
_blendMode = _o.Data.BlendMode switch
{
BlendMode.Normal => SFMLBlendMode.NormalPma,
BlendMode.Additive => SFMLBlendMode.AdditivePma,
BlendMode.Multiply => SFMLBlendMode.MultiplyPma,
BlendMode.Screen => SFMLBlendMode.ScreenPma,
BlendMode.normal => SFMLBlendMode.NormalPma,
BlendMode.additive => SFMLBlendMode.AdditivePma,
BlendMode.multiply => SFMLBlendMode.MultiplyPma,
BlendMode.screen => SFMLBlendMode.ScreenPma,
_ => throw new NotImplementedException($"{_o.Data.BlendMode}"),
};
}
Expand Down
2 changes: 0 additions & 2 deletions Spine/Implementations/V35/SpineObjectData35.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@ public SpineObjectData35(string skelPath, string atlasPath, TextureLoader textur
{
RegionAttachment regionAtt => new RegionAttachment35(regionAtt),
MeshAttachment meshAtt => new MeshAttachment35(meshAtt),
ClippingAttachment clipAtt => new ClippingAttachment35(clipAtt),
BoundingBoxAttachment bbAtt => new BoundingBoxAttachment35(bbAtt),
PathAttachment pathAtt => new PathAttachment35(pathAtt),
PointAttachment ptAtt => new PointAttachment35(ptAtt),
_ => throw new InvalidOperationException($"Unrecognized attachment type {att.GetType().FullName}")
};
}
Expand Down
2 changes: 1 addition & 1 deletion Spine/Spine.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<BaseOutputPath>$(SolutionDir)out</BaseOutputPath>
<OutputPath>$(BaseOutputPath)\$(Configuration)\$(PlatformTarget)</OutputPath>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<Version>0.16.14</Version>
<Version>0.16.15</Version>
</PropertyGroup>

<PropertyGroup>
Expand Down
Loading
Loading