Skip to content

Commit 469bec1

Browse files
committed
Merge branch '4.3-beta' into c3
2 parents f8e6b4a + d08748e commit 469bec1

File tree

98 files changed

+3623
-2832
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+3623
-2832
lines changed

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@
272272
- **Additions**
273273
- Added `Slider` and `SliderData` classes for slider constraints
274274
- Added `SliderTimeline` and `SliderMixTimeline` for animating sliders
275-
- Added new pose system with `BoneLocal`, `BonePose`, and related classes
275+
- Added new pose system with `BonePose` and related classes
276276
- Added `IPose`, `Posed`, and `PosedActive` base classes for unified pose management
277277
- Added `IConstraintTimeline` interface for unified constraint timeline indexing
278278
- Added `Animation.Bones` property to get bone indices used by an animation
@@ -387,6 +387,19 @@
387387
- Renamed timeline constraint index methods to use unified `ConstraintIndex` property
388388
- Reorganized timeline class hierarchy with new base classes
389389
- Removed `AtlasAttachmentLoader` method `AtlasRegion FindRegion(string name)` from public interface. Added `protected AtlasRegion FindRegion(string name, string path)` instead which may be overridden instead when deriving your own subclass.
390+
- Renamed `Skin.SkinEntry.Name` to `Skin.SkinEntry.PlaceholderName` to better match Spine editor terminology.
391+
- Removed `TrackEntry.HoldPrevious` and `TrackEntry.InterruptAlpha`. New `AnimationState` hold system automatically calculates the required state values.
392+
- Removed `BoneLocal` class. `BonePose` now directly implements `IPose<BonePose>` and contains all local pose fields. Replace any use of `BoneLocal``BonePose`.
393+
- `EventData` no longer stores `Int`, `Float`, `String`, `Volume`, and `Balance` properties directly. Use `EventData.SetupPose` to access the setup pose `Event` which provides these properties instead.
394+
||||
395+
|-----|-|-----|
396+
| `EventData.Int` || `EventData.SetupPose.Int` |
397+
| `EventData.Float` || `EventData.SetupPose.Float` |
398+
| `EventData.String` || `EventData.SetupPose.String` |
399+
| `EventData.Volume` || `EventData.SetupPose.Volume` |
400+
| `EventData.Balance` || `EventData.SetupPose.Balance` |
401+
- `Timeline.PropertyIds` type changed from `string[]` to `ulong[]`. `Animation.HasTimeline()` parameter and Timeline constructors changed accordingly.
402+
- `Skeleton.DrawOrder` type changed from `ExposedList<Slot>` to `DrawOrder` class. Use `Skeleton.DrawOrder.AppliedPose` for rendering and `Skeleton.DrawOrder.Pose` for changing the draw order.
390403

391404
### Unity
392405

@@ -409,6 +422,7 @@
409422
- Renamed `ToAtlasRegionPMAClone` to `ToAtlasRegionWithNewPMATexture`.
410423
- Renamed `ToRegionAttachmentPMAClone` to `ToRegionAttachmentWithNewPMATexture`.
411424
- Removed support for long abandoned thirdparty asset "2D Toolkit" (TK2D) by Unikron Software.
425+
- Removed Spine Timeline `Spine Animation State Clip` property `Hold Previous`. New `AnimationState` hold system automatically calculates the required state values.
412426

413427
- **Changes of default values**
414428
- Changed default atlas texture workflow from PMA to straight alpha textures. This move was done because straight alpha textures are compatible with both Gamma and Linear color space, with the latter being the default for quite some time now in Unity. Note that `PMA Vertex Color` is unaffected and shall be enabled as usual to allow for single-pass additive rendering.

spine-csharp/src/Animation.cs

Lines changed: 739 additions & 980 deletions
Large diffs are not rendered by default.

spine-csharp/src/AnimationState.cs

Lines changed: 206 additions & 287 deletions
Large diffs are not rendered by default.

