118 KiB
3.8
AS3
-
Breaking changes
- Renamed
Slot#getAttachmentVertices()toSlot#getDeform(). - Changed the
.jsoncurve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin#addAttachment()toSkin#setAttachment(). - Removed
VertexAttachment#applyDeform()and replaced it withVertexAttachment#deformAttachment. The attachment set on this field is used to decide if aDeformTimelineshould be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeformfield, getter, and setter fromMeshAttachment. - Changed
.skelbinary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.jsonand.skelfile formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes. - Switched projects from FDT to Visual Studio Code. See updated
README.mdfiles for instructions.
- Renamed
-
Additions
- Added
SkeletonBinaryto load binary.skelfiles. SeeMixAndMatchExample.asinspine-startling-example. - Added
xandycoordinates for setup pose AABB inSkeletonData. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin#getAttachments(). Returns all attachments in the skin. - Added
Skin#getAttachments(int slotIndex). Returns all attachements in the skin for the given slot index. - Added
Skin#addSkin(Skin skin). Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin#copySkin(Skin skin). Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachmentare shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment#copy()to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment#newLinkedMesh(), creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
Starling
- Added
MixAndMatchExample.asto demonstrate the new Skin API additions and how to load binary.skelfiles. - Switched projects from FDT to Visual Studio Code. See updated
README.mdfiles for instructions.
C
-
Breaking changes
- Renamed
spSlot#attachmentVerticestospSlot#deform. - Changed the
.jsoncurve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
spSkin_addAttachment()toSkin#spSkin_addAttachment(). - Removed
spVertexAttachment_applyDeform()and replaced it withVertexAttachment#deformAttachment. The attachment set on this field is used to decide if aspDeformTimelineshould be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeformfield, getter, and setter fromspMeshAttachment. - Changed
.skelbinary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.jsonand.skelfile formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Renamed
-
Additions
- Added
xandycoordinates for setup pose AABB inspSkeletonData. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
spSkin_getAttachments(). Returns all attachments in the skin. - Added
spSkin_getAttachments(int slotIndex). Returns all attachements in the skin for the given slot index. - Added
spSkin_addSkin(spSkin* skin). Adds all attachments, bones, and skins from the specified skin to this skin. - Added
spSkin_copySkin(spSkin* skin). Adds all attachments, bones, and skins from the specified skin to this skin.spVertexAttachmentare shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied. - All attachments inserted into skins are reference counted. When the last skin referencing an attachment is disposed, the attachment will also be disposed.
- Added
- Added
spAttachment_copy()to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
spMeshAttachment_newLinkedMesh(), creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
Cocos2d-Objc
- Added mix-and-match example to demonstrate the new Skin API.
- Added
IKExample. - Added
SkeletonAnimation preUpdateWorldTransformsListenerandSkeletonAnimation postUpdateWorldTransformsListener. When set, these callbacks will be invokved before and after the skeleton'supdateWorldTransforms()method is called. See theIKExamplehow it can be used.
SFML
- Added mix-and-match example to demonstrate the new Skin API.
- Added
IKExample.
C++
-
Breaking Changes
- Renamed
Slot::getAttachmentVertices()toSlot::getDeform(). - Changed the
.jsoncurve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin::addAttachment()toSkin::setAttachment(). - Removed
VertexAttachment::applyDeform()and replaced it withVertexAttachment::getDeformAttachment(). The attachment set on this field is used to decide if aDeformTimelineshould be applied to the attachment active on the slot to which the timeline is applied. - Removed
_inheritDeformfield, getter, and setter fromMeshAttachment. - Changed
.skelbinary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.jsonand.skelfile formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Renamed
-
Additions
AnimationStateandTrackEntrynow also accept a subclass ofAnimationStateListenerObjectas a listener for animation events in the overloadedsetListener()method.SkeletonBinaryandSkeletonJsonnow parse and set all non-essential data like audio path.- Added
xandycoordinates for setup pose AABB inSkeletonData. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin#getAttachments(). Returns all attachments in the skin. - Added
Skin#getAttachments(int slotIndex). Returns all attachements in the skin for the given slot index. - Added
Skin#addSkin(Skin &skin). Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin#copySkin(Skin &skin). Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachmentare shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied. - All attachments inserted into skins are reference counted. When the last skin referencing an attachment is disposed, the attachment will also be disposed.
- Added
- Added
Attachment#copy()to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment#newLinkedMesh(), creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Exposed
xandyonSkeletonDatathrough getters and setters.
Cocos2d-x
- Updated to cocos2d-x 3.17.1
- Added mix-and-match example to demonstrate the new Skin API.
- Exmaple project requires Visual Studio 2019 on Windows
- Added
IKExample. - Added
SkeletonAnimation::setPreUpdateWorldTransformsListener()andSkeletonAnimation::setPreUpdateWorldTransformsListener(). When set, these callbacks will be invokved before and after the skeleton'supdateWorldTransforms()method is called. See theIKExamplehow it can be used.
SFML
- Added mix-and-match example to demonstrate the new Skin API.
UE4
- Added
bAutoPlayingflag toUSpineSkeletonAnimationComponent. Whenfalse, the component will not update the internal animation state and skeleton. - Updated example project to UE 4.22.
- (Re-)Importing Spine assets will perform a version compatibility check and alert users about mismatches in editor mode.
USpineSkeletonRendererComponentallows passing aUSpineSkeletonComponentto update it. This way, the renderer component can be used without a skeleton component on the same actor.- Added blueprint-callable methods to
SpineSkeletonComponentandSpineSkeletonAnimationComponentto query and set skins, and enumerate bones, slots, and animations. - Extended skeleton data editor preview. The preview now shows bones, slots, animations, and skins found in the skeleton data. See this blog post.
- Added preview animation and skin fields, allowing you to preview animations and skins right in the editor. See this blog post.
- Removed dependency on
RHI,RenderCore, andShaderCore. - Re-importing atlases and their textures now works consistently in all situations.
- Added mix-and-match example to demonstrate the new Skin API.
- Materials on
SkeletonRendererComponentare now blueprint read and writeable. This allows setting dynamic material instances at runtime. - Added
InitialSkinproperty toUSpineWidget. This allows previewing different skins in the UMG Designer. Initial skins can still be overridden via blueprint events such asOn Initialized.
C#
-
Breaking changes
- Changed
IkConstraintData.Bonestype fromList<BoneData>toExposedList<BoneData>for unification reasons. Note: this modification will most likely not affect user code. - Renamed
Slot.AttachmentVerticestoSlot.Deform. - Changed the
.jsoncurve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin.AddAttachment()toSkin.SetAttachment(). - Removed
FindAttachmentsForSlot(int slotIndex, List<Attachment> attachments)andFindNamesForSlot (int slotIndex, List<string> names)and replaced it withSkin.GetAttachments(int slotIndex, List<SkinEntry> attachments)which returns the combinedSkinEntryobject holding both name and attachment. - Removed
VertexAttachment.ApplyDeform()and replaced it withVertexAttachment.DeformAttachment. The attachment set on this field is used to decide if aDeformTimelineshould be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeformfield, getter, and setter fromMeshAttachment. - Changed
.skelbinary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.jsonand.skelfile formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Changed
-
Additions
- Added
xandycoordinates for setup pose AABB inSkeletonData. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin.GetAttachments(). Returns all attachments in the skin. - Added
Skin.GetAttachments(int slotIndex, List<SkinEntry> attachments). Returns all attachements in the skin for the given slot index. This method replacesFindAttachmentsForSlotandFindNamesForSlot. - Added
Skin.AddSkin(Skin skin). Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin.CopySkin(Skin skin). Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachmentare shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment.Copy()to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment.NewLinkedMesh(), creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
Unity
-
Breaking changes
- Officially supported Unity versions are 2017.1-2020.2.
- Spine
.asmdeffiles are again active by default. They have previously been deactivated to.txtextension which is now no longer necessary. - Removed PoseSkeleton() and PoseWithAnimation() extension methods to prevent issues where animations are not mixed out. Problem was that these methods did not set AnimationState, leaving incorrect state at e.g. attachments enabled at slots when starting subsequent animations. As a replacement you can use
AnimationState.ClearTrack(0);followed byvar entry = AnimationState.SetAnimation(0, animation, loop); entry.TrackTime = timeto achieve similar behaviour. - The
Shadow alpha cutoffshader parameter is now respecting slot-color alpha values at all Spine shaders. A fragment's texture color alpha is multiplied with slot-color alpha before the result is tested against theShadow alpha cutoffthreshold. - Removed redundant
Attachment.GetClone()andMeshAttachment.GetLinkedClone()extension methods. Use methodsAttachment.CopyandMeshAttachment.NewLinkedMesh()instead. - Renamed extension method
Attachment.GetClone(bool cloneMeshesAsLinked)toAttachment.GetCopy(bool cloneMeshesAsLinked)to follow the naming scheme of the Spine API. SkeletonDataAsset.atlasAssetsis now an array of the base classAtlasAssetBaseinstead ofSpineAtlasAsset, which providesIEnumerable<> Materialsinstead ofList<> materials. Replace any access viaatlasAsset.materials[0]withatlasAsset.Materials.First()and add ausing System.Linq;statement.- Changed
MeshAttachment.GetLinkedMesh()method signatures: removed optional parametersbool inheritDeform = true, bool copyOriginalProperties = false. - Changed namespace
Spine.Unity.ModulestoSpine.UnityandSpine.Unity.Examplesafter restructuring (see section below) in respective classes:- When receiving namespace related errors, replace using statements of
using Spine.Unity.Modules.AttachmentTools;withusing Spine.Unity.AttachmentTools;. You can removeusing Spine.Unity.Modules;statements when ausing Spine.Unitystatement is already present in the file. AttachmentTools,SkeletonPartsRenderer,SkeletonRenderSeparator,SkeletonRendererCustomMaterialschanged to namespaceSpine.Unity.SkeletonGhost,SkeletonGhostRenderer,AtlasRegionAttacher,SkeletonGraphicMirror,SkeletonRagdoll,SkeletonRagdoll2D,SkeletonUtilityEyeConstraint,SkeletonUtilityGroundConstraint,SkeletonUtilityKinematicShadowchanged to namespaceSpine.Unity.Examples.
- When receiving namespace related errors, replace using statements of
- Split
Editor/Utility/SpineEditorUtilitiesclass into multiple files with partial class qualifier.- Nested classes
SpineEditorUtilities.AssetUtilityandSpineEditorUtilities.EditorInstantiationare now no longer nested. If you receive namespace related errors, replace any occurrance ofSpineEditorUtilities.AssetUtilitywithAssetUtilityandSpineEditorUtilities.EditorInstantiationwithEditorInstantiation.
- Nested classes
- Timeline Support has been moved to a separate UPM Package Previously the Spine Timeline integration was located in the
Modules/Timelinedirectory and was deactivated by default, making it necessary to activate it via the Spine Preferences. Now the Timeline integration has been moved to an additional UPM package which can be found underModules/com.esotericsoftware.spine.timeline. - Installation: You can download the Unity Package Manager (UPM) package via the download page or find it in the spine-runtimes/spine-unity/Modules subdirectory on the git repository. You can then either unzip (copy if using git) the package to
a) the
Packagesdirectory in your project where it will automatically be loaded, or b) to an arbitrary directory outside the Assets directory and then open Package Manager in Unity, select the+icon, chooseAdd package from disk..and point it to the package.json file. The Project panel should now show an entrySpine Timeline ExtensionsunderPackages. If the directory is not yet listed, you will need to close and re-open Unity to have it display the directory and its contents. SkeletonMecanim'sLayer Mix Modeenum nameMixMode.SpineStylehas been renamed toMixMode.Hard. This is most likely not set via code and thus unlikely to be a problem. Serialized scenes and prefabs are unaffected.SkeletonRootMotionandSkeletonMecanimRootMotioncomponents now support arbitrary bones in the hierarchy asRoot Motion Bone. Previously there were problems when selecting a non-root bone asRoot Motion Bone.Skeleton.ScaleXand.ScaleYand parent bone scale is now respected as well.
-
Additions
- Spine Preferences stored in Assets/Editor/SpineSettings.asset Now Spine uses the new
SettingsProviderAPI, storing settings in a SpineSettings.asset file which can be shared with team members. Your old preferences are automatically migrated to the new system. - Added support for Unity's SpriteMask to
SkeletonAnimationandSkeletonMecanim. All mask interaction modes are supported. See this blog post. - Added support for Unity's RectMask2D to SkeletonGraphics. See this blog post.
- Added
Create 2D Hinge Chainbutton atSkeletonUtilityBoneinspector, previously onlyCreate 3D Hinge Chainwas available. - Now supporting Lightweight Render Pipeline (LWRP) through an additional UPM package.
-
Installation: You can download the Unity Package Manager (UPM) package via the download page or find it in the spine-runtimes/spine-unity/Modules subdirectory on the git repository. You can then either unzip (copy if using git) the package to
- a) the
Packagesdirectory in your project where it will automatically be loaded, or - b) to an arbitrary directory outside the Assets directory and then open Package Manager in Unity, select the
+icon, chooseAdd package from disk..and point it to the package.json file.
If you are using git and Unity 2019.2 or newer versions and receive an error that dependencies could not be resolved by the package manager (only higher versions of Unity's
Lightweight RPpackage are available, e.g.6.9.0and up), please copy the prepared package-UNITYVERSION.json file for your Unity version (e.g.package-2019.2.json) over the existing package.json file to change the dependency accordingly. Unfortunately Unity's Package Manager does not provide a way to specify a version range for a dependency like "5.7.2 - 6.9.0" yet, so this manual step is necessary for git users.The Project panel should now show an entry
Spine Lightweight RP ShadersunderPackages. If the directory is not yet listed, you will need to close and re-open Unity to have it display the directory and its contents. - a) the
-
Usage: The package provides two shaders specifically built for the lightweight render pipeline:
Lightweight Render Pipeline/Spine/Skeleton, as a lightweight variant of theSpine/Skeletonshader,Lightweight Render Pipeline/Spine/Skeleton Lit, as a lightweight variant of theSpine/Skeleton Litshader andLightweight Render Pipeline/Spine/Sprite, as a lightweight variant of theSpine/Sprite/Vertex LitandPixel Litshaders, which were not functioning in the lightweight render pipeline. The shaders can be assigned to materials as usual and will respect your settings of the assignedLightweightRenderPipelineAssetunderProject Settings - Graphics.
-
Restrictions As all Spine shaders, the LWRP shaders do not support
Premultiply alpha(PMA) atlas textures in Linear color space. Please export your atlas textures asstraight alphatextures with disabledPremultiply alphasetting when using Linear color space. You can check the current color space viaProject Settings - Player - Other Settings - Color Space.. -
Example: You can find an example scene in the package under
com.esotericsoftware.spine.lwrp-shaders-3.8/Examples/LWRP Shaders.unitythat demonstrates usage of the LWRP shaders.
-
- Added
Spine/Skeleton Lit ZWriteshader. This variant of theSpine/Skeleton Litshader writes to the depth buffer with configurable depth alpha threshold. Apart from that it is identical toSpine/Skeleton Lit. - Additional yield instructions to wait for animation track events
End,CompleteandInterrupt.WaitForSpineAnimationCompletenow proves an additionalbool includeEndEventparameter, defaults tofalse(previous behaviour).- Added a new
WaitForSpineAnimationEndyield instruction. - Added a new generic
WaitForSpineAnimationyield instruction which can be configured to wait for any combination of animation track events. It is now used as base class forWaitForSpineAnimationCompleteandWaitForSpineAnimationEnd.
- Additional Fix Draw Order parameter at SkeletonRenderer, defaults to
disabled(previous behaviour). Applies only when 3+ submeshes are used (2+ materials with alternating order, e.g. "A B A"). If true, MaterialPropertyBlocks are assigned at each material to prevent aggressive batching of submeshes by e.g. the LWRP renderer, leading to incorrect draw order (e.g. "A1 B A2" changed to "A1A2 B"). You can leave this parameter disabled when everything is drawn correctly to save the additional performance cost. - Additional Timeline features. SpineAnimationStateClip now provides a
Speed Multiplier, a start time offset parameterClip In, support for blending successive animations by overlapping tracks. An additionalUse Blend Durationparameter (defaults to true) allows for automatic synchronisation of MixDuration with the current overlap blend duration. An additional Spine preferences parameterUse Blend Durationhas been added which can be disabled to default to the previous behaviour before this update. - Additional
SpriteMask and RectMask2Dexample scene added for demonstration of mask setup and interaction. Real physics hinge chainsfor both 2D and 3D physics. The SkeletonUtilityBone Inspector provides an interface to create 2D and 3D hinge chains. Previously created chains have only been respecting gravity, but not momentum of the skeleton or parent bones. The new physics rig created when pressingCreate 3D Hinge ChainandCreate 2D Hinge Chaincreates a more complex setup that also works when flipping the skeleton. Note that the chain root node is no longer parented to bones of the skeleton. This is a requirement in Unity to have momentum applied properly - do not reparent the chain root to bones of your skeleton, or you will loose any momentum applied by the skeleton's movement.Outline rendering functionality for all shaders.Every shader now provides an additional set ofOutlineparameters to enable custom outline rendering. When outline rendering is enabled via theMaterialinspector, it automatically switches the shader to the respectiveSpine/Outlineshader variant. Outlines are generated by sampling neighbour pixels, so be sure to add enough transparent padding when exporting your atlas textures to fit the desired outline width. In order to enable outline rendering at a skeleton, it is recommended to first prepare an additional outline material copy and then switch the material of the target skeleton to this material. This prevents unnecessary additional runtime material copies and drawcalls. Material switching can be prepared via a SkeletonRendererCustomMaterials component and then enabled or disabled at runtime. Alternatively, you can also directly modify theSkeletonRenderer.CustomMaterialOverrideproperty. Outline rendering is fully supported onSkeletonGraphicshaders as well.- Added
SkeletonRenderer.EditorSkipSkinSyncscripting API property to be able to set custom skins in editor scripts. Enable this property when overwriting the Skeleton's skin from an editor script. Without setting this parameter, changes will be overwritten by the next inspector update. Only affects Inspector synchronisation of skin withinitialSkinName, not startup initialization. - All
Spine/SkeletonGraphicshaders now provide a parameterCanvasGroup Compatiblewhich can be enabled to supportCanvasGroupalpha blending. For correct results, you should then disablePma Vertex Colorsin theSkeletonGraphicInspector, in sectionAdvanced(otherwise Slot alpha will be applied twice). - Now supporting Universal Render Pipeline (URP), including the 2D Renderer pipeline, through an additional UPM package.
-
Installation: You can download the Unity Package Manager (UPM) package via the download page or find it in the spine-runtimes/spine-unity/Modules subdirectory on the git repository. You can then either unzip (copy if using git) the package to
- a) the
Packagesdirectory in your project where it will automatically be loaded, or - b) to an arbitrary directory outside the Assets directory and then open Package Manager in Unity, select the
+icon, chooseAdd package from disk..and point it to the package.json file.
The Project panel should now show an entry
Spine Universal RP ShadersunderPackages. If the directory is not yet listed, you will need to close and re-open Unity to have it display the directory and its contents. - a) the
-
Usage: The package provides two shaders specifically built for the universal render pipeline:
Universal Render Pipeline/Spine/Skeleton, as a universal variant of theSpine/Skeletonshader,Universal Render Pipeline/Spine/Skeleton Lit, as a universal variant of theSpine/Skeleton Litshader,Universal Render Pipeline/Spine/Sprite, as a universal variant of theSpine/Sprite/Vertex LitandPixel Litshaders, which were not functioning in the universal render pipeline,Universal Render Pipeline/2D/Spine/Skeleton Lit, as a universal 2D Renderer variant of theSpine/Skeleton Litshader, andUniversal Render Pipeline/2D/Spine/Sprite, as a universal 2D Renderer variant of theSpine/Sprite/Vertex LitandPixel Litshaders. The shaders can be assigned to materials as usual and will respect your settings of the assignedUniversalRenderPipelineAssetunderProject Settings - Graphics.
-
Restrictions As all Spine shaders, the URP shaders do not support
Premultiply alpha(PMA) atlas textures in Linear color space. Please export your atlas textures asstraight alphatextures with disabledPremultiply alphasetting when using Linear color space. You can check the current color space viaProject Settings - Player - Other Settings - Color Space.. -
Example: You can find an example scene in the package under
com.esotericsoftware.spine.urp-shaders-3.8/Examples/URP Shaders.unitythat demonstrates usage of the URP shaders.
-
- Spine Preferences now provide an
Atlas Texture Settingsparameter for applying customizable texture import settings at all newly imported Spine atlas textures. When exporting atlas textures from Spine withPremultiply alphaenabled (the default), you can leave it atPMATexturePreset. If you have disabledPremultiply alpha, set it to the includedStraightAlphaTexturePresetasset. You can also create your ownTextureImporterPresetasset and assign it here (includePMAorStraightin the name). In Unity versions before 2018.3 you can useTexture2Dtemplate assets instead of the newerPresetassets. Materials created for imported textures will also have theStraight Alpha Textureparameter configured accordingly. - All
Spriteshaders (including URP and LWRP extension packages) now provide an additionalFixed Normal SpaceoptionWorld-Space. PReviously options were limited toView-SpaceandModel-Space. SkeletonGraphicnow fully supportsSkeletonUtilityfor generating a hierarchy ofSkeletonUtilityBonesin both modesFollowandOverride. This also enables creating hinge chain physics rigs and usingSkeletonUtilityConstraintssuch asSkeletonUtilityGroundConstraintandSkeletonUtilityEyeConstraintonSkeletonGraphic.- Added
OnMeshAndMaterialsUpdatedcallback event toSkeletonRendererandSkeletonGraphic. It is issued at the end ofLateUpdate, before rendering. - Added
Skeleton-OutlineOnlysingle pass shader to LWRP and URP extension modules. It can be assigned to materials asUniversal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly. This allows for separate outline child GameObjects that reference the existing Mesh of their parent, and re-draw the mesh using this outline shader. - Added example component
RenderExistingMeshto render a mesh again with different materials, as required by the newSkeleton-OutlineOnlyshaders. In URP the outline has to be rendered via a separate GameObject as URP does not allow multiple render passes. To add an outline to your SkeletenRenderer:- Add a child GameObject and move it a bit back (e.g. position Z = 0.01).
- Add a
RenderExistingMeshcomponent, provided in theSpine Examples/Scripts/Sample Componentsdirectory. - Copy the original material, add _Outline to its name and set the shader to
Universal Render Pipeline/Spine/Outline/Skeleton-OutlineOnly. - Assign this _Outline material at the
RenderExistingMeshcomponent under Replacement Materials.
- Added
Outline Shaders URPexample scene to URP extension module to demonstrate the above additions. - Added support for Unity's
SpriteAtlasas atlas provider (as an alternative to.atlas.txtand.pngfiles) alongside a skeleton data file. There is now an additionalSpine SpriteAtlas Importtool window accessible viaWindow - Spine - SpriteAtlas Import. Additional information can be found in a new section on the spine-unity documentation page. - Added support for multiple atlas textures at
SkeletonGraphic. You can enable this feature by enabling the parameterMultiple CanvasRendersin theAdvancedsection of theSkeletonGraphicInspector. This automatically creates the required number of childCanvasRendererGameObjects for each required draw call (submesh). - Added support for Render Separator Slots at
SkeletonGraphic. Render separation can be enabled directly in theAdvancedsection of theSkeletonGraphicInspector, it does not require any additional components (likeSkeletonRenderSeparatororSkeletonPartsRendererforSkeletonRenderercomponents). When enabled, additional separator GameObjects will be created automatically for each separation part, andCanvasRendererGameObjects re-parented to them accordingly. The separator GameObjects can be moved around and re-parented in the hierarchy according to your requirements to achieve the desired draw order within yourCanvas. A usage example can be found in the updatedSpine Examples/Other Examples/SkeletonRenderSeparatorscene. - Added
SkeletonGraphicCustomMaterialscomponent, providing functionality to override materials and textures of aSkeletonGraphic, similar toSkeletonRendererCustomMaterials. Note: overriding materials or textures per slot is not provided due to structural limitations. - Added Root Motion support for
SkeletonAnimation,SkeletonMecanimandSkeletonGraphicvia new componentsSkeletonRootMotionandSkeletonMecanimRootMotion. TheSkeletonAnimationandSkeletonGraphiccomponent Inspector now provides a lineRoot MotionwithAdd ComponentandRemove Componentbuttons to add/remove the newSkeletonRootMotioncomponent to your GameObject. TheSkeletonMecanimInspector detects whether root motion is enabled at theAnimatorcomponent and adds aSkeletonMecanimRootMotioncomponent automatically. SkeletonMecanimnow provides an additionalCustom MixModeparameter underMecanim Translator. It is enabled by default in version 3.8 to maintain current behaviour, using the setMix Modefor each Mecanim layer. When disabled,SkeletonMecanimwill use the recommendedMixModeaccording to the layer blend mode. Additional information can be found in the Mecanim Translator section on the spine-unity documentation pages.- Added SkeletonGraphic Timeline support. Added supprot for multi-track Timeline preview in the Editor outside of play mode (multi-track scrubbing). See the Timeline-Extension-UPM-Package section of the spine-unity documentation for more information.
- Added support for double-sided lighting at all
SkeletonLitshaders (including URP and LWRP packages). - Added frustum culling update mode parameters
Update When Invisible(Inspector parameter) andUpdateMode(available via code) to all Skeleton components. This provides a simple way to disable certain updates when theRendereris no longer visible (outside all cameras, culled in frustum culling). The newUpdateModeproperty allows disabling updates at a finer granularity level than disabling the whole component. Available modes are:Nothing,OnlyAnimationStatus,EverythingExceptMeshandFullUpdate. - Added a new
Spine/Outline/OutlineOnly-ZWriteshader to provide correct outline-only rendering. Note: the shader requires two render passes and is therefore not compatible with URP. TheSpine Examples/Other Examples/Outline Shadersexample scene has been updated to demonstrate the new shader. - Added
OnMeshAndMaterialsUpdatedcallback event toSkeletonRenderSeparatorandSkeletonPartsRenderer. It is issued at the end ofLateUpdate, before rendering. - Added
Root Motion Scale X/Yparameters toSkeletonRootMotionBasesubclasses (SkeletonRootMotionandSkeletonMecanimRootMotion). Also providingAdjustRootMotionToDistance()and other methods to allow for easy delta compensation. Delta compensation can be used to e.g. stretch a jump to a given distance. Root motion can be adjusted at the start of an animation or every frame viaskeletonRootMotion.AdjustRootMotionToDistance(targetPosition - transform.position, trackIndex);. - Now providing a
Canvas Group Tint Blackparameter at theSkeletonGraphicInspector in theAdvancedsection. When using theSpine/SkeletonGraphic Tint Blackshader you can enable this parameter to receive proper blending results when usingAdditiveblend mode under aCanvasGroup. Be sure to also have the parameterCanvasGroup Compatibleenabled at the shader. Note that the normalSpine/SkeletonGraphicdoes not supportAdditiveblend mode at aCanvasGroup, as it requires additional shader channels to work. - Added
Mix and Match Skinsexample scene to demonstrate how the 3.8 Skin API and combining skins can be used for a wardrobe and equipment use case. - Spine Timeline Extensions: Added
Hold Previousparameter atSpineAnimationStateClip. - Added more warning messages at incompatible SkeletonRenderer/SkeletonGraphic Component vs Material settings. They appear both as an info box in the Inspector as well as upon initialization in the Console log window. The Inspector box warnings can be disabled via
Edit - Preferences - Spine. - Now providing
BeforeApplyupdate callbacks at all skeleton animation components (SkeletonAnimation,SkeletonMecanimandSkeletonGraphic). - Added
BoundingBoxFollowerGraphiccomponent. This class is a counterpart ofBoundingBoxFollowerthat can be used withSkeletonGraphic. - Added Inspector context menu functions
SkeletonRenderer - Add all BoundingBoxFollower GameObjectsandSkeletonGraphic - Add all BoundingBoxFollowerGraphic GameObjectsthat automatically generate bounding box follower GameObjects for everyBoundingBoxAttachmentfor all skins of a skeleton. GetRemappedClone()now provides an additional parameterpivotShiftsMeshUVCoordsforMeshAttachmentto prevent uv shifts at a non-central Sprite pivot. This parameter defaults totrueto maintain previous behaviour.SkeletonRenderercomponents now provide an additional update modeOnly Event Timelinesat theUpdate When Invisibleproperty. This mode saves additional timeline updates compared to update modeEverything Except Mesh.- Now all URP (Universal Render Pipeline) and LWRP (Lightweight Render Pipeline) shaders support SRP (Scriptable Render Pipeline) batching. See Unity SRPBatcher documentation pages for additional information.
- Sprite shaders now provide four
Diffuse Rampmodes as an Inspector Material parameter:Hard,Soft,Old HardandOld Soft. In spine-unity 3.8 it defaults toOld Hardto keep the behaviour of existing projects unchanged. Note thatOld HardandOld Softramp versions were using only the right half of the ramp texture, and additionally multiplying the light intensity by 2, both leading to brighter lighting than without a ramp texture active. The new ramp modesHardandSoftuse the full ramp texture and do not modify light intensity, being consistent with lighting without a ramp texture active. - Added native support for slot blend modes
Additive,MultiplyandScreenwith automatic assignment at newly imported skeleton assets.BlendModeMaterialAssetsare now obsolete and replaced by the native properties atSkeletonDataAsset. TheSkeletonDataAssetInspector provides a newBlend Modes - Upgradebutton to upgrade an obsoleteBlendModeMaterialAssetto the native blend modes properties. This upgrade will be performed automatically on imported and re-imported assets in Unity 2020.1 and newer to prevent reportedBlendModeMaterialAssetissues in these Unity versions. spine-unity 4.0 and newer will automatically perform this upgrade regardless of the Unity version. BoneFollowerandBoneFollowerGraphiccomponents now provide better support for following bones when the skeleton's Transform is not the parent of the follower's Transform. Previously e.g. rotating a common parent Transform did not lead to the desired result, as well as negatively scaling a skeleton's Transform when it is not a parent of the follower's Transform.- URP and LWRP
SpriteandSkeletonLitshaders no longer requireAdvanced - Add Normalsenabled to properly cast and receive shadows. It is recommended to disableAdd Normalsif normals are otherwise not needed. - Added an example component
RootMotionDeltaCompensationlocated inSpine Examples/Scripts/Sample Componentswhich can be used for applying simple delta compensation. You can enable and disable the component to toggle delta compensation of the currently playing animation on and off. - Root motion delta compensation now allows to only adjust X or Y components instead of both. Adds two parameters to
SkeletonRootMotionBase.AdjustRootMotionToDistance()which default to adjusting both X and Y as before. TheRootMotionDeltaCompensationexample component exposes these parameters as public attributes. - Root motion delta compensation now allows to also add translation root motion to e.g. adjust a horizontal jump upwards or downwards over time. This is necessary because a Y root motion of zero cannot be scaled to become non-zero.
Attachment.GetRemappedClone(Sprite)method now provides an additional optional parameteruseOriginalRegionScale. When set totrue, the replaced attachment's scale is used instead of the Sprite'sPixel per Unitysetting, allowing for more consistent scaling. Note: When remapping Sprites, be sure to set the Sprite'sMesh TypetoFull Rectand notTight, otherwise the scale will be wrong.
- Spine Preferences stored in Assets/Editor/SpineSettings.asset Now Spine uses the new
-
Changes of default values
SkeletonMecanim'sLayer Mix Modenow defaults toMixMode.MixNextinstead ofMixMode.MixAlways.BlendModeMaterialAssetand it's instanceDefault BlendModeMaterials.assetnow haveApply Additive Materialset totrueby default in order to apply all blend modes by default.
-
Deprecated
- Deprecated
Modules/SlotBlendModes/SlotBlendModescomponent. Changed namespace fromSpine.Unity.ModulestoSpine.Unity.Deprecated. Moved toDeprecated/SlotBlendModes.
- Deprecated
-
Restructuring (Non-Breaking)
Note: The following changes will most likely not affect users of the Spine-Unity runtime as the API remains unchanged and no references are invalidated.
- Removed duplicates of
.cgincfiles inModules/Shaders/Spritethat were also present in theModules/Shaders/Sprite/CGIncludesdirectory. - Moved shaders from
Modules/ShaderstoShadersdirectory. - Moved shaders from
Modules/SkeletonGraphic/ShaderstoShaders/SkeletonGraphic. - Renamed shader
Shaders/Spine-SkeletonLit.shadertoShaders/Spine-Skeleton-Lit.shader. - Moved components from
SkeletonGraphictoComponentsandComponents/Followingexcept forSkeletonGraphicMirrorwhich was moved toSpine Examples/Scripts/Sample Components. - Moved
BoneFollower,BoneFollowerGraphicandPointFollowerfromComponentsdirectory toComponents/Following. - Moved
BoundingBoxFollowercomponent fromModules/BoundingBoxFollowertoComponents/Following. - Moved
Modules/SkeletonRenderSeparatordirectory toComponents/SkeletonRenderSeparator. - Moved
Modules/CustomMaterialsdirectory toComponents/SkeletonRendererCustomMaterials. - Moved
Asset Types/BlendModeMaterialsAsset.csclass,Shaders/BlendModes/Default BlendModeMaterials.assetand materials fromShaders/BlendModestoSkeletonDataModifierAssets/BlendModeMaterialsdirectory. - Moved
Modules/Ghostdirectory toSpine Examples/Scripts/Sample Components/Ghost. - Moved
Modules/SkeletonUtility Modulesdirectory toSpine Examples/Scripts/Sample Components/SkeletonUtility Modules. - Moved
Modules/AnimationMatchModifierdirectory toSpine Examples/Scripts/MecanimAnimationMatchModifier. - Moved
SkeletonRagdollandSkeletonRagdoll2Dcomponents fromModules/Ragdolldirectory toSpine Examples/Scripts/Sample Components/SkeletonUtility Modules. - Moved
AttachmentTools.cstoUtilitydirectory. - Split the file
AttachmentToolsinto 5 separate files for each contained class. No namespace or other API changes performed. - Split the file
Mesh Generation/SpineMeshinto 4 separate files for each contained class. No namespace or other API changes performed. - Moved
SkeletonExtensions.cstoUtilitydirectory. - Moved
Modules/YieldInstructionsdirectory toUtility/YieldInstructions. - Moved corresponding editor scripts of the above components to restructured directories as well.
- Renamed inspector editor class
PointFollowerEditortoPointFollowerInspectorfor consistency reasons.
- Removed duplicates of
XNA/MonoGame
- Updated to latest MonoGame version 3.7.1
- Rewrote example project to be cleaner and better demonstrate basic Spine features.
- Added mix-and-match example to demonstrate the new Skin API.
- Added normalmap support via
SpineEffectNormalmapand support for loading multiple texture layers following a suffix-pattern. Please see the example code on how to use them.
Java
-
Breaking changes
- Renamed
Slot#getAttachmentVertices()toSlot#getDeform(). - Changed the
.jsoncurve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin#addAttachment()toSkin#setAttachment(). - Removed
VertexAttachment#applyDeform()and replaced it withVertexAttachment#deformAttachment. The attachment set on this field is used to decide if aDeformTimelineshould be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeformfield, getter, and setter fromMeshAttachment. - Changed
.skelbinary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. JsonRollbacktool now converts from 3.8 JSON to 3.7.- Changed the
.jsonand.skelfile formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Renamed
-
Additions
- Added
xandycoordinates for setup pose AABB inSkeletonData. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin#getAttachments(). Returns all attachments in the skin. - Added
Skin#getAttachments(int slotIndex). Returns all attachements in the skin for the given slot index. - Added
Skin#addSkin(Skin skin). Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin#copySkin(Skin skin). Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachmentare shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment#copy()to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment#newLinkedMesh(), creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
libGDX
SkeletonViewercan load a skeleton by specifying it as the first argument on the command line.- Added mix-and-match example to demonstrate the new Skin API.
Lua
-
Breaking changes
- Renamed
Slot:getAttachmentVertices()toSlot#deform. - Changed the
.jsoncurve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin:addAttachment()toSkin#setAttachment(). - Removed
VertexAttachment:applyDeform()and replaced it withVertexAttachment#deformAttachment. The attachment set on this field is used to decide if aDeformTimelineshould be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeformfield, getter, and setter fromMeshAttachment. - Changed the
.jsonfile format to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes.
- Renamed
-
Additions
- Added
xandycoordinates for setup pose AABB inSkeletonData. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin:getAttachments(). Returns all attachments in the skin. - Added
Skin:getAttachments(slotIndex). Returns all attachements in the skin for the given slot index. - Added
Skin:addSkin(Skin skin). Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin:copySkin(Skin skin). Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachmentare shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment:copy()to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment:newLinkedMesh(), creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
Love2D
- Added support for 0-1 RGBA color component range change in Löve 0.11+. Older Löve versions using the 0-255 range are still supported!
- Added mix-and-match example to demonstrate the new Skin API.
Corona
- Added mix-and-match example to demonstrate the new Skin API.
Typescript/Javascript
-
Breaking changes
- Renamed
MixDirection.in/outtoMixDirection.mixIn/mixOutas it was crashing a JS compressor. - Renamed
Slot#getAttachmentVertices()toSlot#getDeform(). - Changed the
.jsoncurve format and added more assumptions for omitted values, reducing the average size of JSON exports. - Renamed
Skin#addAttachment()toSkin#setAttachment(). - Removed
VertexAttachment#applyDeform()and replaced it withVertexAttachment#deformAttachment. The attachment set on this field is used to decide if aDeformTimelineshould be applied to the attachment active on the slot to which the timeline is applied. - Removed
inheritDeformfield, getter, and setter fromMeshAttachment. - Changed
.skelbinary format, added a string table. References to strings in the data resolve to this string table, reducing storage size of binary files considerably. - Changed the
.jsonand.skelfile formats to accomodate the new feature and file size optimiations. Old projects must be exported with Spine 3.8.20+ to be compatible with the 3.8 Spine runtimes. - Updated runtime to be compatible with TypeScript 3.6.3.
- Renamed
-
Additions
- Added support for loading binary data via
AssetManager#loadBinary().AssetManager#get()will return aUint8Arrayfor such assets. - Added support for loading binaries via new
SkeletonBinary. Parses aUint8Array. - Added
xandycoordinates for setup pose AABB inSkeletonData. - Added support for rotated mesh region UVs.
- Added skin-specific bones and constraints which are only updated if the skeleton's current skin contains them.
- Improved Skin API to make it easier to handle mix-and-match use cases.
- Added
Skin#getAttachments(). Returns all attachments in the skin. - Added
Skin#getAttachments(slotIndex: number). Returns all attachements in the skin for the given slot index. - Added
Skin#addSkin(skin: Skin). Adds all attachments, bones, and skins from the specified skin to this skin. - Added
Skin#copySkin(skin: Skin). Adds all attachments, bones, and skins from the specified skin to this skin.VertexAttachmentare shallowly copied and will retain any parent mesh relationship. All other attachment types are deep copied.
- Added
- Added
Attachment#copy()to all attachment type implementations. This lets you deep copy an attachment to modify it independently from the original, i.e. when programmatically changing texture coordinates or mesh vertices. - Added
MeshAttachment#newLinkedMesh(), creates a linked mesh linkted to either the original mesh, or the parent of the original mesh. - Added IK softness.
- Added
AssetManager.setRawDataURI(path, data). Allows to embed data URIs for skeletons, atlases and atlas page images directly in the HTML/JS without needing to load it from a separate file.
- Added support for loading binary data via
WebGL backend
Inputcan now take a partially defined implementation ofInputListener.- Added mix-and-match example to demonstrate the new Skin API.
Canvas backend
Three.js backend
SkeletonMeshnow takes an optionalSkeletonMeshMaterialParametersCustomizerfunction that allows you to modify theShaderMaterialParametersbefore the material is finalized. Use it to modify things like THREEJS'Material.depthTestetc. See #1590.
Player
SpinePlayer#setAnimation()can now be called directly to set the animation being displayed.- The player supports loading
.skelbinary skeleton files by setting theSpinePlayerConfig#skelUrlfield instead ofSpinePlayerConfig#jsonUrl. - Added
SpinePlayerConfig#rawDataURIs. Allows to embed data URIs for skeletons, atlases and atlas page images directly in the HTML/JS without needing to load it from a separate file. See the example for a demonstration.
3.7
AS3
- Breaking changes
- The completion event will fire for looped 0 duration animations every frame.
MixPoseis now calledMixBlend- Skeleton
flipX/flipYhas been replaced withscaleX/scaleY. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194
- Additions
- Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry#setMixBlend(MixBlend.add)on each track. To specify the blend percentage, setTrackEntry#alpha. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Support for stretchy IK
- Support for audio events, see
audioPath,volumeandbalancefields on event (data). TrackEntryhas an additional field calledholdPrevious. It can be used to counter act a limitation ofAnimationStateresulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
Starling
- Added support for vertex effects. See
RaptorExample.as - Added 'getTexture()' method to 'StarlingTextureAtlasAttachmentLoader'
- Breaking change: if a skeleton requires two color tinting, you have to enable it via
SkeletonSprite.twoColorTint = true. In this case the skeleton will use theTwoColorMeshStyle, which internally uses a different vertex layout and shader. This means that skeletons with two color tinting enabled will break batching and hence increase the number of draw calls in your app. - Added
VertexEffectand implementationsJitterEffectandSwirlEffect. Allows you to modify vertices before they are submitted for drawing. See Starling changes. - Fix issues with StarlingAtlasAttachmentLoader, see https://github.com/EsotericSoftware/spine-runtimes/issues/939
- Fix issues with region trimming support, see
262bc26c64 - Added support for overriding
StarlingAtlasAttachmentLoader#getTexture(), seeea7dbecb98 - Texture atlas operations are no longer handled in
Starling#newRegionAttachmentandStarling#newMeshAttachmentbut delegated to the atlas. - Added sample for additive animation blending, see
6a556de014/spine-starling/spine-starling-example/src/spine/examples/OwlExample.as - Added sample on how to use bounding box attachment vertices
e20428b026 - Fully transparent meshes are not submitted for rendering.
- No hit-tests are performed when a skeleton is invisible.
C
- Breaking changes
- Listeners on
spAnimationStateandspTrackEntrywill now also be called if a track entry gets disposed as part of disposing an animation state. - The completion event will fire for looped 0 duration animations every frame.
- The spine-cocos2dx and spine-ue4 runtimes are now based on spine-cpp. See below for changes.
- Skeleton
flipX/flipYhas been replaced withscaleX/scaleY. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194 spMeshAttachmenthas two new fieldsregionTextureWithandregionTextureHeight. These must be set in custom attachment loader. SeeAtlasAttachmentLoader.
- Listeners on
- Additions
- Added support for local and relative transform constraint calculation, including additional fields in
spTransformConstraintData. Animation#applyandTimeline#apply`` now take enumsMixPoseandMixDirection` instead of booleans- Added
spVertexEffectand corresponding implementationsspJitterVertexEffectandspSwirlVertexEffect. Create/dispose through the correspondingspXXXVertexEffect_create()/dispose()functions. Set on framework/engine specific renderer. - Functions in
extension.hare not prefixed with_spinstead of just_to avoid interference with other libraries. - Introduced
SP_APImacro. Every spine-c function is prefixed with this macro. By default, it is an empty string. Can be used to markup spine-c functions with e.g. ``__declspec` when compiling to a dll or linking to that dll. - Added
void *userDatatospAnimationStateto be consumed in callbacks. - Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
spTrackEntry->mixBlend = SP_MIXBLEND_ADD)on each track. To specify the blend percentage, setspTrackEntry->alpha. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Optimized attachment lookup to give a 40x speed-up. See
cab8127626 - Support for stretchy IK
- Support for audio events, see
audioPath,volumeandbalancefields on event (data). spTrackEntryhas an additional field calledholdPrevious. It can be used to counter act a limitation ofAnimationStateresulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added support for local and relative transform constraint calculation, including additional fields in
Cocos2d-Objc
- Added vertex effect support to modify vertices of skeletons on the CPU. See
RaptorExample.m. - Explanation how to handle ARC, see
a4f122b08c - The super class
::update()method ofSkeletonRendereris now called, seef7bb981852 - Added improved tint-black shader.
SFML
spine-sfml.hno longer definesSPINE_SHORT_NAMESto avoid collisions with other APIs. See #1058.- Added support for vertex effects. See raptor example.
- Added premultiplied alpha support to
SkeletonDrawable. UseSkeletonDrawable::setUsePremultipliedAlpha(), see34086c1f41 - Added additive animation blending sample, see
b7e712d3ca/spine-sfml/example/main.cpp (L369)
C++
- ** Additions **
- Added C++ Spine runtime. See the spine-cpp Runtime Guide for more information on spine-cpp.
- Added parsing of non-essential data (fps, images path, audio path) to for
.json/.skelparsers.
Cocos2d-x
- Added ETC1 alpha support, thanks @halx99! Does not work when two color tint is enabled.
- Added
spAtlasPage_setCustomTextureLoader()which let's you do texture loading manually. Thanks @jareguo. - Added
SkeletonRenderer:setSlotsRange()andSkeletonRenderer::createWithSkeleton(). This allows you to split rendering of a skeleton up into multiple parts, and render other nodes in between. SeeSkeletonRendererSeparatorExample.cppfor an example. - Fully transparent attachments will not be rendered, improving rendering performance.
- Added improved tint-black shader.
- Updated to cocos2d-x 3.16
- The skeleton setup pose and world transform are now calculated on initialization to avoid flickering on start-up.
- Updated to cocos2d-x 3.17.1
- Breaking change: Switched from spine-c to spine-cpp as the underlying Spine runtime. See the spine-cpp Runtime Guide for more information on spine-cpp.
- Added
Cocos2dAttachmentLoaderto be used when constructing anAtlas. Used by default bySkeletonAnimationandSkeletonRendererwhen creating instances via thecreateXXXmethods. - All C structs and enums
spXXXhave been replaced with their C++ equivalentsspine::XXXin all public interfaces. - All instantiations via
newof C++ classes from spine-cpp should contain(__FILE__, __LINE__). This allows the tracking of instantations and detection of memory leaks via thespine::DebugExtension.
- Added
SFML
- Create a second SFML backend using spine-cpp. See the spine-cpp Runtime Guide for more information on spine-cpp.
- Added support for vertex effects. See raptor example.
- Added premultiplied alpha support to
SkeletonDrawable. UseSkeletonDrawable::setUsePremultipliedAlpha(), see34086c1f41 - Added additive animation blending sample, see
b7e712d3ca/spine-sfml/example/main.cpp (L369)
UE4
- spine-c is now exposed from the plugin shared library on Windows via __declspec.
- Updated to Unreal Engine 4.18
- Added C++ example, see
15011e81b7 SkeletonRendererComponentgenerates collision meshes by default.- Disabled generation of collision meshes by
SkeletonRendererComponent. BothProceduralMeshComponentandRuntimeMeshComponenthave a bug that generates a new PhysiX file every frame per component. Users are advised to add a separate collision shape to the root scene component of an actor instead. - Using UE4
FMemoryallocator by default. This should fix issues on some consoles. - Breaking change moved away from
RuntimeMeshComponent, as its maintainance has seized, back toProceduralMeshComponent. Existing projects should just work. However, if you run into issues, you may have to remove the oldSpineSkeletonRendererComponentand add a new one to your existing actors. - Breaking change due to the removal of
RuntimeMeshComponentand reversal toProceduralMeshComponent, two color tinting is currently not supported.ProceduralMeshComponentdoes not support enough vertex attributes for us to encode the second color in the vertex stream. You can remove theRuntimeMeshComponent/directory from your plugins directory and remove the component from anybuild.csfiles that may reference it. - Breaking change: Switched from spine-c to spine-cpp as the underlying Spine runtime. See the spine-cpp Runtime Guide for more information on spine-cpp.
- All C structs and enums
spXXXhave been replaced with their C++ equivalentsspine::XXXin all public interfaces. - All instantiations via
newof C++ classes from spine-cpp should contain(__FILE__, __LINE__). This allows the tracking of instantations and detection of memory leaks via thespine::DebugExtension. - Updated to Unreal Engine 4.20 (samples require 4.17+), see the
spine-ue4/Plugins/SpinePlugin/Source/SpinePlugin/SpinePlugin.build.csfile on how to compile in 4.20 with the latest UBT API changes. - Updated to Unreal Engine 4.21 (samples require 4.21).
- Breaking change:
UBoneDriverComponentandUBoneFollowerComponentare nowUSceneComponentinstead ofUActorComponent. They either update only themselves, or also the owningUActor, depending on whether the new flagUseComponentTransformis set. See https://github.com/EsotericSoftware/spine-runtimes/pull/1175 - Added query methods for slots, bones, skins and animations to
SpineSkeletonComponentandUTrackEntry. These allow you to query these objects by name in both C++ and blueprints. - Added
Preview AnimationandPreview Skinproperties toSpineSkeletonAnimationComponent. Enter an animation or skin name to live-preview it in the editor. Enter an empty string to reset the animation or skin.
C#
- Breaking changes
- The completion event will fire for looped 0 duration animations every frame.
- Skeleton
flipX/flipYhas been replaced withscaleX/scaleY. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194
- Additions
- Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry#MixBlend = MixBlend.addon each track. To specify the blend percentage, setTrackEntry#Alpha. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Support for stretchy IK
- Support for audio events, see
audioPath,volumeandbalancefields on event (data). TrackEntryhas an additional field calledholdPrevious. It can be used to counter act a limitation ofAnimationStateresulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
Unity
- Runtime and Editor, and Assembly Definition Files and folders have been reorganized into "Runtime" and "Editor". Each of these have an
.asmdeffile that defines these separately as their own assembly in Unity (Note: Spine.asmdeffiles are currently deactivated to.txtextension, see below). For projects not using assembly definition, you may delete the.asmdeffiles. These assembly definitions will be ignored by older versions of Unity that don't support it.- In this scheme, the entirety of the base spine-csharp runtime is inside the "Runtime" folder, to be compiled in the same assembly as spine-unity so they can continue to share internal members.
- Spine
.asmdeffiles are now deactivated (using.txtextension) by default This prevents problems when updating Spine through unitypackages, overwriting the Timeline reference entry inspine-unity.asmdef(added automatically when enabling Unity 2019 Timeline support, seeTimeline Support for Unity 2019), causing compile errors. In case you want to enable the.asmdeffiles, rename the files:Spine/Runtime/spine-unity.txttoSpine/Runtime/spine-unity.asmdefandSpine/Editor/spine-unity-editor.txttoSpine/Editor/spine-unity-editor.asmdef. - SkeletonAnimator is now SkeletonMecanim The Spine-Unity Mecanim-driven component
SkeletonAnimatorhas been renamedSkeletonMecanimto make it more autocomplete-friendly and more obvious at human-glance. The .meta files and guids should remain intact so existing projects and prefabs should not break. However, user code needs to be updated to useSkeletonMecanim. - SpineAtlasAsset The existing
AtlasAssettype has been renamed toSpineAtlasAssetto signify that it specifically uses a Spine/libGDX atlas as its source. Serialization should be intact but user code will need to be updated to refer to existing atlases asSpineAtlasAsset.- AtlasAssetBase
SpineAtlasAssetnow has an abstract base class calledSpineAtlasAsset. This is the base class to derive when using alternate atlas sources. Existing SkeletonDataAsset field "atlasAssets" now have the "AtlasAssetBase" type. Serialization should be intact, but user code will need to be updated to refer to the atlas assets accordingly. - This change is in preparation for alternate atlas options such as Unity's SpriteAtlas.
- AtlasAssetBase
- Optional Straight Alpha for shaders Spine-Unity's included Unity shaders now have a
_STRAIGHT_ALPHA_INPUTshader_feature, toggled as a checkbox in the Material's inspector. This allows the Material to use a non-premultiplied alpha/straight alpha input texture.- The following shaders now have the "Straight Alpha Texture" checkbox when used on a material:
Spine/SkeletonSpine/Skeleton Tint BlackSpine/Skeleton LitSpine/Skeleton TintSpine/Skeleton FillSpine/SkeletonGraphic (Premultiply Alpha)was renamed toSpine/SkeletonGraphicSpine/SkeletonGraphic Tint Black (Premultiply Alpha)was renamed toSpine/SkeletonGraphic Tint BlackSpine/Skeleton PMA MultiplySpine/Skeleton PMA Screen
- Dedicated straight alpha shaders were removed from the runtime.
Spine/Straight Alpha/Skeleton FillSpine/Straight Alpha/Skeleton Tint
- The following shaders now have the "Straight Alpha Texture" checkbox when used on a material:
- Detection of Incorrect Texture Settings Especially when atlas textures are exported with setting
Premultiply alphaenabled, it is important to configure Unity's texture import settings correctly. By default, you will now receive warnings where texture settings are expected to cause incorrect rendering.- The following rules apply:
sRGB (Color Texture)shall be disabled whenGenerate Mip Mapsis enabled, otherwise you will receive white border outlines.Alpha Is Transparencyshall be disabled onPremultiply alphatextures, otherwise you will receive light ghosting artifacts in transparent areas.
- These warnings can be disabled in
Edit - Preferences - Spine.
- The following rules apply:
- Sprite Mask Support for all Included Shaders The
Skeleton AnimationandSkeleton Mecanimcomponents now provide an additionalMask Interactionfield in the Inspector, covering identical functionality as Unity's built inSprite Renderercomponent:Mask Interactionmodes:None- The sprite will not interact with the masking system. Default behavior.Visible Inside Mask- The sprite will be visible only in areas where a mask is present.Visible Outside Mask- The sprite will be visible only in areas where no mask is present.
Automatically Generated MaterialsWhen switchingMask Interactionmodes in the Inspector outside of Play mode, the required additional material assets are generated for the respectiveStencil Compareparameters - with file suffixes'_InsideMask'and'_OutsideMask', placed in the same folder as the original materials. By default all generated materials are kept as references by theSkeleton Animationcomponent for switching at runtime. These materials can be managed and optimized via theSkeletonAnimation'sAdvancedsection:- Using the
Clearbutton you can clear the reference to unneeded materials, - Using the
Deletebutton the respective assets are deleted as well as references cleared. Note that otherSkeleton AnimationGameObjects might still reference the materials, so use with caution! - With the
Setbutton you can again assign a link to the respective materials to prepare them for runtime use. If the materials were not present or have been deleted, they are generated again based on the default materials.
- Using the
- When switching
Mask Interactionmode at runtime, the previously prepared materials are switched active automatically. When the respective materials have not been prepared, material copies of the default materials are created on the fly. Note that these materials are not shared between similarSkeleton AnimationGameObjects, so it is recommended to use the generated material assets where possible. - Every shader now exposes the
Stencil Compareparameter for further customization. This way you have maximum flexibility to use custom mechanisms to switch materials at runtime if you should ever need more than the three materials generated bySkeleton Animation'sMask Interactionparameter. ReferenceStencil Comparevalues are:CompareFunction.DisabledforMask Interaction - NoneCompareFunction.LessEqualforMask Interaction - Visible Inside MaskCompareFunction.GreaterforMask Interaction - Visible Outside Mask
- RectMask2D Support for SkeletonGraphic Both
SkeletonGraphicshaders 'Spine/SkeletonGraphic' and 'Spine/SkeletonGraphic Tint Black' now respect masking areas defined via Unity'sRectMask2Dcomponent. - Timeline Support for Unity 2019 using the existing Timeline components. By default, all Spine Timeline components are deactivated in Unity 2019 and can be activated via the Spine Preferences menu. This step became necessary because in Unity 2019, Timeline has been moved to a separate Package and is no longer included in the Unity core. Please visit
Edit - Preferences - Spineand atTimeline Package SupporthitEnableto automatically perform all necessary steps to activate the Timeline components. This will automatically:- download the Unity Timeline package
- activate the Spine Timeline components by setting the compile definition
SPINE_TIMELINE_PACKAGE_DOWNLOADEDfor all platforms - modify the
spine-unity.asmdeffile by adding the reference to the Unity Timeline library.
- Added
Create 2D Hinge Chainfunctionality atSkeletonUtilityBoneinspector, previously onlyCreate 3D Hinge Chainwas available.
XNA/MonoGame
- Added support for any
Effectto be used bySkeletonRenderer - Added support for
IVertexEffectto modify vertices of skeletons on the CPU.IVertexEffectinstances can be set on theSkeletonRenderer. See example project. - Added
SkeletonDebugRenderer - Made
MeshBatcherof SkeletonRenderer accessible via a getter. Allows user to batch their own geometry together with skeleton meshes for maximum batching instead of using XNA SpriteBatcher.
Java
- Breaking changes
- Skeleton attachments: Moved update of attached skeleton out of libGDX
SkeletonRenderer, added overloaded methodSkeleton#updateWorldTransform(Bone), used forSkeletonAttachment. You now MUST call this new method with the bone of the parent skeleton to which the child skeleton is attached. SeeSkeletonAttachmentTestfor and example. - The completion event will fire for looped 0 duration animations every frame.
MixPoseis now calledMixBlend.- Skeleton
flipX/flipYhas been replaced withscaleX/scaleY. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194
- Skeleton attachments: Moved update of attached skeleton out of libGDX
- Additions
- Added
EventData#audioPathfield. This field contains the file name of the audio file used for the event. - Added convenience method to add all attachments from one skin to another, see
a0b7bb6c44 - Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry#setMixBlend(MixBlend.add)on each track. To specify the blend percentage, setTrackEntry#alpha. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Support for stretchy IK
- Support for audio events, see
audioPath,volumeandbalancefields on event (data). TrackEntryhas an additional field calledholdPrevious. It can be used to counter act a limitation ofAnimationStateresulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added
libGDX
- Added
VertexEffectinterface, instances of which can be set onSkeletonRenderer. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect,JitterEffectandVertexEffectTest. - Added improved tint-black shader.
- Improved performance by avoiding batch flush when not switching between normal and additive rendering with PMA
- Improvements to skeleton viewer.
TwoColorPolygonBatchimplements theBatchinterface, allowing to the be used with other libGDX classes that require a batcher for drawing, potentially improving performance. Seea46b3d1d0c- Added
SkeletonDrawableto render skeletons in scene2d UIb93686c185
Lua
- Breaking changes
- The completion event will fire for looped 0 duration animations every frame.
- Skeleton
flipX/flipYhas been replaced withscaleX/scaleY. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194
- Additions
- Added
JitterEffectandSwirlEffectand support for vertex effects in Corona and Love - Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry:setMixBlend(MixBlend.add)on each track. To specify the blend percentage, setTrackEntry.alpha. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. - Support for stretchy IK
- Support for audio events, see
audioPath,volumeandbalancefields on event (data). TrackEntryhas an additional field calledholdPrevious. It can be used to counter act a limitation ofAnimationStateresulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.
- Added
Love2D
- Added support for vertex effects. Set an implementation like "JitterEffect" on
Skeleton.vertexEffect. Seemain.luafor an example.
Corona
- Added support for vertex effects. Set an implementation like "JitterEffect" on
SkeletonRenderer.vertexEffect. Seemain.luafor an example
Typescript/Javascript
- Breaking changes
- The completion event will fire for looped 0 duration animations every frame.
- Skeleton
flipX/flipYhas been replaced withscaleX/scaleY. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritance - Mix time is no longer affected by
TrackEntry#timeScale. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194
- Additions
- Added
AssetManager.loadTextureAtlas. Instead of loading the.atlasand corresponding image files manually, you can simply specify the location of the.atlasfile and AssetManager will load the atlas and all its images automatically.AssetManager.get("atlasname.atlas")will then return an instance ofspine.TextureAtlas. - Added additive animation blending. When playing back multiple animations on different tracks, where each animation modifies the same skeleton property, the results of tracks with lower indices are discarded, and only the result from the track with the highest index is used. With animation blending, the results of all tracks are mixed together. This allows effects like mixing multiple facial expressions (angry, happy, sad) with percentage mixes. By default the old behaviour is retained (results from lower tracks are discarded). To enable additive blending across animation tracks, call
TrackEntry#setMixBlend(MixBlend.add)on each track. To specify the blend percentage, setTrackEntry#alpha. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. Seef045d22183/spine-ts/webgl/tests/test-additive-animation-blending.htmlfor an example. - Added work-around for iOS WebKit JIT bug, see
c28bbebf80 - Support for stretchy IK
- Support for audio events, see
audioPath,volumeandbalancefields on event (data). TrackEntryhas an additional field calledholdPrevious. It can be used to counter act a limitation ofAnimationStateresulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.- Added
AssetManager#setRawDataURI(path, data). Allows to set raw data URIs for a specific path, which in turn enables embedding assets into JavaScript/HTML.
- Added
WebGL backend
- Added
VertexEffectinterface, instances of which can be set onSkeletonRenderer. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect,JitterEffect, and the example which allows to set effects. - Added
slotRangeStartandslotRangeEndparameters toSkeletonRenderer#drawandSceneRenderer#drawSkeleton. This allows you to render only a range of slots in the draw order. Seespine-ts/webgl/tests/test-slot-range.htmlfor an example. - Added improved tint-black shader.
- Added
SceneRenderer#drawTextureUV(), allowing to draw a texture with manually specified texture coordinates. - Exposed all renderers in
SceneRenderer.
Canvas backend
- Added support for shearing and non-uniform scaling inherited from parent bones.
- Added support for alpha tinting.
Three.js backend
- Added
VertexEffectinterface, instances of which can be set onSkeletonMesh. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect,JitterEffect. - Added support for multi-page atlases
Widget backend
- Added fields
atlasContent,atlasPagesContent, andjsonContenttoWidgetConfigurationallowing you to directly pass the contents of the.atlas, atlas page.pngfiles, and the.jsonfile without having to do a request. SeeREADME.mdand the example for details. SpineWidget.setAnimation()now takes an additional optional parameter for callbacks when animations are completed/interrupted/etc.
3.6
AS3
-
Breaking changes
- Removed
Bone.worldToLocalRotationXandBone.worldToLocalRotationY. Replaced byBone.worldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Made
Bonefields_a,_b,_c,_d,_worldXand_worldYpublic, removed underscore prefix. - Removed
VertexAttachment.computeWorldVerticesoverload, changedVertexAttachment.computeWorldVertices2toVertexAttachment.computeWorldVertices, addedstrideparameter. - Removed
RegionAttachment.verticesfield. The vertices array is provided toRegionAttachment.computeWorldVerticesby the API user now. - Removed
RegionAttachment.updateWorldVertices, addedRegionAttachment.computeWorldVertices. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVerticesarray, starting atoffset, then moving bystridearray elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - Replaced
r,g,b,afields with instances of newColorclass inRegionAttachment,MeshAttachment,Skeleton,SkeletonData,SlotandSlotData. - The completion event will fire for looped 0 duration animations every frame.
- Removed
-
Additions
- Added
Skeleton.getBoundsfrom reference implementation. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData - Added
Bone.localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimelineand additional fields onSlotandSlotData. - Added
PointAttachment, additional methodnewPointAttachmentinAttachmentLoaderinterface. - Added
ClippingAttachment, additional methodnewClippingAttachmentinAttachmentLoaderinterface. AnimationState#applyreturns boolean indicating if any timeline was applied or not.Animation#applyandTimeline#apply`` now take enumsMixPoseandMixDirection` instead of booleans- Added
VertexEffectand implementationsJitterEffectandSwirlEffect. Allows you to modify vertices before they are submitted for drawing. See Starling changes.
- Added
Starling
- Fixed renderer to work with 3.6 changes.
- Added support for two color tinting.
- Added support for clipping.
- Added support for rotated regions in texture atlas loaded via StarlingAtlasAttachmentLoader.
- Added support for vertex effects. See
RaptorExample.as - Added 'getTexture()' method to 'StarlingTextureAtlasAttachmentLoader'
- Breaking change: if a skeleton requires two color tinting, you have to enable it via
SkeletonSprite.twoColorTint = true. In this case the skeleton will use theTwoColorMeshStyle, which internally uses a different vertex layout and shader. This means that skeletons with two color tinting enabled will break batching and hence increase the number of draw calls in your app.
C
- Breaking changes
spVertexAttachment_computeWorldVerticesandspRegionAttachment_computeWorldVerticeSnow take new parameters to make it possible to directly output the calculated vertex positions to a vertex buffer. Removes the need for additional copies in the backends' respective renderers.- Removed
spBoundingBoxAttachment_computeWorldVertices, superseded byspVertexAttachment_computeWorldVertices. - Removed
spPathAttachment_computeWorldVerticesandspPathAttachment_computeWorldVertices1, superseded byspVertexAttachment_computeWorldVertices. - Removed
sp_MeshAttachment_computeWorldVertices, superseded byspVertexAttachment_computeWorldVertices. - Removed
spBone_worldToLocalRotationXandspBone_worldToLocalRotationY. Replaced byspBone_worldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Replaced
r,g,b,afields with instances of newspColorstruct inspRegionAttachment,spMeshAttachment,spSkeleton,spSkeletonData,spSlotandspSlotData. - Removed
spVertexIndexfrom public API. - Listeners on
spAnimationStateorspTrackEntrywill now be also called in case a track entry is disposed as part of dispoing thespAnimationState. - The completion event will fire for looped 0 duration animations every frame.
- Additions
- Added support for local and relative transform constraint calculation, including additional fields in
spTransformConstraintData. - Added
spPointAttachment, additional methodspAtlasAttachmentLoadeR_newPointAttachment. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData - Added
spBone_localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
spTwoColorTimelineand additional fields onspSlotandspSlotData. - Added
userDatafield tospTrackEntry, so users can expose data inspAnimationStatecallbacks. - Modified kvec.h used by SkeletonBinary.c to use Spine's MALLOC/FREE macros. That way there's only one place to inject custom allocators (extension.h) commit
- Added macros to define typed dynamic arrays, see
Array.h/.c - Added
spClippingAttachmentand respective enum. - Added
spSkeletonClipperandspTriangulator, used to implement software clipping of attachments. AnimationState#applyreturns boolean indicating if any timeline was applied or not.Animation#applyandTimeline#apply`` now take enumsMixPoseandMixDirection` instead of booleans- Added
spVertexEffectand corresponding implementationsspJitterVertexEffectandspSwirlVertexEffect. Create/dispose through the correspondingspXXXVertexEffect_create()/dispose()functions. Set on framework/engine specific renderer. See changes for spine-c based frameworks/engines below. - Functions in
extension.hare not prefixed with_spinstead of just_to avoid interference with other libraries. - Introduced
SP_APImacro. Every spine-c function is prefixed with this macro. By default, it is an empty string. Can be used to markup spine-c functions with e.g. ``__declspec` when compiling to a dll or linking to that dll.
- Added support for local and relative transform constraint calculation, including additional fields in
Cocos2d-X
- Fixed renderer to work with 3.6 changes
- Optimized rendering by removing all per-frame allocation in
SkeletonRenderer, resulting in 15% performance increase for large numbers of skeletons being rendered per frame. - Added support for two color tinting. Tinting is enabled/disabled per
SkeletonRenderer/SkeletonAnimationinstance. UseSkeletonRenderer::setTwoColorTint(). Note that two color tinting requires the use of a non-standard shader and vertex format. This means that skeletons rendered with two color tinting will break batching. However, skeletons with two color tinting enabled and rendered after each other will be batched. - Updated example to use Cocos2d-x 3.14.1.
- Added mesh debug rendering. Enable/Disable via
SkeletonRenderer::setDebugMeshesEnabled(). - Added support for clipping.
- SkeletonRenderer now combines the displayed color of the Node (cascaded from all parents) with the skeleton color for tinting.
- Added support for vertex effects. See
RaptorExample.cpp. - Added ETC1 alpha support, thanks @halx99! Does not work when two color tint is enabled.
- Added
spAtlasPage_setCustomTextureLoader()which let's you do texture loading manually. Thanks @jareguo. - Added
SkeletonRenderer:setSlotsRange()andSkeletonRenderer::createWithSkeleton(). This allows you to split rendering of a skeleton up into multiple parts, and render other nodes in between. SeeSkeletonRendererSeparatorExample.cppfor an example.
Cocos2d-Objc
- Fixed renderer to work with 3.6 changes
- Added support for two color tinting. Tinting is enabled/disabled per
SkeletonRenderer/SkeletonAnimation.twoColorTint = true. Note that two color tinted skeletons do not batch with other nodes. - Added support for clipping.
SFML
- Fixed renderer to work with 3.6 changes. Sadly, two color tinting does not work, as the vertex format in SFML is fixed.
- Added support for clipping.
- Added support for vertex effects. See raptor example.
- Added premultiplied alpha support to
SkeletonDrawable.
Unreal Engine 4
- Fixed renderer to work with 3.6 changes
- Added new UPROPERTY to SpineSkeletonRendererComponent called
Color. This allows to set the tint color of the skeleton in the editor, C++ and Blueprints. Under the hood, thespSkeleton->colorwill be set on every tick of the renderer component. - Added support for clipping.
- Switched from built-in ProceduralMeshComponent to RuntimeMeshComponent by Koderz (https://github.com/Koderz/UE4RuntimeMeshComponent, MIT). Needed for more flexibility regarding vertex format, should not have an impact on existing code/assets. You need to copy the RuntimeMeshComponentPlugin from our repository in
spine-ue4\Plugins\to your project as well! - Added support for two color tinting. All base materials, e.g. SpineUnlitNormalMaterial, now do proper two color tinting. No material parameters have changed.
- Updated to Unreal Engine 4.16.1. Note that 4.16 has a regression which will make it impossible to compile plain .c files!
- spine-c is now exposed from the plugin shared library on Windows via __declspec.
C#
-
Breaking changes
MeshAttachment.parentMeshis now a private field to enforce using the.ParentMeshsetter property in external code. TheMeshAttachment.ParentMeshproperty is an appropriate replacement wherever.parentMeshwas used.Skeleton.GetBoundstakes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.- Removed
Bone.WorldToLocalRotationXandBone.WorldToLocalRotationY. Replaced byBone.WorldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added
strideparameter toVertexAttachment.ComputeWorldVertices. - Removed
RegionAttachment.Verticesfield. The vertices array is provided toRegionAttachment.ComputeWorldVerticesby the API user now. - Removed
RegionAttachment.UpdateWorldVertices, addedRegionAttachment.ComputeWorldVertices. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVerticesarray, starting atoffset, then moving bystridearray elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - The completion event will fire for looped 0 duration animations every frame.
-
Additions
-
Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData -
Added
Bone.localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). -
Added two color tinting support, including
TwoColorTimelineand additional fields onSlotandSlotData. -
Added
PointAttachment, additional methodNewPointAttachmentinAttachmentLoaderinterface. -
Added
ClippingAttachment, additional methodNewClippingAttachmentinAttachmentLoaderinterface. -
Added
SkeletonClipperandTriangulator, used to implement software clipping of attachments. -
AnimationState.Applyreturns a bool indicating if any timeline was applied or not. -
Animation.ApplyandTimeline.Apply`` now take enumsMixPoseandMixDirection` instead of bools.
Unity
- Refactored renderer to work with new 3.6 features.
- Two color tinting is currently supported via extra UV2 and UV3 mesh vertex streams. To use Two color tinting, you need to:
- switch on "Tint Black" under "Advanced...",
- use the new
Spine/Skeleton Tint Blackshader, or your own shader that treats the UV2 and UV3 streams similarly. - Additionally, for SkeletonGraphic, you can use
Spine/SkeletonGraphic Tint Black(or the bundled SkeletonGraphicTintBlack material) or your own shader that uses UV2 and UV3 streams similarly. Additional Shader Channels TexCoord1 and TexCoord2 will need to be enabled from the Canvas component's inspector. These correspond to UV2 and UV3.
- Clipping is now supported. Caution: The SkeletonAnimation switches to slightly slower mesh generation code when clipping so limit your use of
ClippingAttachments when using on large numbers of skeletons.
- Two color tinting is currently supported via extra UV2 and UV3 mesh vertex streams. To use Two color tinting, you need to:
- SkeletonRenderer.initialFlip Spine components such as SkeletonRenderer, SkeletonAnimation, SkeletonAnimator now has
initialFlipXandinitialFlipYfields which are also visible in the inspector under "Advanced...". It will allow you to set and preview a starting flip value for your skeleton component. This is applied immediately when the internal skeleton object is instantiated. - [SpineAttribute] Improvements
- Icons have been added to SpineAttributeDrawers. This should make your default inspectors easier to understand at a glance.
- Added Constraint Attributes You can now use
[SpineIkConstraint][SpineTransformConstraint][SpinePathConstraint] - SpineAttribute dataField parameter can also now detect sibling fields within arrays and serializable structs/classes.
- [SpineAttribute(includeNone:false)] SpineAttributes now have an
includeNoneoptional parameter to specify if you want to include or exclude a none ("") value option in the dropdown menu. Default isincludeNone:true. - [SpineAttachment(skinField:"mySkin")] The SpineAttachment attribute now has a skinField optional parameter to limit the dropdown items to attachments in a specific skin instead of the just default skin or all the skins in SkeletonData.
- SkeletonDebugWindow. Debugging tools have been moved from the SkeletonAnimation and SkeletonUtility component inspectors into its own utility window. You can access "Skeleton Debug" under the
Advanced...foldout in the SkeletonAnimation inspector, or in SkeletonAnimation's right-click/context menu.- Skeleton Baking Window The old Skeleton Baking feature is also now accessible through the SkeletonDataAsset's right-click/context menu.
- AttachmentTools source material.
AttachmentToolsmethods can now accept asourceMaterialargument to copy material properties from. - AttachmentTools Skin Extensions. Using AttachmentTools, you can now add entries by slot name by also providing a skeleton argument. Also
Append(Skin),RemoveAttachmentandClearhave been added. - BoneFollower and SkeletonUtilityBone Add RigidBody Button. The BoneFollower and SkeletonUtilityBone component inspectors will now offer to add a
RigidbodyorRigidbody2Dif it detects a collider of the appropriate type. Having a rigidbody on a moving transform with a collider fits better with the Unity physics systems and prevents excess calculations. It will not detect colliders on child objects so you have to add Rigidbody components manually accordingly. - SkeletonRenderer.OnPostProcessVertices is a new callback that gives you a reference to the MeshGenerator after it has generated a mesh from the current skeleton pose. You can access
meshGenerator.VertexBufferormeshGenerator.ColorBufferto modify these before they get pushed into the UnityEngine.Mesh for rendering. This can be useful for non-shader vertex effects. - Examples
- Examples now use properties. The code in the example scripts have been switched over to using properties instead of fields to encourage their use for consistency. This is in anticipation of both users who want to move the Spine folders to the Unity Plugins folder (compiled as a different assembly), and of Unity 2017's ability to manually define different assemblies for shorter compilation times.
- Mix And Match. The mix-and-match example scene, code and data have been updated to reflect the current recommended setup for animation-compatible custom equip systems The underlying API has changed since 3.5 and the new API calls in MixAndMatch.cs is recommended. Documentation is in progress.
- Sample Components.
AtasRegionAttacherandSpriteAttacherare now part ofSample Components, to reflect that they are meant to be used as sample code rather than production. A few other sample components have also been added. New imports of the unitypackage Examples folder will see a "Legacy" folder comprised of old sample components that no longer contain the most up-to-date and recommended workflows, but are kept in case old setups used them for production.
- Spine folder. In the unitypackage, the "spine-csharp" and "spine-unity" folders are now inside a "Spine" folder. This change will only affect fresh imports. Importing the unitypackage to update Spine-Unity in your existing project will update the appropriate files however you chose to arrange them, as long as the meta files are intact.
- Breaking changes
- The Sprite shaders module was updated to the latest version from the source. Some changes were made to the underlying keyword structure. You may need to review the settings of your lit materials. Particularly, your Fixed Normals settings.
- The
Spine/Skeleton Litshader was switched over to non-fixed-function code. It now no longer requires mesh normals and has fixed normals at the shader level. - The old MeshGenerator classes, interfaces and code in
Spine.Unity.MeshGenerationare now deprecated. All mesh-generating components now share the classSpine.Unity.MeshGeneratordefined inSpineMesh.cs. MeshGenerator is a serializable class.- The
SkeletonRenderer.renderMeshesoptimization is currently non-functional. - Old triangle-winding code has been removed from
SkeletonRenderer. Please use shaders that have backface culling off. - Render settings in
SkeletonGraphiccan now be accessed underSkeletonGraphic.MeshGenerator.settings. This is visible in the SkeletonGraphic inspector asAdvanced... - We will continue to bundle the unitypackage with the empty .cs files of deprecated classes until Spine 3.7 to ensure the upgrade process does not break.
- The
- The [SpineAttachment(slotField:)] optional parameter found property value now acts as a Find(slotName) argument rather than Contains(slotName).
SkeletonAnimatornow uses aSkeletonAnimator.MecanimTranslatorclass to translate an Animator's Mecanim State Machine into skeleton poses. This makes code reuse possible for a Mecanim version of SkeletonGraphic.SkeletonAnimatorautoresetand themixModesarray are now a part of SkeletonAnimator's MecanimTranslator.Translator.autoResetis set to true by default. Old prefabs and scene objects with Skeleton Animator may no longer have correct values set.- Warnings and conditionals checking for specific Unity 5.2-and-below incompatibility have been removed.
XNA/MonoGame
- Added support for clipping
- Removed
RegionBatcherandSkeletonRegionRenderer, renamedSkeletonMeshRenderertoSkeletonRenderer - Added support for two color tint. For it to work, you need to add the
SpineEffect.fxfile to your content project, then load it viavar effect = Content.Load<Effect>("SpineEffect");, and set it on theSkeletonRenderer. See the example project for code. - Added support for any
Effectto be used bySkeletonRenderer - Added support for
IVertexEffectto modify vertices of skeletons on the CPU.IVertexEffectinstances can be set on theSkeletonRenderer. See example project. - Added
SkeletonDebugRenderer - Made
MeshBatcherof SkeletonRenderer accessible via a getter. Allows user to batch their own geometry together with skeleton meshes for maximum batching instead of using XNA SpriteBatcher.
Java
-
Breaking changes
Skeleton.getBoundstakes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.- Removed
Bone.worldToLocalRotationXandBone.worldToLocalRotationY. Replaced byBone.worldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added
strideparameter toVertexAttachment.computeWorldVertices. - Removed
RegionAttachment.verticesfield. The vertices array is provided toRegionAttachment.computeWorldVerticesby the API user now. - Removed
RegionAttachment.updateWorldVertices, addedRegionAttachment.computeWorldVertices. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVerticesarray, starting atoffset, then moving bystridearray elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - Skeleton attachments: Moved update of attached skeleton out of libGDX
SkeletonRenderer, added overloaded methodSkeleton#updateWorldTransform(Bone), used forSkeletonAttachment. You now MUST call this new method with the bone of the parent skeleton to which the child skeleton is attached. SeeSkeletonAttachmentTest` for and example. - The completion event will fire for looped 0 duration animations every frame.
-
Additions
- Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData - Added
Bone.localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimelineand additional fields onSlotandSlotData. - Added
PointAttachment, additional methodnewPointAttachmentinAttachmentLoaderinterface. - Added
ClippingAttachment, additional methodnewClippingAttachmentinAttachmentLoaderinterface. - Added
SkeletonClipperandTriangulator, used to implement software clipping of attachments. AnimationState#applyreturns boolean indicating if any timeline was applied or not.Animation#applyandTimeline#apply`` now take enumsMixPoseandMixDirection` instead of booleans
- Added support for local and relative transform constraint calculation, including additional fields in
libGDX
- Fixed renderer to work with 3.6 changes
- Added support for two color tinting. Use the new
TwoColorPolygonBatchtogether withSkeletonRenderer - Added support for clipping. See
SkeletonClipper. Used automatically bySkeletonRenderer. Does not work when using aSpriteBatchwithSkeletonRenderer. UsePolygonSpriteBatchorTwoColorPolygonBatchinstead. - Added
VertexEffectinterface, instances of which can be set onSkeletonRenderer. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect,JitterEffectandVertexEffectTest.
Lua
- Breaking changes
- Removed
Bone:worldToLocalRotationXandBone:worldToLocalRotationY. Replaced byBone:worldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). VertexAttachment:computeWorldVerticesnow takes offsets and stride to allow compositing vertices directly in a vertex buffer to be send to the GPU. The compositing is now performed in the backends' respective renderers. This also affects the subclassesMeshAttachment,BoundingBoxAttachmentandPathAttachment.- Removed
RegionAttachment:updateWorldVertices, addedRegionAttachment:computeWorldVertices, which takes offsets and stride to allow compositing vertices directly in a vertex buffer to be send to the GPU. The compositing is now performed in the backends' respective renderers. - Removed
MeshAttachment.worldVerticesfield. Computation is now performed in each backends' respective renderer. Theuvcoordinates are now stored inMeshAttachment.uvs. - Removed
RegionAttachment.verticesfield. Computation is now performed in each backends respective renderer. Theuvcoordinates for each vertex are now stored in theRegionAttachment.uvsfield. - The completion event will fire for looped 0 duration animations every frame.
- Removed
- Additions
- Added
Bone:localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimelineand additional fields onSlotandSlotData. - Added
PointAttachment, additional methodnewPointAttachmentinAttachmentLoaderinterface. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData - Added
ClippingAttachment, additional methodnewClippingAttachmentinAttachmentLoaderinterface. - Added
SkeletonClipperandTriangulator, used to implement software clipping of attachments. AnimationState#applyreturns boolean indicating if any timeline was applied or not.Animation#applyandTimeline#apply`` now take enumsMixPoseandMixDirection` instead of booleans- Added
JitterEffectandSwirlEffectand support for vertex effects in Corona and Love
Love2D
- Fixed renderer to work with 3.6 changes
- Added support for two color tinting. Enable it via
SkeletonRenderer.new(true). - Added clipping support.
- Added support for vertex effects. Set an implementation like "JitterEffect" on
Skeleton.vertexEffect. Seemain.luafor an example.
Corona
- Fixed renderer to work with 3.6 changes. Sadly, two color tinting is not supported, as Corona doesn't let us change the vertex format needed and its doesn't allow to modify shaders in the way needed for two color tinting
- Added clipping support.
- Added support for vertex effects. Set an implementation like "JitterEffect" on
SkeletonRenderer.vertexEffect. Seemain.luafor an example
Typescript/Javascript
-
Breaking changes
Skeleton.getBoundstakes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.- Removed
Bone.worldToLocalRotationXandBone.worldToLocalRotationY. Replaced byBone.worldToLocalRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Removed
VertexAttachment.computeWorldVerticesoverload, changedVertexAttachment.computeWorldVerticesWithtoVertexAttachment.computeWorldVertices, addedstrideparameter. - Removed
RegionAttachment.verticesfield. The vertices array is provided toRegionAttachment.computeWorldVerticesby the API user now. - Removed
RegionAttachment.updateWorldVertices, addedRegionAttachment.computeWorldVertices. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the providedworldVerticesarray, starting atoffset, then moving bystridearray elements when advancing to the next vertex. This allows to directly compose the vertex buffer and avoids a copy. The computation of the full vertices, including vertex colors and texture coordinates, is now done by the backend's respective renderer. - The completion event will fire for looped 0 duration animations every frame.
- Removed the Spine Widget in favor of Spine Web Player.
-
Additions
- Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData - Added
Bone.localToWorldRotation(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimelineand additional fields onSlotandSlotData. - Added
PointAttachment, additional methodnewPointAttachmentinAttachmentLoaderinterface. - Added
ClippingAttachment, additional methodnewClippingAttachmentinAttachmentLoaderinterface. - Added
SkeletonClipperandTriangulator, used to implement software clipping of attachments. AnimationState#applyreturns boolean indicating if any timeline was applied or not.Animation#applyandTimeline#apply`` now take enumsMixPoseandMixDirection` instead of booleans- Added
AssetManager.loadTextureAtlas. Instead of loading the.atlasand corresponding image files manually, you can simply specify the location of the.atlasfile and AssetManager will load the atlas and all its images automatically.AssetManager.get("atlasname.atlas")will then return an instance ofspine.TextureAtlas. - Added the Spine Web Player
- Added support for local and relative transform constraint calculation, including additional fields in
WebGL backend
- Fixed WebGL context loss
- Added
Restorableinterface, implemented by any WebGL resource that needs restoration after a context loss. All WebGL resource classes (Shader,Mesh,GLTexture) implement this interface. - Added
ManagedWebGLRenderingContext. Handles setup of aWebGLRenderingContextgiven a canvas element and restoration of WebGL resources (Shader,Mesh,GLTexture) on WebGL context loss. WebGL resources register themselves with theManagedWebGLRenderingContext. If the context is informed of a context loss and restoration, the registered WebGL resources'restore()method is called. Therestore()method implementation on each resource type will recreate the GPU side objects. - All classes that previously took a
WebGLRenderingContextin the constructor now also allow aManagedWebGLRenderingContext. This ensures existing applications do not break. - To use automatic context restauration:
- Create or fetch a canvas element from the DOM
- Instantiate a
ManagedWebGLRenderingContext, passing the canvas to the constructor. This will setup aWebGLRenderingContextinternally and manage context loss/restoration. - Pass the
ManagedWebGLRenderingContextto the constructors of classes that you previously passed aWebGLRenderingContextto (AssetManager,GLTexture,Mesh,Shader,PolygonBatcher,SceneRenderer,ShapeRenderer,SkeletonRenderer,SkeletonDebugRenderer).
- Added
- Fixed renderer to work with 3.6 changes.
- Added support for two color tinting.
- Improved performance by using
DYNAMIC_DRAWfor vertex buffer objects and fixing bug that copied to much data to the GPU each frame inPolygonBatcher/Mesh. - Added two color tinting support, enabled by default. You can disable it via the constructors of
SceneRenderer,SkeletonRendererandPolygonBatcher. Note that you will need to use a shader created viaShader.newTwoColoredTexturedShadershader withSkeletonRendererandPolygonBatcherif two color tinting is enabled. - Added clipping support
- Added
VertexEffectinterface, instances of which can be set onSkeletonRenderer. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect,JitterEffect, and the example which allows to set effects. - Added
slotRangeStartandslotRangeEndparameters toSkeletonRenderer#drawandSceneRenderer#drawSkeleton. This allows you to render only a range of slots in the draw order. Seespine-ts/webgl/tests/test-slot-range.htmlfor an example.
Canvas backend
- Fixed renderer to work for 3.6 changes. Sadly, we can't support two color tinting via the Canvas API.
- Added support for shearing and non-uniform scaling inherited from parent bones.
- Added support for alpha tinting.
Three.js backend
- Fixed renderer to work with 3.6 changes. Two color tinting is not supported.
- Added clipping support
- Added
VertexEffectinterface, instances of which can be set onSkeletonMesh. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect,JitterEffect. - Added support for multi-page atlases
Widget backend
- Fixed WebGL context loss (see WebGL backend changes). Enabled automatically.
- Fixed renderer to work for 3.6 changes. Supports two color tinting & clipping (see WebGL backend changes for details).
- Added fields
atlasContent,atlasPagesContent, andjsonContenttoWidgetConfigurationallowing you to directly pass the contents of the.atlas, atlas page.pngfiles, and the.jsonfile without having to do a request. SeeREADME.mdand the example for details. SpineWidget.setAnimation()now takes an additional optional parameter for callbacks when animations are completed/interrupted/etc.