MixPose
is now called MixBlend
flipX/flipY
has been replaced with scaleY/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritanceTrackEntry#timeScale
. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194TrackEntry#setMixBlend(MixBlend.add)
on each track. To specify the blend percentage, set TrackEntry#alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.audioPath
, volume
and balance
fields on event (data).TrackEntry
has an additional field called holdPrevious
. It can be used to counter act a limitation of AnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.RaptorExample.as
SkeletonSprite.twoColorTint = true
. In this case the skeleton will use the TwoColorMeshStyle
, 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.VertexEffect
and implementations JitterEffect
and SwirlEffect
. Allows you to modify vertices before they are submitted for drawing. See Starling changes.StarlingAtlasAttachmentLoader#getTexture()
, see https://github.com/EsotericSoftware/spine-runtimes/commit/ea7dbecb98edc74e439aa9ef90dcf6eed865f718Starling#newRegionAttachment
and Starling#newMeshAttachment
but delegated to the atlas.spAnimationState
and spTrackEntry
will now also be called if a track entry gets disposed as part of disposing an animation state.flipX/flipY
has been replaced with scaleY/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritanceTrackEntry#timeScale
. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194spMeshAttachment
has two new fields regionTextureWith
and regionTextureHeight
. These must be set in custom attachment loader. See AtlasAttachmentLoader
.spTransformConstraintData
.Animation#apply
and Timeline#apply
now take enums
MixPoseand
MixDirection` instead of booleansspVertexEffect
and corresponding implementations spJitterVertexEffect
and spSwirlVertexEffect
. Create/dispose through the corresponding spXXXVertexEffect_create()/dispose()
functions. Set on framework/engine specific renderer.extension.h
are not prefixed with _sp
instead of just _
to avoid interference with other libraries.SP_API
macro. 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.void *userData
to spAnimationState
to be consumed in callbacks.spTrackEntry->mixBlend = SP_MIXBLEND_ADD)
on each track. To specify the blend percentage, set spTrackEntry->alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.audioPath
, volume
and balance
fields on event (data).spTrackEntry
has an additional field called holdPrevious
. It can be used to counter act a limitation of AnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.spAtlasPage_setCustomTextureLoader()
which let's you do texture loading manually. Thanks @jareguo.SkeletonRenderer:setSlotsRange()
and SkeletonRenderer::createWithSkeleton()
. This allows you to split rendering of a skeleton up into multiple parts, and render other nodes in between. See SkeletonRendererSeparatorExample.cpp
for an example.RaptorExample.m
.::update()
method of SkeletonRenderer
is now called, see https://github.com/EsotericSoftware/spine-runtimes/commit/f7bb98185236a6d8f35bfefc70afe4f31e9ec9d2spine-sfml.h
no longer defines SPINE_SHORT_NAMES
to avoid collisions with other APIs. See #1058.SkeletonDrawable
. Use SkeletonDrawable::setUsePremultipliedAlpha()
, see https://github.com/EsotericSoftware/spine-runtimes/commit/34086c1f41415309b2ecce86055f6656fcba2950SkeletonRendererComponent
generates collision meshes by default.SkeletonRendererComponent
. Both ProceduralMeshComponent
and RuntimeMeshComponent
have 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.FMemory
allocator by default.flipX/flipY
has been replaced with scaleY/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritanceTrackEntry#timeScale
. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194TrackEntry#MixBlend = MixBlend.add
on each track. To specify the blend percentage, set TrackEntry#Alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.audioPath
, volume
and balance
fields on event (data).TrackEntry
has an additional field called holdPrevious
. It can be used to counter act a limitation of AnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread..asmdef
file that defines these separately as their own assembly in Unity. For projects not using assembly definition, you may delete the .asmdef
files. These assembly definitions will be ignored by older versions of Unity that don't support it.
SkeletonAnimator
has been renamed SkeletonMecanim
to 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 use SkeletonMecanim
.AtlasAsset
type has been renamed to SpineAtlasAsset
to 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 as SpineAtlasAsset
.
SpineAtlasAsset
now has an abstract base class called SpineAtlasAsset
. 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._STRAIGHT_ALPHA_INPUT
shader_feature, toggled as a checkbox in the Material's inspector. This allows the Material to use a non-premultiplied alpha/straight alpha input texture.
Spine/Skeleton
Spine/Skeleton Tint Black
Spine/Skeleton Lit
Spine/Skeleton Tint
Spine/Skeleton Fill
Spine/SkeletonGraphic (Premultiply Alpha)
was renamed to Spine/SkeletonGraphic
Spine/SkeletonGraphic Tint Black (Premultiply Alpha)
was renamed to Spine/SkeletonGraphic Tint Black
Spine/Skeleton PMA Multiply
Spine/Skeleton PMA Screen
Spine/Straight Alpha/Skeleton Fill
Spine/Straight Alpha/Skeleton Tint
Effect
to be used by SkeletonRenderer
IVertexEffect
to modify vertices of skeletons on the CPU. IVertexEffect
instances can be set on the SkeletonRenderer
. See example project.SkeletonDebugRenderer
MeshBatcher
of SkeletonRenderer accessible via a getter. Allows user to batch their own geometry together with skeleton meshes for maximum batching instead of using XNA SpriteBatcher.SkeletonRenderer
, added overloaded method Skeleton#updateWorldTransform(Bone)
, used for SkeletonAttachment
. You now MUST call this new method with the bone of the parent skeleton to which the child skeleton is attached. See SkeletonAttachmentTest
for and example.MixPose
is now called MixBlend
.flipX/flipY
has been replaced with scaleY/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritanceTrackEntry#timeScale
. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194EventData#audioPath
field. This field contains the file name of the audio file used for the event.TrackEntry#setMixBlend(MixBlend.add)
on each track. To specify the blend percentage, set TrackEntry#alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.audioPath
, volume
and balance
fields on event (data).TrackEntry
has an additional field called holdPrevious
. It can be used to counter act a limitation of AnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.VertexEffect
interface, instances of which can be set on SkeletonRenderer
. Allows to modify vertices before submitting them to GPU. See SwirlEffect
, JitterEffect
and VertexEffectTest
.TwoColorPolygonBatch
implements the Batch
interface, allowing to the be used with other libGDX classes that require a batcher for drawing, potentially improving performance. See https://github.com/EsotericSoftware/spine-runtimes/commit/a46b3d1d0c135d51f9bef9ca17a5f8e5dda69927SkeletonDrawable
to render skeletons in scene2d UI https://github.com/EsotericSoftware/spine-runtimes/commit/b93686c185e2c9d5466969a8e07eee573ebe4b97flipX/flipY
has been replaced with scaleY/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritanceTrackEntry#timeScale
. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194JitterEffect
and SwirlEffect
and support for vertex effects in Corona and LoveTrackEntry:setMixBlend(MixBlend.add)
on each track. To specify the blend percentage, set TrackEntry.alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion.audioPath
, volume
and balance
fields on event (data).TrackEntry
has an additional field called holdPrevious
. It can be used to counter act a limitation of AnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.Skeleton.vertexEffect
. See main.lua
for an example.SkeletonRenderer.vertexEffect
. See main.lua
for an exampleflipX/flipY
has been replaced with scaleY/scaleY
. This cleans up applying transforms and is more powerful. Allows scaling a whole skeleton which has bones that disallow scale inheritanceTrackEntry#timeScale
. See https://github.com/EsotericSoftware/spine-runtimes/issues/1194AssetManager.loadTextureAtlas
. Instead of loading the .atlas
and corresponding image files manually, you can simply specify the location of the .atlas
file and AssetManager will load the atlas and all its images automatically. AssetManager.get("atlasname.atlas")
will then return an instance of spine.TextureAtlas
.TrackEntry#setMixBlend(MixBlend.add)
on each track. To specify the blend percentage, set TrackEntry#alpha
. See http://esotericsoftware.com/forum/morph-target-track-animation-mix-mode-9459 for a discussion. See https://github.com/EsotericSoftware/spine-runtimes/blob/f045d221836fa56191ccda73dd42ae884d4731b8/spine-ts/webgl/tests/test-additive-animation-blending.html for an example.audioPath
, volume
and balance
fields on event (data).TrackEntry
has an additional field called holdPrevious
. It can be used to counter act a limitation of AnimationState
resulting in "dipping" of parts of the animation. For a full discussion of the problem and the solution we've implemented, see this forum thread.VertexEffect
interface, instances of which can be set on SkeletonRenderer
. Allows to modify vertices before submitting them to GPU. See SwirlEffect
, JitterEffect
, and the example which allows to set effects.slotRangeStart
and slotRangeEnd
parameters to SkeletonRenderer#draw
and SceneRenderer#drawSkeleton
. This allows you to render only a range of slots in the draw order. See spine-ts/webgl/tests/test-slot-range.html
for an example.SceneRenderer#drawTextureUV()
, allowing to draw a texture with manually specified texture coordinates.SceneRenderer
.VertexEffect
interface, instances of which can be set on SkeletonMesh
. Allows to modify vertices before submitting them to GPU. See SwirlEffect
, JitterEffect
.atlasContent
, atlasPagesContent
, and jsonContent
to WidgetConfiguration
allowing you to directly pass the contents of the .atlas
, atlas page .png
files, and the .json
file without having to do a request. See README.md
and the example for details.SpineWidget.setAnimation()
now takes an additional optional parameter for callbacks when animations are completed/interrupted/etc.Breaking changes
Bone.worldToLocalRotationX
and Bone.worldToLocalRotationY
. Replaced by Bone.worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).Bone
fields _a
, _b
, _c
, _d
, _worldX
and _worldY
public, removed underscore prefix.VertexAttachment.computeWorldVertices
overload, changed VertexAttachment.computeWorldVertices2
to VertexAttachment.computeWorldVertices
, added stride
parameter.RegionAttachment.vertices
field. The vertices array is provided to RegionAttachment.computeWorldVertices
by the API user now.RegionAttachment.updateWorldVertices
, added RegionAttachment.computeWorldVertices
. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the provided worldVertices
array, starting at offset
, then moving by stride
array 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.r
, g
, b
, a
fields with instances of new Color
class in RegionAttachment
, MeshAttachment
, Skeleton
, SkeletonData
, Slot
and SlotData
.Additions
Skeleton.getBounds
from reference implementation.TransformConstraintData
Bone.localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).TwoColorTimeline
and additional fields on Slot
and SlotData
.PointAttachment
, additional method newPointAttachment
in AttachmentLoader
interface.ClippingAttachment
, additional method newClippingAttachment
in AttachmentLoader
interface.AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
and Timeline#apply
now take enums
MixPoseand
MixDirection` instead of booleansVertexEffect
and implementations JitterEffect
and SwirlEffect
. Allows you to modify vertices before they are submitted for drawing. See Starling changes.RaptorExample.as
SkeletonSprite.twoColorTint = true
. In this case the skeleton will use the TwoColorMeshStyle
, 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.spVertexAttachment_computeWorldVertices
and spRegionAttachment_computeWorldVerticeS
now 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.spBoundingBoxAttachment_computeWorldVertices
, superseded by spVertexAttachment_computeWorldVertices
.spPathAttachment_computeWorldVertices
and spPathAttachment_computeWorldVertices1
, superseded by spVertexAttachment_computeWorldVertices
.sp_MeshAttachment_computeWorldVertices
, superseded by spVertexAttachment_computeWorldVertices
.spBone_worldToLocalRotationX
and spBone_worldToLocalRotationY
. Replaced by spBone_worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).r
, g
, b
, a
fields with instances of new spColor
struct in spRegionAttachment
, spMeshAttachment
, spSkeleton
, spSkeletonData
, spSlot
and spSlotData
.spVertexIndex
from public API.spAnimationState
or spTrackEntry
will now be also called in case a track entry is disposed as part of dispoing the spAnimationState
.spTransformConstraintData
.spPointAttachment
, additional method spAtlasAttachmentLoadeR_newPointAttachment
.TransformConstraintData
spBone_localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).spTwoColorTimeline
and additional fields on spSlot
and spSlotData
.userData
field to spTrackEntry
, so users can expose data in spAnimationState
callbacks.Array.h/.c
spClippingAttachment
and respective enum.spSkeletonClipper
and spTriangulator
, used to implement software clipping of attachments.AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
and Timeline#apply
now take enums
MixPoseand
MixDirection` instead of booleansspVertexEffect
and corresponding implementations spJitterVertexEffect
and spSwirlVertexEffect
. Create/dispose through the corresponding spXXXVertexEffect_create()/dispose()
functions. Set on framework/engine specific renderer. See changes for spine-c based frameworks/engines below.extension.h
are not prefixed with _sp
instead of just _
to avoid interference with other libraries.SP_API
macro. 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.SkeletonRenderer
, resulting in 15% performance increase for large numbers of skeletons being rendered per frame.SkeletonRenderer
/SkeletonAnimation
instance. Use SkeletonRenderer::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.SkeletonRenderer::setDebugMeshesEnabled()
.RaptorExample.cpp
.spAtlasPage_setCustomTextureLoader()
which let's you do texture loading manually. Thanks @jareguo.SkeletonRenderer:setSlotsRange()
and SkeletonRenderer::createWithSkeleton()
. This allows you to split rendering of a skeleton up into multiple parts, and render other nodes in between. See SkeletonRendererSeparatorExample.cpp
for an example.SkeletonRenderer/SkeletonAnimation.twoColorTint = true
. Note that two color tinted skeletons do not batch with other nodes.SkeletonDrawable
.Color
. This allows to set the tint color of the skeleton in the editor, C++ and Blueprints. Under the hood, the spSkeleton->color
will be set on every tick of the renderer component.spine-ue4\Plugins\
to your project as well!Breaking changes
MeshAttachment.parentMesh
is now a private field to enforce using the .ParentMesh
setter property in external code. The MeshAttachment.ParentMesh
property is an appropriate replacement wherever .parentMesh
was used.Skeleton.GetBounds
takes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.Bone.WorldToLocalRotationX
and Bone.WorldToLocalRotationY
. Replaced by Bone.WorldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).stride
parameter to VertexAttachment.ComputeWorldVertices
.RegionAttachment.Vertices
field. The vertices array is provided to RegionAttachment.ComputeWorldVertices
by the API user now.RegionAttachment.UpdateWorldVertices
, added RegionAttachment.ComputeWorldVertices
. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the provided worldVertices
array, starting at offset
, then moving by stride
array 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 TwoColorTimeline
and additional fields on Slot
and SlotData
.
Added PointAttachment
, additional method NewPointAttachment
in AttachmentLoader
interface.
Added ClippingAttachment
, additional method NewClippingAttachment
in AttachmentLoader
interface.
Added SkeletonClipper
and Triangulator
, used to implement software clipping of attachments.
AnimationState.Apply
returns a bool indicating if any timeline was applied or not.
Animation.Apply
and Timeline.Apply
now take enums
MixPoseand
MixDirection` instead of bools.
Spine/Skeleton Tint Black
shader, or your own shader that treats the UV2 and UV3 streams similarly.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.ClippingAttachment
s when using on large numbers of skeletons.initialFlipX
and initialFlipY
fields 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.[SpineIkConstraint]
[SpineTransformConstraint]
[SpinePathConstraint]
includeNone
optional parameter to specify if you want to include or exclude a none ("") value option in the dropdown menu. Default is includeNone:true
.Advanced...
foldout in the SkeletonAnimation inspector, or in SkeletonAnimation's right-click/context menu.
AttachmentTools
methods can now accept a sourceMaterial
argument to copy material properties from.Append(Skin)
, RemoveAttachment
and Clear
have been added.Rigidbody
or Rigidbody2D
if 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.meshGenerator.VertexBuffer
or meshGenerator.ColorBuffer
to modify these before they get pushed into the UnityEngine.Mesh for rendering. This can be useful for non-shader vertex effects.AtasRegionAttacher
and SpriteAttacher
are now part of Sample 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/Skeleton Lit
shader was switched over to non-fixed-function code. It now no longer requires mesh normals and has fixed normals at the shader level.Spine.Unity.MeshGeneration
are now deprecated. All mesh-generating components now share the class Spine.Unity.MeshGenerator
defined in SpineMesh.cs
. MeshGenerator is a serializable class.
SkeletonRenderer.renderMeshes
optimization is currently non-functional.SkeletonRenderer
. Please use shaders that have backface culling off.SkeletonGraphic
can now be accessed under SkeletonGraphic.MeshGenerator.settings
. This is visible in the SkeletonGraphic inspector as Advanced...
SkeletonAnimator
now uses a SkeletonAnimator.MecanimTranslator
class to translate an Animator's Mecanim State Machine into skeleton poses. This makes code reuse possible for a Mecanim version of SkeletonGraphic.SkeletonAnimator
autoreset
and the mixModes
array are now a part of SkeletonAnimator's MecanimTranslator .Translator
. autoReset
is set to true by default. Old prefabs and scene objects with Skeleton Animator may no longer have correct values set.RegionBatcher
and SkeletonRegionRenderer
, renamed SkeletonMeshRenderer
to SkeletonRenderer
SpineEffect.fx
file to your content project, then load it via var effect = Content.Load<Effect>("SpineEffect");
, and set it on the SkeletonRenderer
. See the example project for code.Effect
to be used by SkeletonRenderer
IVertexEffect
to modify vertices of skeletons on the CPU. IVertexEffect
instances can be set on the SkeletonRenderer
. See example project.SkeletonDebugRenderer
MeshBatcher
of SkeletonRenderer accessible via a getter. Allows user to batch their own geometry together with skeleton meshes for maximum batching instead of using XNA SpriteBatcher.Breaking changes
Skeleton.getBounds
takes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.Bone.worldToLocalRotationX
and Bone.worldToLocalRotationY
. Replaced by Bone.worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).stride
parameter to VertexAttachment.computeWorldVertices
.RegionAttachment.vertices
field. The vertices array is provided to RegionAttachment.computeWorldVertices
by the API user now.RegionAttachment.updateWorldVertices
, added RegionAttachment.computeWorldVertices
. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the provided worldVertices
array, starting at offset
, then moving by stride
array 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.SkeletonRenderer
, added overloaded method Skeleton#updateWorldTransform(Bone), used for
SkeletonAttachment. You now MUST call this new method
with the bone of the parent skeleton to which the child skeleton is attached. See
SkeletonAttachmentTest` for and example.Additions
TransformConstraintData
Bone.localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).TwoColorTimeline
and additional fields on Slot
and SlotData
.PointAttachment
, additional method newPointAttachment
in AttachmentLoader
interface.ClippingAttachment
, additional method newClippingAttachment
in AttachmentLoader
interface.SkeletonClipper
and Triangulator
, used to implement software clipping of attachments.AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
and Timeline#apply
now take enums
MixPoseand
MixDirection` instead of booleansTwoColorPolygonBatch
together with SkeletonRenderer
SkeletonClipper
. Used automatically by SkeletonRenderer
. Does not work when using a SpriteBatch
with SkeletonRenderer
. Use PolygonSpriteBatch
or TwoColorPolygonBatch
instead.VertexEffect
interface, instances of which can be set on SkeletonRenderer
. Allows to modify vertices before submitting them to GPU. See SwirlEffect
, JitterEffect
and VertexEffectTest
.Bone:worldToLocalRotationX
and Bone:worldToLocalRotationY
. Replaced by Bone:worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).VertexAttachment:computeWorldVertices
now 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 subclasses MeshAttachment
, BoundingBoxAttachment
and PathAttachment
.RegionAttachment:updateWorldVertices
, added RegionAttachment: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.MeshAttachment.worldVertices
field. Computation is now performed in each backends' respective renderer. The uv
coordinates are now stored in MeshAttachment.uvs
.RegionAttachment.vertices
field. Computation is now performed in each backends respective renderer. The uv
coordinates for each vertex are now stored in the RegionAttachment.uvs
field.Bone:localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).TwoColorTimeline
and additional fields on Slot
and SlotData
.PointAttachment
, additional method newPointAttachment
in AttachmentLoader
interface.TransformConstraintData
ClippingAttachment
, additional method newClippingAttachment
in AttachmentLoader
interface.SkeletonClipper
and Triangulator
, used to implement software clipping of attachments.AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
and Timeline#apply
now take enums
MixPoseand
MixDirection` instead of booleansJitterEffect
and SwirlEffect
and support for vertex effects in Corona and LoveSkeletonRenderer.new(true)
.Skeleton.vertexEffect
. See main.lua
for an example.SkeletonRenderer.vertexEffect
. See main.lua
for an exampleBreaking changes
Skeleton.getBounds
takes a scratch array as input so it doesn't have to allocate a new array on each invocation itself. Reduces GC activity.Bone.worldToLocalRotationX
and Bone.worldToLocalRotationY
. Replaced by Bone.worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).VertexAttachment.computeWorldVertices
overload, changed VertexAttachment.computeWorldVerticesWith
to VertexAttachment.computeWorldVertices
, added stride
parameter.RegionAttachment.vertices
field. The vertices array is provided to RegionAttachment.computeWorldVertices
by the API user now.RegionAttachment.updateWorldVertices
, added RegionAttachment.computeWorldVertices
. The new method now computes the x/y positions of the 4 vertices of the corner and places them in the provided worldVertices
array, starting at offset
, then moving by stride
array 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.Additions
TransformConstraintData
Bone.localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees).TwoColorTimeline
and additional fields on Slot
and SlotData
.PointAttachment
, additional method newPointAttachment
in AttachmentLoader
interface.ClippingAttachment
, additional method newClippingAttachment
in AttachmentLoader
interface.SkeletonClipper
and Triangulator
, used to implement software clipping of attachments.AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
and Timeline#apply
now take enums
MixPoseand
MixDirection` instead of booleansAssetManager.loadTextureAtlas
. Instead of loading the .atlas
and corresponding image files manually, you can simply specify the location of the .atlas
file and AssetManager will load the atlas and all its images automatically. AssetManager.get("atlasname.atlas")
will then return an instance of spine.TextureAtlas
.Restorable
interface, implemented by any WebGL resource that needs restoration after a context loss. All WebGL resource classes (Shader
, Mesh
, GLTexture
) implement this interface.ManagedWebGLRenderingContext
. Handles setup of a WebGLRenderingContext
given a canvas element and restoration of WebGL resources (Shader
, Mesh
, GLTexture
) on WebGL context loss. WebGL resources register themselves with the ManagedWebGLRenderingContext
. If the context is informed of a context loss and restoration, the registered WebGL resources' restore()
method is called. The restore()
method implementation on each resource type will recreate the GPU side objects.WebGLRenderingContext
in the constructor now also allow a ManagedWebGLRenderingContext
. This ensures existing applications do not break.ManagedWebGLRenderingContext
, passing the canvas to the constructor. This will setup a WebGLRenderingContext
internally and manage context loss/restoration.ManagedWebGLRenderingContext
to the constructors of classes that you previously passed a WebGLRenderingContext
to (AssetManager
, GLTexture
, Mesh
, Shader
, PolygonBatcher
, SceneRenderer
, ShapeRenderer
, SkeletonRenderer
, SkeletonDebugRenderer
).DYNAMIC_DRAW
for vertex buffer objects and fixing bug that copied to much data to the GPU each frame in PolygonBatcher
/Mesh
.SceneRenderer
, SkeletonRenderer
and PolygonBatcher
. Note that you will need to use a shader created via Shader.newTwoColoredTexturedShader
shader with SkeletonRenderer
and PolygonBatcher
if two color tinting is enabled.VertexEffect
interface, instances of which can be set on SkeletonRenderer
. Allows to modify vertices before submitting them to GPU. See SwirlEffect
, JitterEffect
, and the example which allows to set effects.slotRangeStart
and slotRangeEnd
parameters to SkeletonRenderer#draw
and SceneRenderer#drawSkeleton
. This allows you to render only a range of slots in the draw order. See spine-ts/webgl/tests/test-slot-range.html
for an example.VertexEffect
interface, instances of which can be set on SkeletonMesh
. Allows to modify vertices before submitting them to GPU. See SwirlEffect
, JitterEffect
.atlasContent
, atlasPagesContent
, and jsonContent
to WidgetConfiguration
allowing you to directly pass the contents of the .atlas
, atlas page .png
files, and the .json
file without having to do a request. See README.md
and the example for details.SpineWidget.setAnimation()
now takes an additional optional parameter for callbacks when animations are completed/interrupted/etc.