spine-csharp/src/AnimationStateData.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
namespace Spine {
3434

35-
/// <summary>Stores mix (crossfade) durations to be applied when AnimationState animations are changed.</summary>
35+
/// <summary>Stores mix (crossfade) durations to be applied when <see cref="AnimationState"/> animations are changed on the same track.</summary>
3636
public class AnimationStateData {
3737
internal SkeletonData skeletonData;
3838
readonly Dictionary<AnimationPair, float> animationToMixTime = new Dictionary<AnimationPair, float>(AnimationPairComparer.Instance);
@@ -70,8 +70,8 @@ public void SetMix (Animation from, Animation to, float duration) {
7070
}
7171

7272
/// <summary>
73-
/// The mix duration to use when changing from the specified animation to the other,
74-
/// or the DefaultMix if no mix duration has been set.
73+
/// Returns the mix duration to use when changing from the specified animation to the other on the same track,
74+
/// or the <see cref="DefaultMix"/> if no mix duration has been set.
7575
/// </summary>
7676
public float GetMix (Animation from, Animation to) {
7777
if (from == null) throw new ArgumentNullException("from", "from cannot be null.");

spine-csharp/src/Attachments/AtlasAttachmentLoader.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,13 @@
3232
namespace Spine {
3333

3434
/// <summary>
35-
/// An AttachmentLoader that configures attachments using texture regions from an Atlas.
35+
/// An <see cref="AttachmentLoader"/> that configures attachments using texture regions from an <see cref="Atlas"/>.
3636
/// See <a href='http://esotericsoftware.com/spine-loading-skeleton-data#JSON-and-binary-data'>Loading Skeleton Data</a> in the Spine Runtimes Guide.
3737
/// </summary>
3838
public class AtlasAttachmentLoader : AttachmentLoader {
3939
private Atlas[] atlasArray;
40+
/// <summary>If true, <see cref="FindRegion(string, string)"/> may return null. If false, an error is raised if the texture region is not
41+
/// found. Default is false.</summary>
4042
public bool allowMissingRegions;
4143

4244
public AtlasAttachmentLoader (params Atlas[] atlasArray)
@@ -49,13 +51,17 @@ public AtlasAttachmentLoader (bool allowMissingRegions, params Atlas[] atlasArra
4951
this.allowMissingRegions = allowMissingRegions;
5052
}
5153

54+
/// <summary>Sets each <see cref="Sequence.Regions"/> by calling <see cref="FindRegion(string, string)"/> for each texture region using
55+
/// <see cref="Sequence.GetPath(string, int)"/>.</summary>
5256
protected void FindRegions (string name, string basePath, Sequence sequence) {
5357
TextureRegion[] regions = sequence.Regions;
5458
for (int i = 0, n = regions.Length; i < n; i++) {
5559
regions[i] = FindRegion(name, sequence.GetPath(basePath, i));
5660
}
5761
}
5862

63+
/// <summary>Looks for the region with the specified path. If not found and <see cref="allowMissingRegions"/> is false, an error is
64+
/// raised.</summary>
5965
protected AtlasRegion FindRegion (string name, string path) {
6066
for (int i = 0; i < atlasArray.Length; i++) {
6167
AtlasRegion region = atlasArray[i].FindRegion(path);

spine-csharp/src/Attachments/Attachment.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131

3232
namespace Spine {
3333

34-
/// <summary>The base class for all attachments.</summary>
34+
/// <summary>The base class for all attachments. Multiple <see cref="Skeleton"/> instances, slots, or skins can use the same
35+
/// attachments.</summary>
3536
abstract public class Attachment {
3637
internal Attachment timelineAttachment;
3738

spine-csharp/src/Attachments/ClippingAttachment.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ namespace Spine {
3333
public class ClippingAttachment : VertexAttachment {
3434
internal SlotData endSlot;
3535

36+
/// <summary>Clipping is performed between the clipping attachment's slot and the end slot. If null, clipping is done until the end of
37+
/// the skeleton's rendering.</summary>
3638
public SlotData EndSlot { get { return endSlot; } set { endSlot = value; } }
3739

3840
public ClippingAttachment (string name) : base(name) {

spine-csharp/src/Attachments/IHasSequence.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,15 @@ namespace Spine {
3636
using Color32F = UnityEngine.Color;
3737
#endif
3838

39+
/// <summary>Interface for an attachment that gets 1 or more texture regions from a <see cref="Sequence"/>.</summary>
3940
public interface IHasSequence {
41+
/// <summary>The base path for the attachment's texture region.</summary>
4042
string Path { get; set; }
43+
/// <summary>The color the attachment is tinted, to be combined with <see cref="SlotPose.Color"/>.</summary>
4144
Color32F GetColor ();
4245
void SetColor (Color32F color);
4346
void SetColor (float r, float g, float b, float a);
47+
/// <summary>The sequence that provides texture regions, UVs, and vertex offsets for rendering this attachment.</summary>
4448
Sequence Sequence { get; }
4549
void UpdateSequence ();
4650
}

spine-csharp/src/Attachments/MeshAttachment.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ public MeshAttachment ParentMesh {
9494

9595
// Nonessential.
9696
/// <summary>
97-
/// Vertex index pairs describing edges for controlling triangulation, or be null if nonessential data was not exported. Mesh
98-
/// triangles never cross edges. Triangulation is not performed at runtime.
97+
/// Vertex index pairs describing edges for controlling triangulation, or null if nonessential data was not exported. Mesh
98+
/// triangles do not cross edges. Triangulation is not performed at runtime.
9999
/// </summary>
100100
public int[] Edges { get; set; }
101101
public float Width { get; set; }

spine-csharp/src/Attachments/PathAttachment.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public class PathAttachment : VertexAttachment {
3939
public float[] Lengths { get { return lengths; } set { lengths = value; } }
4040
/// <summary>If true, the start and end knots are connected.</summary>
4141
public bool Closed { get { return closed; } set { closed = value; } }
42-
/// <summary>If true, additional calculations are performed to make computing positions along the path more accurate and movement along
43-
/// the path have a constant speed.</summary>
42+
/// <summary>If true, additional calculations are performed to make computing positions along the path more accurate so movement along
43+
/// the path has a constant speed.</summary>
4444
public bool ConstantSpeed { get { return constantSpeed; } set { constantSpeed = value; } }
4545

4646
public PathAttachment (String name)

0 commit comments

Comments
 (0)