- Breaking changes
- Removed
Bone.worldToLocalRotationX
andBone.worldToLocalRotationY
. Replaced byBone.worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Made
Bone
fields_a
,_b
,_c
,_d
,_worldX
and_worldY
public, removed underscore prefix. - Removed
VertexAttachment.computeWorldVertices
overload, changedVertexAttachment.computeWorldVertices2
toVertexAttachment.computeWorldVertices
, addedstride
parameter. - Removed
RegionAttachment.vertices
field. The vertices array is provided toRegionAttachment.computeWorldVertices
by 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 providedworldVertices
array, starting atoffset
, then moving bystride
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. - Replaced
r
,g
,b
,a
fields with instances of newColor
class inRegionAttachment
,MeshAttachment
,Skeleton
,SkeletonData
,Slot
andSlotData
. - Additions
- Added
Skeleton.getBounds
from 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
TwoColorTimeline
and additional fields onSlot
andSlotData
. - Added
PointAttachment
, additional methodnewPointAttachment
inAttachmentLoader
interface. - Added
ClippingAttachment
, additional methodnewClippingAttachment
inAttachmentLoader
interface. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans- Added
VertexEffect
and implementationsJitterEffect
andSwirlEffect
. Allows you to modify vertices before they are submitted for drawing. See Starling changes.
- 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.
- Breaking changes
spVertexAttachment_computeWorldVertices
andspRegionAttachment_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.- Removed
spBoundingBoxAttachment_computeWorldVertices
, superseded byspVertexAttachment_computeWorldVertices
. - Removed
spPathAttachment_computeWorldVertices
andspPathAttachment_computeWorldVertices1
, superseded byspVertexAttachment_computeWorldVertices
. - Removed
sp_MeshAttachment_computeWorldVertices
, superseded byspVertexAttachment_computeWorldVertices
. - Removed
spBone_worldToLocalRotationX
andspBone_worldToLocalRotationY
. Replaced byspBone_worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Replaced
r
,g
,b
,a
fields with instances of newspColor
struct inspRegionAttachment
,spMeshAttachment
,spSkeleton
,spSkeletonData
,spSlot
andspSlotData
. - Removed
spVertexIndex
from public API. - Listeners on
spAnimationState
orspTrackEntry
will now be also called in case a track entry is disposed as part of dispoing thespAnimationState
. - 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
spTwoColorTimeline
and additional fields onspSlot
andspSlotData
. - Added
userData
field tospTrackEntry
, so users can expose data inspAnimationState
callbacks. - 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
spClippingAttachment
and respective enum. - Added
spSkeletonClipper
andspTriangulator
, used to implement software clipping of attachments. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans- Added
spVertexEffect
and corresponding implementationsspJitterVertexEffect
andspSwirlVertexEffect
. 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.h
are not prefixed with_sp
instead of just_
to avoid interference with other libraries. - Introduced
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.
- 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
/SkeletonAnimation
instance. 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.cpp
for an example.
- 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.
- 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
.
- 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->color
will 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.
- Updated to Unreal Engine 4.18
- Breaking changes
MeshAttachment.parentMesh
is now a private field to enforce using the.ParentMesh
setter property in external code. TheMeshAttachment.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.- Removed
Bone.WorldToLocalRotationX
andBone.WorldToLocalRotationY
. Replaced byBone.WorldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added
stride
parameter toVertexAttachment.ComputeWorldVertices
. - Removed
RegionAttachment.Vertices
field. The vertices array is provided toRegionAttachment.ComputeWorldVertices
by 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 providedworldVertices
array, starting atoffset
, then moving bystride
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
- 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 onSlot
andSlotData
. - Added
PointAttachment
, additional methodNewPointAttachment
inAttachmentLoader
interface. - Added
ClippingAttachment
, additional methodNewClippingAttachment
inAttachmentLoader
interface. - Added
SkeletonClipper
andTriangulator
, used to implement software clipping of attachments. AnimationState.Apply
returns a bool indicating if any timeline was applied or not.Animation.Apply
andTimeline.Apply`` now take enums
MixPoseand
MixDirection` instead of bools.
- 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 Black
shader, 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
ClippingAttachment
s 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
initialFlipX
andinitialFlipY
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. - [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
includeNone
optional 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.
AttachmentTools
methods can now accept asourceMaterial
argument 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)
,RemoveAttachment
andClear
have been added. - BoneFollower and SkeletonUtilityBone Add RigidBody Button. The BoneFollower and SkeletonUtilityBone component inspectors will now offer to add a
Rigidbody
orRigidbody2D
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. - 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.VertexBuffer
ormeshGenerator.ColorBuffer
to 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.
AtasRegionAttacher
andSpriteAttacher
are 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 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. - The old MeshGenerator classes, interfaces and code in
Spine.Unity.MeshGeneration
are now deprecated. All mesh-generating components now share the classSpine.Unity.MeshGenerator
defined inSpineMesh.cs
. MeshGenerator is a serializable class.- The
SkeletonRenderer.renderMeshes
optimization is currently non-functional. - Old triangle-winding code has been removed from
SkeletonRenderer
. Please use shaders that have backface culling off. - Render settings in
SkeletonGraphic
can 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).
SkeletonAnimator
now uses aSkeletonAnimator.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 themixModes
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.- Warnings and conditionals checking for specific Unity 5.2-and-below incompatibility have been removed.
- Added support for clipping
- Removed
RegionBatcher
andSkeletonRegionRenderer
, renamedSkeletonMeshRenderer
toSkeletonRenderer
- Added support for two color tint. For it to work, you need to add the
SpineEffect.fx
file 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
Effect
to be used bySkeletonRenderer
- Added support for
IVertexEffect
to modify vertices of skeletons on the CPU.IVertexEffect
instances can be set on theSkeletonRenderer
. See example project. - Added
SkeletonDebugRenderer
- Made
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.- Removed
Bone.worldToLocalRotationX
andBone.worldToLocalRotationY
. Replaced byBone.worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added
stride
parameter toVertexAttachment.computeWorldVertices
. - Removed
RegionAttachment.vertices
field. The vertices array is provided toRegionAttachment.computeWorldVertices
by 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 providedworldVertices
array, starting atoffset
, then moving bystride
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. - Skeleton attachments: Moved update of attached skeleton out of libGDX
SkeletonRenderer
, added overloaded methodSkeleton#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
- 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 onSlot
andSlotData
. - Added
PointAttachment
, additional methodnewPointAttachment
inAttachmentLoader
interface. - Added
ClippingAttachment
, additional methodnewClippingAttachment
inAttachmentLoader
interface. - Added
SkeletonClipper
andTriangulator
, used to implement software clipping of attachments. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans
- Fixed renderer to work with 3.6 changes
- Added support for two color tinting. Use the new
TwoColorPolygonBatch
together withSkeletonRenderer
- Added support for clipping. See
SkeletonClipper
. Used automatically bySkeletonRenderer
. Does not work when using aSpriteBatch
withSkeletonRenderer
. UsePolygonSpriteBatch
orTwoColorPolygonBatch
instead. - Added
VertexEffect
interface, instances of which can be set onSkeletonRenderer
. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect
,JitterEffect
andVertexEffectTest
.
- Breaking changes
- Removed
Bone:worldToLocalRotationX
andBone:worldToLocalRotationY
. Replaced byBone: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 subclassesMeshAttachment
,BoundingBoxAttachment
andPathAttachment
.- 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.worldVertices
field. Computation is now performed in each backends' respective renderer. Theuv
coordinates are now stored inMeshAttachment.uvs
. - Removed
RegionAttachment.vertices
field. Computation is now performed in each backends respective renderer. Theuv
coordinates for each vertex are now stored in theRegionAttachment.uvs
field. - Additions
- Added
Bone:localToWorldRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Added two color tinting support, including
TwoColorTimeline
and additional fields onSlot
andSlotData
. - Added
PointAttachment
, additional methodnewPointAttachment
inAttachmentLoader
interface. - Added support for local and relative transform constraint calculation, including additional fields in
TransformConstraintData
- Added
ClippingAttachment
, additional methodnewClippingAttachment
inAttachmentLoader
interface. - Added
SkeletonClipper
andTriangulator
, used to implement software clipping of attachments. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans- Added
JitterEffect
andSwirlEffect
and support for vertex effects in Corona and Love
- 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.lua
for an example.
- 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.lua
for an example
- 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.- Removed
Bone.worldToLocalRotationX
andBone.worldToLocalRotationY
. Replaced byBone.worldToLocalRotation
(rotation given relative to x-axis, counter-clockwise, in degrees). - Removed
VertexAttachment.computeWorldVertices
overload, changedVertexAttachment.computeWorldVerticesWith
toVertexAttachment.computeWorldVertices
, addedstride
parameter. - Removed
RegionAttachment.vertices
field. The vertices array is provided toRegionAttachment.computeWorldVertices
by 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 providedworldVertices
array, starting atoffset
, then moving bystride
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
- 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 onSlot
andSlotData
. - Added
PointAttachment
, additional methodnewPointAttachment
inAttachmentLoader
interface. - Added
ClippingAttachment
, additional methodnewClippingAttachment
inAttachmentLoader
interface. - Added
SkeletonClipper
andTriangulator
, used to implement software clipping of attachments. AnimationState#apply
returns boolean indicating if any timeline was applied or not.Animation#apply
andTimeline#apply`` now take enums
MixPoseand
MixDirection` instead of booleans- Added
AssetManager.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 ofspine.TextureAtlas
.
- Fixed WebGL context loss
- Added
Restorable
interface, 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 aWebGLRenderingContext
given 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
WebGLRenderingContext
in 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 aWebGLRenderingContext
internally and manage context loss/restoration. - Pass the
ManagedWebGLRenderingContext
to the constructors of classes that you previously passed aWebGLRenderingContext
to (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_DRAW
for 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
,SkeletonRenderer
andPolygonBatcher
. Note that you will need to use a shader created viaShader.newTwoColoredTexturedShader
shader withSkeletonRenderer
andPolygonBatcher
if two color tinting is enabled. - Added clipping support
- Added
VertexEffect
interface, 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
slotRangeStart
andslotRangeEnd
parameters toSkeletonRenderer#draw
andSceneRenderer#drawSkeleton
. This allows you to render only a range of slots in the draw order. Seespine-ts/webgl/tests/test-slot-range.html
for an example.
- 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.
- Fixed renderer to work with 3.6 changes. Two color tinting is not supported.
- Added clipping support
- Added
VertexEffect
interface, instances of which can be set onSkeletonMesh
. Allows to modify vertices before submitting them to GPU. SeeSwirlEffect
,JitterEffect
. - Added support for multi-page atlases
- 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
, andjsonContent
toWidgetConfiguration
allowing you to directly pass the contents of the.atlas
, atlas page.png
files, and the.json
file without having to do a request. SeeREADME.md
and the example for details. SpineWidget.setAnimation()
now takes an additional optional parameter for callbacks when animations are completed/interrupted/etc.